İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1954 Görünümler

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

Avatar
Vazgeç
Üretici

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

En İyi Yanıt

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
Vazgeç
Üretici

Thanks u

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
May 24
3109
1
Kas 22
5578
2
Tem 22
4173
2
May 18
10296
2
Tem 17
7441