Contributors mailing list archives

Browse archives


Please share your thoughts on the use of `x_` prefix for custom fields in Odoo

InitOS GmbH, Frederik Kramer
- 17/06/2024 12:12:17

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., 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,

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 and Odoo itself pretends "Custom model names must start with x_."  in but leaves the convention unaddressed in

For whom it may concern: SAP is requiring similar prefixes since very early versions of its ABAP programming and costumization iterface

Dr.-Ing. Frederik Kramer

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


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