Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
32675 Visualizzazioni

I have many 2one field like this <field name="contract_id" widget="selection" domain="[('partner_id','=',partner_id),('state','=','draft')]" required="1"/>

i am getting invalid architecture problem how to solve the issue

Avatar
Abbandona
Risposta migliore

Unfortunately widget="selection" don't support dinamic domain.

If you need widget selection then remove from domain non static value like partner_id:

<field name="contract_id" widget="selection" domain="[('state','=','draft')]" required="1"/>

If you need domain with dinamic value you have to remove widget="selection":

<field name="contract_id" domain="[('partner_id','=',partner_id),('state','=','draft')]" required="1"/>
Avatar
Abbandona
Risposta migliore

u dont have to use widget="selection" just romove it and in py file u have to declare yr colum as 'contract_id': fields.selection()

Avatar
Abbandona
Autore

how to use many2one to fields.selection ?

Post correlati Risposte Visualizzazioni Attività
2
set 23
9735
1
ott 22
3862
0
ott 20
3275
1
ago 17
3747
8
feb 17
8404