Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2974 Zobrazení

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 16
3305
0
bře 15
5874
3
zář 25
1795
2
úno 25
6309
1
pro 24
6388