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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
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"/>
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()
how to use many2one to fields.selection ?
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
|
2
सित॰ 23
|
10315 | ||
|
Domain with inherited field
Solved
|
|
1
अक्तू॰ 22
|
4340 | |
|
|
0
अक्तू॰ 20
|
3762 | ||
|
|
1
अग॰ 17
|
4290 | ||
|
|
8
फ़र॰ 17
|
8906 |