Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
5 Antworten
6249 Ansichten

    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


Avatar
Verwerfen
Beste Antwort

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>

Avatar
Verwerfen
Autor Beste Antwort

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>

Avatar
Verwerfen

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

Beste Antwort

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,

Avatar
Verwerfen

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

Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Okt. 23
5142
2
März 24
1596
1
Nov. 18
8753
1
Jan. 17
8374
2
Okt. 15
3479