Se rendre au contenu
Menu
Cette question a été signalée

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
Ignorer
Publications associées Réponses Vues Activité
1
déc. 16
3332
0
mars 15
5958
3
sept. 25
1863
2
févr. 25
6413
1
déc. 24
6471