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

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
3337
0
бер. 15
5983
3
вер. 25
1913
2
лют. 25
6450
1
груд. 24
6509