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:
- CRM
- e-Commerce
- 会計
- 在庫
- PoS
- プロジェクト
- MRP
この質問にフラグが付けられました
1
返信
5287
ビュー
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
|
11171 | ||
|
|
1
5月 21
|
2903 | ||
|
|
1
4月 21
|
9501 | ||
|
|
2
10月 25
|
33022 | ||
|
|
2
1月 25
|
6772 |
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