コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1790 ビュー

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

アバター
破棄
著作者

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

最善の回答

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

アバター
破棄
著作者

Thanks u

関連投稿 返信 ビュー 活動
1
5月 24
2762
1
11月 22
5110
2
7月 22
3826
2
5月 18
9989
2
7月 17
6962