Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5557 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất
 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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

thats what i did but invoice_date filed still showing up

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 23
1457
1
thg 9 22
3039
2
thg 7 22
4598
3
thg 12 21
4370
3
thg 7 23
5726