Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4555 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 25
10100
1
thg 5 21
2327
1
thg 4 21
8460
2
thg 1 25
6048
4
thg 12 24
16617