If you want to prevent users from creating new records from a relational field
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
4429
查看
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.
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
1月 25
|
9906 | ||
|
1
5月 21
|
2212 | ||
|
1
4月 21
|
8297 | ||
|
2
1月 25
|
5907 | ||
|
4
12月 24
|
16355 |
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