bien = fields.Many2one('product.template', string="Bien", domain="['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]")
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
1786
查看
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
|
2761 | ||
|
1
11月 22
|
5110 | ||
|
2
7月 22
|
3826 | ||
|
2
5月 18
|
9989 | ||
|
2
7月 17
|
6961 |
bien = fields.Many2one('product.template', string="Bien", domain="['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]")