Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2737 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
3058
0
thg 3 15
5648
2
thg 2 25
5951
1
thg 12 24
6092
1
thg 12 24
1489