Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4532 Vues

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

Avatar
Ignorer

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

Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
janv. 25
10021
1
mai 21
2309
1
avr. 21
8398
2
janv. 25
6002
4
déc. 24
16515