跳至内容
菜单
此问题已终结
1 回复
2787 查看

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
13333
3
3月 25
1251
1
8月 24
2269
2
5月 24
3005
2
3月 22
9909