Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2996 Weergaven

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 16
3323
0
mrt. 15
5903
3
sep. 25
1812
2
feb. 25
6354
1
dec. 24
6417