Skip to Content
Menu
This question has been flagged

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

Avatar
Discard
Related Posts Replies Views Activity
1
Dec 16
2324
0
Mar 15
4608
3
Aug 24
5498
4
Jul 24
38806
5
Apr 23
93696