İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1802 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
2763
1
Kas 22
5114
2
Tem 22
3826
2
May 18
9990
2
Tem 17
6965