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:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
1
Antworten
1788
Ansichten
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
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Mai 24
|
2762 | ||
|
1
Nov. 22
|
5110 | ||
|
2
Juli 22
|
3826 | ||
|
2
Mai 18
|
9989 | ||
|
2
Juli 17
|
6962 |
bien = fields.Many2one('product.template', string="Bien", domain="['&',('nom_projet_ids', '=', nom_projet_ids), ('etat_depend_etat', '=', 'dispo')]")