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

I created a many2one field to select a product in a form. I filter the possible items to choose with a domain:

`light_system = fields.Many2one('product.product', string='Lighting System', ondelete='restrict', domain=[('categ_id.name', '=','Lighting System')])`

Is it possible to get the category to be set to "Lighting System" by default when I choose to create a new item directly from this field with 'create new""' or 'create and edit""' ?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 16
3268
0
thg 3 15
5827
3
thg 9 25
1752
2
thg 2 25
6240
1
thg 12 24
6327