Odoo Help

0

How to disable a page string in one menu and to enable in another menu ?

By
Dimple
on 5/27/14, 7:55 AM 806 views

I have one form (eg: res.partner.form) and have two menus (eg: customer & supplier), I have four page string in my res.partner.form .I want all page string  in customer menu form . And three of them in my supplier menu. How can i hide that one page string in the supplier menu ? 

 

I tried many ways but no hope. Please help me.

1

For instance lets assume there are 4 pages - 

  1. Internal Notes
  2. Sales & Purchases
  3. Accounting
  4. History

 

To hide "History" page, try using attrs in XML file as below:

<page string="History" attrs="{'invisible': [('customer','=',False)]}">
.
.
.
</page>

 

If you are trying to use a new module to make changes to the page then follow this method:

<xpath expr="//page[@string='History']" position="attributes">
           <attribute name="attrs">{'invisible': [('customer','=',False)]}</attribute>
</xpath>

    

0
Dimple
On 5/28/14, 8:34 AM

Ok. I have no karma to comment the answer. So i just entering as answer. Same i want in another case. Here customer & supplier are two checbox. so we can easily add the attrs. But in my case, no checkboxs, only menu. then how can i hide?

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.

Register

Odoo Training Center

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

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/27/14, 7:55 AM
Seen: 806 times
Last updated: 3/16/15, 8:10 AM