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

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

Imagine profil
Abandonează

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

Autor Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
ian. 25
9928
1
mai 21
2226
1
apr. 21
8320
2
ian. 25
5929
4
dec. 24
16392