Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1801 Visualizações

 bien = fields.Many2one('product.template', string="Bien", domain="['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]")

Avatar
Cancelar
Autor

bien = fields.Many2one('product.template', string="Bien", domain="['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]")

Melhor resposta

Hi,

Please try to use the domain by passing the xml files, in order to apply the domain in action. domain would be the key of action and the value would list of tuples.

try this method,

@api.onchange('bien')
def bien_product(self):
​context = dict(self._context)
​write your codes
​return {'domain': {'bien': [['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]}}

bien = fields.Many2one('product.template', string="Bien")

Regards

Avatar
Cancelar
Autor

Thanks u

Publicações relacionadas Respostas Visualizações Atividade
1
mai. 24
2762
1
nov. 22
5113
2
jul. 22
3826
2
mai. 18
9990
2
jul. 17
6964