Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
5559 Ansichten

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
Verwerfen
Autor Beste Antwort
 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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

thats what i did but invoice_date filed still showing up

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Mai 23
1458
1
Sept. 22
3039
2
Juli 22
4598
3
Dez. 21
4370
3
Juli 23
5726