콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4554 화면

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>

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

아바타
취소
작성자

Thanks for your solution.

베스트 답변

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>

아바타
취소
베스트 답변

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"

아바타
취소
관련 게시물 답글 화면 활동
2
3월 15
5213
4
3월 15
8423
0
3월 15
3545
0
1월 25
1396
0
9월 22
3280