Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2696 Vizualizări

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 16
3012
0
mar. 15
5604
2
feb. 25
5867
1
dec. 24
6023
1
dec. 24
1428