Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2883 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
dez. 16
3218
0
mar. 15
5792
3
set. 25
1740
2
fev. 25
6216
1
dez. 24
6311