Skip to Content
Menu
This question has been flagged
2 Replies
5551 Views

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

Avatar
Discard
Author Best Answer
 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


Avatar
Discard
Best Answer

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

Avatar
Discard
Author

thats what i did but invoice_date filed still showing up

Related Posts Replies Views Activity
0
May 23
1455
1
Sep 22
3037
2
Jul 22
4597
3
Dec 21
4368
3
Jul 23
5726