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

How does odoo 18 not show the field by default? When I execute this code via my module, the field remains hidden.

       
 <record id="view_customer_move_form" model="ir.ui.view">

            <field name="name">opal.account.move.form</field>

            <field name="model">account.move</field>

            <field name="inherit_id" ref="account.view_move_form"/>

            <field name="arch" type="xml">

                <xpath expr="//field[@name='line_ids']/list/field[@name='tax_ids']" position="attributes">                   

                    <attribute name="optional">show</attribute>

                </xpath>


            </field>

        </record>

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

Hi,


Your inherited view is correct. However, Odoo stores the selected optional fields in the browser's local storage to remember the user's preferences even after a page reload. That’s why your view updates are not taking effect as expected.


To resolve this, you need to clear the local storage or remove the specific key related to optional fields. These keys typically start with something like:

"optional_fields,account.move,form,545,line_ids,list,...".


Hope it helps!

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

Just unhide the Field:

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 25
572
2
ส.ค. 25
263
4
ส.ค. 25
322
0
ส.ค. 25
253
0
ส.ค. 25
241