跳至內容
選單
此問題已被標幟
2 回覆
32659 瀏覽次數

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 ?

相關帖文 回覆 瀏覽次數 活動
2
9月 23
9723
1
10月 22
3848
0
10月 20
3263
1
8月 17
3727
8
2月 17
8398