Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
4431 Visninger

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

Avatar
Kassér

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

Forfatter Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
jan. 25
9908
1
maj 21
2213
1
apr. 21
8303
2
jan. 25
5911
4
dec. 24
16369