تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
6408 أدوات العرض

    Hello everybode!!

Please can anyone help me know how to make invisible a page added to the res_company model through an other module but which does not contain a name like this <page string="Configuration">

SO that i cant use 

  <xpath expr="//page[1]" position = "attributes">

or even this 

  <xpath expr="//page[@name='configuration']" position="attributes">

Help please


الصورة الرمزية
إهمال
أفضل إجابة

here is code for it:

<record id="view_company_inherit_form_test" model="ir.ui.view">

<field name="name">res.company.account</field>

<field name="model">res.company</field>

<field name="inherit_id" ref="account.view_company_inherit_form"/>

<field name="arch" type="xml">

<xpath expr="//field[@name='overdue_msg']/.." position="replace">

</xpath>

</field>

</record>

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Here is the page that i want to make invisible:

                <notebook position="inside">

<page string="Overdue Payments">

<separator string="Overdue Payments Message" colspan="4"/>

<field name="overdue_msg" nolabel="1" colspan ="4"/>

</page>

</notebook>

الصورة الرمزية
إهمال

hi @Drees i have posted the code <xpath expr="//field[@name='overdue_msg']/.." position="replace">

أفضل إجابة

Hello Dress Far,


Try this :-

First Solution

<xpath expr="//form/sheet/notebook/page[@name='configuration']" position = "attributes">

     <attribute name="attrs">{'invisible':1}</attribute>

</xpath>


Second Solution :-

<xpath expr="//form/sheet/notebook/page[@name='configuration']" position = "replace" />     


Hope it will works for you.

Thanks,

الصورة الرمزية
إهمال

and a third solution (in case the page has no name and you really have no other solution):

الكاتب

@Yenthe i need the third solution to my question because there is no name

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أكتوبر 23
5382
2
مارس 24
1749
1
نوفمبر 18
8948
1
يناير 17
8521
2
أكتوبر 15
3558