Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2894 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 16
3242
0
mar 15
5807
3
set 25
1745
2
feb 25
6227
1
dic 24
6317