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

i have created one2many field in custom add-ons and link it with other model

res_id = fields.One2many('production.resources', 'resources_id', "Resources")
the field work good but when i try to add line it show a popup to create new record instead of show already created records in the other model as selection?
Ảnh đại diện
Huỷ bỏ

Is it possible that you really need a Many2one or a Many2many instead of a One2many.
In One2many you only get records that are created especially for the parent record. like eg: invoice and invoice-lines.
If in your example one product can have more resources and one resource can be a resource for more products you need m2m.

Tác giả

its works fine with many2many but i have custom float field in need to add it per line in the many2many lines is that possible and how ?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 21
4917
1
thg 10 19
5145
4
thg 3 15
10466
3
thg 5 25
2041
1
thg 4 25
1522