Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8032 มุมมอง

Hi, i inherited a view from crm and i add a new notebook page, i can't set this page invisible when the stage_id is different 'lost'

can you help me please 

this is my view code 

<record id="view_oppor_form" model="ir.ui.view">
 <field name="name">crm.oppor.form</field>
  <field name="model">crm.lead</field>
 <field name="inherit_id" ref="crm.crm_case_form_view_oppor/>
  <field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page[@string='Internel notes']" position="after">
                  <fields name="cause_perte"/>
           </xpath>
 </field>
 </record>



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Khadhraoui,


Please try below code :-

<record id="view_oppor_form" model="ir.ui.view">
    <field name="name">crm.oppor.form</field>
    <field name="model">crm.lead</field>
    <field name="inherit_id" ref="crm.crm_case_form_view_oppor/>
    <field name="arch" type="xml">
        <xpath expr="/form/sheet/notebook/page[@string='Internel notes']" position="after">
            <page string="Page String" attrs="{'invisible' : [('stage_id.name', '=', 'lost')]}">
                // code of page
            </page>
        </xpath>
    </field> 
 </record>


It means when stage is lost, this page which you add is invisible.


Hope it will helps you.

Thanks,

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 18
3898
0
ม.ค. 22
2756
1
ก.ค. 15
3816
2
มี.ค. 15
6236
0
มี.ค. 15
5152