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

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مايو 23
1456
1
سبتمبر 22
3038
2
يوليو 22
4598
3
ديسمبر 21
4369
3
يوليو 23
5726