跳至內容
選單
此問題已被標幟
2748 瀏覽次數

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""' ?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
12月 16
3068
0
3月 15
5666
2
2月 25
5971
1
12月 24
6123
1
12月 24
1495