コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3233 ビュー

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
3556
0
3月 15
6264
3
9月 25
2153
2
2月 25
6718
1
12月 24
6694