Skip to Content
Menu
This question has been flagged
1 Atsakyti
1785 Rodiniai

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

Portretas
Atmesti
Autorius

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

Best Answer

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

Portretas
Atmesti
Autorius

Thanks u

Related Posts Replies Rodiniai Veikla
1
geg. 24
2761
1
lapkr. 22
5110
2
liep. 22
3826
2
geg. 18
9988
2
liep. 17
6960