Skip to Content
Menú
This question has been flagged
1 Respondre
2684 Vistes

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?


Avatar
Descartar
Autor Best Answer

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 >
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’abr. 15
13220
3
de març 25
1126
1
d’ag. 24
2158
2
de maig 24
2881
2
de març 22
9786