Odoo Help

Welcome!

This community 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.

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 602 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

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3883
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 5/28/14, 8:12 AM

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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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