Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
2978 มุมมอง

Hello,

I'm trying to make the field future_driver_id as invisible in fleet app (odoo 13)

I am doing like:

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

But it doesn't work. I don't need this field and also the field plan_to_change_car but if I use the option position="replace" it will raise an error.

How can I do?

อวตาร
ละทิ้ง

Hope these tips will helps you in future: https://github.com/sehrishnaz/learnopenerp/wiki

คำตอบที่ดีที่สุด

Hi,

Try this.

<xpath expr="//label[@string='STRING']" position="replace"/>

<field name="future_driver_id" position="replace">
    <field name="future_driver_id" invisible="1"/>
</field>

<field name="plan_to_change_car" position="replace">
    <field name="plan_to_change_car" invisible="1"/>
</field>

or

<label for="future_driver_id" position="replace">
    <field name="future_driver_id" invisible="1"/>
</label>


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,


Have you upgraded module after putting invisible = "1" ??

อวตาร
ละทิ้ง
ผู้เขียน

yes

ผู้เขียน

Nothing is happened

คำตอบที่ดีที่สุด

Hi Michele:

The field also has a label defined. You will need to make the label invisible too. It's a couple of lines above the field in the XML.

<label for="future_driver_id" invisible="1"/>

On a related note, editing the view in place is not the recommended way of making such changes since you may end up losing the changes when you update the module. The recommended way is to use view inheritance to customize the view.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 23
2061
0
ม.ค. 20
2759
0
เม.ย. 25
748
0
ก.ค. 22
2269
6
มี.ค. 18
5919