Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
197 Vizualizări

Please could some one let me understand if for example i have a field like "Product Category" or even "Customer Category" ....this field should be considered as selection field or as many2one field (New Model).


is it needed to create new model for that or just selection and what are the criteria that determine or help in this situation.

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

In Odoo, you should use a selection field when the list of values is small, fixed, and unlikely to change, such as statuses or types. But if the values need to be flexible, managed by users, or require extra details (like a name, code, or hierarchy), then it’s better to create a Many2one field linked to a new model. For example, product categories in Odoo are stored as a Many2one field to the product.category model because users may add or change categories, while something like invoice type is a selection field since the options are predefined. If a record can belong to multiple categories, you’d use a Many2many field instead. In short, use selection for fixed choices, Many2one for dynamic and detailed data, and Many2many when multiple values can apply.


Hope it helps.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Thanks 

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 23
27288
0
oct. 20
3488
0
mar. 24
3601
1
aug. 17
4009
1
mar. 15
3998