Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4446 Weergaven

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

Avatar
Annuleer

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

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jan. 25
9929
1
mei 21
2228
1
apr. 21
8322
2
jan. 25
5931
4
dec. 24
16393