Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4251 Widoki

Hello,

I would like to hide the "tax_id" fleld in note in Sales--->Quotations.

See LINK.

Can anyone  please help?

Thanks.

My code is

---------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
        <record id="view_quotation_test_form" model="ir.ui.view">
            <field name="name">sale.order.form</field>
            <field name="model">sale.order</field>
       <field name="inherit_id" ref="sale.view_order_form" />
            <field name="arch" type="xml">

     <field name="tax_id" position="attributes">
                <attribute name="invisible">1</attribute>
            </field>

        </field>
    </record>

    
  </data>
</openerp>

---------------------------------------------------------------------------------------------------------------------

Awatar
Odrzuć
Autor

Thanks for your solution.

Najlepsza odpowiedź

Hi

Try this code

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
        <record id="view_quotation_test_form" model="ir.ui.view">
            <field name="name">sale.order.form</field>
            <field name="model">sale.order</field>
               <field name="inherit_id" ref="sale.view_order_form" />
            <field name="arch" type="xml">

             <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='tax_id']" name="tax_id" position="attributes">
                <attribute name="invisible">1</attribute>
            </xpath>

        </field>
    </record>

    
  </data>
</openerp>

Awatar
Odrzuć
Najlepsza odpowiedź

you can use...

 

1. States: <field name="example" states="pending" /> ---> This field "example" is shown only when the stage is in "pending" state otherwise the field is hidden

2. Attrs: <field name="example" attrs="{'invisible': [('state','!=','pending')]}" /> ---> State other than "pending" is invisible for the field "example"

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
mar 15
4966
4
mar 15
8138
0
mar 15
3338
0
sty 25
878
0
wrz 22
2885