Odoo Help

0

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

By
Kit Sunde
on 10/24/14, 5:53 AM 851 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--
1688
| 5 5 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..

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