Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
8043 Представления

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
3932
0
янв. 22
2797
1
июл. 15
3838
2
мар. 15
6275
0
мар. 15
5193