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 can I hide the Journal Items button from the partner view?

By
Kit Sunde
on 10/24/14, 5:53 AM 761 views

In account/partner_view.xml is looks like this:

<button type="action" class="oe_stat_button" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user" icon="fa-list">
  <field string="Journal Items" name="journal_item_count" widget="statinfo"/>                        
</button>

If I try to hide the button via:

<button name="%(account.action_account_moves_all_tree)d" invisible="1"></button>

It complains it cannot be located however I can hide the inside field via:

<field name="journal_item_count" position="attributes">
  <attribute name="attrs">{'invisible':1}</attribute>
</field>

How can I hide the whole button?

0
Kit Sunde
On 10/24/14, 10:03 AM

I resorted to walking up the tree after failing to target the button with xpath and ended up with:

<xpath expr="//*[@name='journal_item_count']/.." position="attributes">
  <attribute name="attrs">{'invisible':1}</attribute>
</xpath>

Still not ideal.

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 10/24/14, 9:06 AM

Use Xpath and set the position as "replace"... that way also you can hide it too..

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: 10/24/14, 5:53 AM
Seen: 761 times
Last updated: 3/16/15, 8:10 AM