- Mailing Lists
- Contributors
- Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
https://www.odoo.com/forum/help-1/fixing-a-custom-field-and-database-implications-90794
I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Dr.-Ing. Frederik Kramer
Geschäftsführer
initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.
Phone: +49 4181 13503-12
Fax: +49 4181 13503-10
Mobil: +49 179 3901819
Email: frederik.kramer@initos.com
Web: www.initos.com
Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht Tostedt, HRB 205226
Steuer-Nr: 15/200/53247
USt-IdNr.: DE815580155
by Frederik Kramer - 07:35 - 19 Jun 2024
Reference
-
Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Hello Odoo contributors,
I'd love to hear your opinion on whether or not one should consistently prefix custom fields and models with `x_`. While there are valid reasons to do so, this convention is either not general or often overlooked in the community. Please share your insights on ir ir when it is required and why it may be missing from some guidelines (e.g., https://www.odoo.com/documentation/17.0/contributing/development/coding_guidelines.html#). I'd really love discuss this topic to enhance our common understanding and best practices in the Odoo ecosystem. Thank you for sharing your opinions
Best regards,
Frederik
Hint: Daniel Reis for instance claims "The field name field entry must start with the
x_prefix. This is mandatory for models and fields created from the developer tools. Customizations made through addon modules don't have this limitation." in https://subscription.packtpub.com/book/business-and-other/9781800200067/2/ch02lvl1sec09/adding-a-custom-field-to-a-model and Odoo itself pretends "Custom model names must start withx_." in https://www.odoo.com/documentation/17.0/developer/reference/external_api.html but leaves the convention unaddressed in https://www.odoo.com/documentation/17.0/contributing/development/coding_guidelines.html#For whom it may concern: SAP is requiring similar prefixes since very early versions of its ABAP programming and costumization iterface https://help.sap.com/doc/saphelp_snc700_ehp01/7.0.1/en-US/c5/e4ade6453d11d189430000e829fbbd/content.htm?no_cache=true
-- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
by Frederik Kramer - 12:16 - 17 Jun 2024-
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Now we reach the veterans talk and remembering. Time flies lads !My two cents on this topic. I confirm what Daniel and Graeme said. The reason behind was to quickly find back the custom fields and models added by the interface and avoid searching in the code for the field and model definition.Anyway such modifications should be banned for the sake of the project and the mental health 😉Regards,HoussineLe mer. 19 juin 2024, 08:08, Graeme Gellatly <notifications@odoo-community.org> a écrit :On Wed, Jun 19, 2024 at 5:57 PM Graeme Gellatly <graeme@moahub.nz> wrote:Yes but it is still exactly the same case. A model or field that is not part of a module. There is zero technical difference between creating a field via RPC and via UI. Afterall the UI is just sending the same RPC calls to the server. It absolutely does not apply to community developed modules in any way whatsoever, and it is absolutely required for any field created outside of a module (such that it gets ignored rather than removed in certain operations, it is essentially treated as data). And yes it existed in v5, and it was a major feature. This was the times of OpenBravo taking primacy with their dynamic low code DDL java thing, and OpenERP had a precursor to Studio in it. They even had a website openerp.tv dedicated to tutorials on how to do it.On Wed, Jun 19, 2024 at 5:41 PM Frederik Kramer <notifications@odoo-community.org> wrote:Well, this is not the only instance of that magical x_ I came across this (at least if I remember well) already in times of OpenERP Version 5 or so. Here for instance it again seems to be more related to backend UI changes and some reasoning is also provided by Ray
https://www.odoo.com/forum/help-1/fixing-a-custom-field-and-database-implications-90794Am 18. Juni 2024 23:32:27 MESZ schrieb Graeme Gellatly <notifications@odoo-community.org>:I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--
Dr.-Ing. Frederik Kramer
Geschäftsführer
initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.
Phone: +49 4181 13503-12
Fax: +49 4181 13503-10
Mobil: +49 179 3901819
Email: frederik.kramer@initos.com
Web: www.initos.com
Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht Tostedt, HRB 205226
Steuer-Nr: 15/200/53247
USt-IdNr.: DE815580155_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Houssine BAKKALI - 10:00 - 19 Jun 2024 -
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
On Wed, Jun 19, 2024 at 5:57 PM Graeme Gellatly <graeme@moahub.nz> wrote:Yes but it is still exactly the same case. A model or field that is not part of a module. There is zero technical difference between creating a field via RPC and via UI. Afterall the UI is just sending the same RPC calls to the server. It absolutely does not apply to community developed modules in any way whatsoever, and it is absolutely required for any field created outside of a module (such that it gets ignored rather than removed in certain operations, it is essentially treated as data). And yes it existed in v5, and it was a major feature. This was the times of OpenBravo taking primacy with their dynamic low code DDL java thing, and OpenERP had a precursor to Studio in it. They even had a website openerp.tv dedicated to tutorials on how to do it.On Wed, Jun 19, 2024 at 5:41 PM Frederik Kramer <notifications@odoo-community.org> wrote:Well, this is not the only instance of that magical x_ I came across this (at least if I remember well) already in times of OpenERP Version 5 or so. Here for instance it again seems to be more related to backend UI changes and some reasoning is also provided by Ray
https://www.odoo.com/forum/help-1/fixing-a-custom-field-and-database-implications-90794Am 18. Juni 2024 23:32:27 MESZ schrieb Graeme Gellatly <notifications@odoo-community.org>:I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--
Dr.-Ing. Frederik Kramer
Geschäftsführer
initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.
Phone: +49 4181 13503-12
Fax: +49 4181 13503-10
Mobil: +49 179 3901819
Email: frederik.kramer@initos.com
Web: www.initos.com
Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht Tostedt, HRB 205226
Steuer-Nr: 15/200/53247
USt-IdNr.: DE815580155_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by "Graeme Gellatly" <graeme@moahub.nz> - 08:08 - 19 Jun 2024 -
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Yes but it is still exactly the same case. A model or field that is not part of a module. There is zero technical difference between creating a field via RPC and via UI. Afterall the UI is just sending the same RPC calls to the server. It absolutely does not apply to community developed modules in any way whatsoever, and it is absolutely required for any field created outside of a module (such that it gets ignored rather than removed in certain operations, it is essentially treated as data). And yes it existed in v5, and it was a major feature. This was the times of OpenBravo taking primacy with their dynamic low code DDL java thing, and OpenERP had a precursor to Studio in it. They even had a website openerp.tv dedicated to tutorials on how to do it.On Wed, Jun 19, 2024 at 5:41 PM Frederik Kramer <notifications@odoo-community.org> wrote:Well, this is not the only instance of that magical x_ I came across this (at least if I remember well) already in times of OpenERP Version 5 or so. Here for instance it again seems to be more related to backend UI changes and some reasoning is also provided by Ray
https://www.odoo.com/forum/help-1/fixing-a-custom-field-and-database-implications-90794Am 18. Juni 2024 23:32:27 MESZ schrieb Graeme Gellatly <notifications@odoo-community.org>:I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--
Dr.-Ing. Frederik Kramer
Geschäftsführer
initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.
Phone: +49 4181 13503-12
Fax: +49 4181 13503-10
Mobil: +49 179 3901819
Email: frederik.kramer@initos.com
Web: www.initos.com
Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht Tostedt, HRB 205226
Steuer-Nr: 15/200/53247
USt-IdNr.: DE815580155_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by "Graeme Gellatly" <graeme@moahub.nz> - 08:07 - 19 Jun 2024 -
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
Well, this is not the only instance of that magical x_ I came across this (at least if I remember well) already in times of OpenERP Version 5 or so. Here for instance it again seems to be more related to backend UI changes and some reasoning is also provided by Ray
https://www.odoo.com/forum/help-1/fixing-a-custom-field-and-database-implications-90794Am 18. Juni 2024 23:32:27 MESZ schrieb Graeme Gellatly <notifications@odoo-community.org>:I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--
Dr.-Ing. Frederik Kramer
Geschäftsführer
initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.
Phone: +49 4181 13503-12
Fax: +49 4181 13503-10
Mobil: +49 179 3901819
Email: frederik.kramer@initos.com
Web: www.initos.com
Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht Tostedt, HRB 205226
Steuer-Nr: 15/200/53247
USt-IdNr.: DE815580155
by Frederik Kramer - 07:35 - 19 Jun 2024 -
Re: Please share your thoughts on the use of `x_` prefix for custom fields in Odoo
I took a quick read and yes it is a misunderstanding of the documentation. If reading a specific section about creating custom models over RPC calls, do not try and apply it to module development in general. All the documentation is correct as is Daniel's statement. Just a misread.On Wed, Jun 19, 2024 at 9:19 AM Graeme Gellatly <graeme@moahub.nz> wrote:Before Odoo studio, there was another frontend editor, like way back in v5. But it is only for fields created through the UI, not modules. Never modules, it would be a nonsense. The only time you would use in a module is if it contained dynamic field creation, e.g. like studio, or you have some kind of variable dynamic model like say custom field service worksheets. I think this is simply a misunderstanding of the documentation.On Tue, Jun 18, 2024 at 12:16 AM Frederik Kramer <notifications@odoo-community.org> wrote:Thanks Pedro, thanks Christian and Francesco for your comments, i think the first appearance of that magical "x_" was long before Odoo Studio even existed but i do definitely agree that backend UI changes done with Odoo Studio (or earlier through Developer Tools and Plain BE functions) should be avoided in any production grade DB. However, technically forbid to use that "methods" is not all too simple (if the customer pretends to have certain rights on his landscape) or comes from an origin where nobody even told them ;-) To me it seems (i.e. would be my conclusion) that Odoo S.A. always wanted to have that "x_" prefix and the community mostly ignored it (if i remember well, i have occassionaly seen app store modules that followed this 'requirement'). Now what bothers me most is that Odoo S.A. isn't consistent either on the matter and obviously never forced to comply (would have been easily possible). So probably we we better follow the "wisdom of the crowd" altogether and continue to ignore that "magic convention". Best Frederik Am 17.06.24 um 13:43 schrieb Pedro M. Baeza: > IMO, that prefix must only apply to fields created through UI / Odoo > Studio, not on community modules. And if you have to maintain that DB, > I advise you to forbid both Odoo Studio and manual field creation. > > Regards. > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by "Graeme Gellatly" <graeme@moahub.nz> - 11:31 - 18 Jun 2024
-