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

Hi everyone! I'm having trouble trying select the city field from a res.partner inherited form view in Odoo 14.


This issue doesn's show up with other field from the same view.


Example:

<field name="city" position="after">Hi!</field>

produces nothing.


But

<field name="street" position="after">Hi!</field>

shows "Hi!" after the street field, as expected.


Can anyone help me?


頭像
捨棄
作者 最佳答案

I've found the solution by observing the View Field item in the Debug menu.


I've discovered a city_id hide parameter. So:

<xpath expr="//div//field[@name='street2']" position="after">

< field name="city_id" invisible="1" / >

< /xpath >

< field name="city" position="attributes" >

< attribute name="attrs" > {'readonly': ['|','&', ('type', '=', 'contact'), ('parent_id', '!=', False), ('x_some_field', '!=', 0)]} < /attribute >

< /field >
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 15
13392
3
3月 25
1328
1
8月 24
2349
2
5月 24
3082
2
3月 22
9990