Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1425 Prikazi

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

Avatar
Opusti
Avtor

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

Avatar
Opusti
Avtor

Thanks u

Related Posts Odgovori Prikazi Aktivnost
1
maj 24
1879
1
nov. 22
4043
2
jul. 22
2854
2
maj 18
9365
2
jul. 17
5978