Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4425 Ansichten

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

Avatar
Verwerfen

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 Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Jan. 25
9894
1
Mai 21
2210
1
Apr. 21
8297
2
Jan. 25
5897
4
Dez. 24
16348