تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
2631 أدوات العرض

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يونيو 23
1675
0
يناير 20
2376
0
أبريل 25
240
0
يوليو 22
1654
6
مارس 18
5469