Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4667 Visualizzazioni

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

Avatar
Abbandona

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

Autore Risposta migliore

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.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
gen 25
10197
1
mag 21
2378
1
apr 21
8568
2
gen 25
6122
4
dic 24
16823