Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
32662 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

how to use many2one to fields.selection ?

Related Posts Odpovědi Zobrazení Aktivita
2
zář 23
9723
1
říj 22
3853
0
říj 20
3263
1
srp 17
3728
8
úno 17
8398