Odoo Help


How can I hide the Journal Items button from the partner view?

Kit Sunde
on 10/24/14, 5:53 AM 1,136 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"/>                        

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>

How can I hide the whole button?

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>

Still not ideal.


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

On 10/24/14, 9:06 AM

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

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

Question tools

1 follower(s)


Asked: 10/24/14, 5:53 AM
Seen: 1136 times
Last updated: 3/16/15, 8:10 AM