Odoo Help


2 Answers
Antonio Soriano Marco Spain
7/11/13, 8:15 AM

This is the final solution:

    <record model="ir.ui.view" id="view_partner_form_jolibelle2">
        <field name="name">res.partner.form.jolibelle2</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">
            <page string="Sales & Purchases" position="attributes">
                <attribute name='invisible'>1</attribute> 

And in this way, it works....

Oocademy, Yenthe Van Ginneken Belgium
12/8/15, 5:56 AM

Even cleaner would be to use the page name in place of the string. page string is depracated in Odoo V9 and would cause errors.

Ubaid ur Rehman Pakistan
6/22/17, 3:55 AM

For Odoo v9 this works for me in Products to hide Accounting page. As this page has no name atrribute.

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

<attribute name="invisible">1</attribute>


Lady Sharmane Udtuhan Philippines
7/10/13, 3:39 AM

in not sure about this but try this if this works. After your <data> tag.. call the page..

<page string="Sales" invisible="1"">..

just try if you want, i think you dont need the xpath to do that..

Yao Singapore
7/10/13, 4:16 AM

I tried with the code before using xPath. unfortunately it did not work for me. It gave validate error:Error occurred while validating the field(s) arch: Invalid XML for View Architecture! . thanks anyway!  I tried to use replace in the parent tag, then invisible as attribute in the child tag.. but it did not work

Lady Sharmane Udtuhan Philippines
7/10/13, 6:48 AM

how about use the field name after page string invisible.. ur one2many, or many2one field.. inside that page.. it works when i tried it <field name="one2many field inside the page " invisible="1"">..

Yao Singapore
7/10/13, 7:21 AM

thx a lot for trying to help! Finally I found a way to make it work! :] <page string="Sales" position="attributes"> <attribute name='invisible'>1</attribute> </page>

Lady Sharmane Udtuhan Philippines
7/10/13, 7:50 AM

sorry if i didnt help you :(

Ask a Question
Keep Informed
0 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now