Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1424 Vistas

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

Avatar
Descartar
Autor

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

Mejor respuesta

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
Descartar
Autor

Thanks u

Publicaciones relacionadas Respuestas Vistas Actividad
1
may 24
1879
1
nov 22
4043
2
jul 22
2852
2
may 18
9364
2
jul 17
5975