Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2718 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 15
13288
3
bře 25
1179
1
srp 24
2218
2
kvě 24
2956
2
bře 22
9848