Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1905 Visualizzazioni

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

Avatar
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Autore

Thanks u

Post correlati Risposte Visualizzazioni Attività
1
mag 24
3055
1
nov 22
5536
2
lug 22
4138
2
mag 18
10279
2
lug 17
7396