Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2743 Переглядів

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
груд. 16
3065
0
бер. 15
5651
2
лют. 25
5957
1
груд. 24
6094
1
груд. 24
1490