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

my Gol is to hide invoice_date_due & invoice_date  in invoice tree view by default

I created new custom module that's my view  first i tried optional="hide " did not work 

so i did this 


id="hide_view_order_form_inherit" model="ir.ui.view">
name="name">account.move.inherit
name="model">account.move
name="inherit_id" ref="account.view_out_invoice_tree"/>
name="arch" type="xml">

name="invoice_date" position="attributes">
name="invisible">1

name="invoice_date_due" position="attributes">
name="invisible">1



        its work  but just in one field  invoice_date_due field

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด
 name="invoice_date_due" position="attributes">
name="optional">hide


name="invoice_user_id" position="attributes">
name="optional">hide


name="invoice_date" position="attributes">
name="optional">hide

this what im serching for but invoice_date still showing


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

Hi,

You can hide invoice_date_due and invoice_date fields by using the below code:

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


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


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


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


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


            <xpath expr="//field[@name='invoice_date_due']" position="attributes">


                <attribute name="invisible">1</attribute>


            </xpath>


            <xpath expr="//field[@name='invoice_date']" position="attributes">


                <attribute name="invisible">1</attribute>


            </xpath>


        </field>


    </record>

Make sure that the xpath expr and inherit_id are correct.

Regards

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

thats what i did but invoice_date filed still showing up

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 23
1458
1
ก.ย. 22
3039
2
ก.ค. 22
4598
3
ธ.ค. 21
4370
3
ก.ค. 23
5726