Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
4527 Visualizações

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

Avatar
Cancelar

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 Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jan. 25
10019
1
mai. 21
2309
1
abr. 21
8394
2
jan. 25
6001
4
dez. 24
16510