Skip to Content
Menu
This question has been flagged
1 Atsakyti
4441 Rodiniai

If you want to prevent users from creating new records from a relational field

Portretas
Atmesti

You can do it dynamically based on each model and its fields (relational fields) in v16 and v17: https://apps.odoo.com/apps/modules/17.0/mh_dynamic_many2one_field_options

Autorius Best Answer

If you want to prevent users from creating new records from a relational field (just like the country_id field on the res.partner model), just add this in the xml view: options="{"no_open": True, "no_create": True}".

For example:

.

will prevent users from creating new roles from the x_role_id field.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
saus. 25
9925
1
geg. 21
2224
1
bal. 21
8320
2
saus. 25
5928
4
gruod. 24
16389