Odoo Help


How to hide view.xml fields group in Account module with attr

on 4/2/13, 2:24 PM 5,325 views

I am using openerp version 7 and need to hide below section from existing module. I tried with many ways but still unable to do that.please advice me to sort out this (line 933 in account module) is there any restrictions in core modules or something missing to me ?

<group string="Refunds" attrs="{'invisible':[('active','=',True)]}">
<field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '&lt;&gt;', False)]" groups="analytic.group_analytic_accounting"/>

<field name="ref_base_code_id"/>
<field name="ref_base_sign"/>
<field name="ref_tax_code_id"/>
<field name="ref_tax_sign"/>

ClueLogics Technologies Pvt. Ltd.

--ClueLogics Technologies Pvt. Ltd.--
| 6 5 8
Delhi NCR, India
--ClueLogics Technologies Pvt. Ltd.--

 ClueLogics Technologies Pvt Ltd is a Software product and services provider. We are positioned to deliver robust, rapid and reliable Information Technology solutions that work. What we succeed upon is Technology and Technical Expertise. The industry review of ClueLogics has been commendable for the past years as most of its business comes from repeat orders by highly satisfied clients.

ClueLogics Technologies Pvt. Ltd.
On 6/4/13, 3:22 AM

attrs does'nt work on group , it work for invisible only ..... not for readonly and other

You are right but question is about how to hide group not about readonly.

Sudhir Arya (ERP Harbor Consulting Services)
on 6/4/13, 4:11 AM

Agree with Sudhir. Sandeep your answer should be relevant to the question.

AB Consultant
on 6/4/13, 4:14 AM

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 4/3/13, 1:54 AM

Your attrs syntax is right except value given in domain. You are giving 'true' which will be treated as a string not boolean.

Try this:

<group string="Refunds" attrs="{'invisible':[('active','!=',True)]}">

thanks arya.but its not worked for me i seperately add invisible ="1" for some fields.those are also not worked.after changes done, need to restart server & upgrade modules is enough ?

on 4/3/13, 3:40 AM

Yes you have to update the module. It's working for me.

Sudhir Arya (ERP Harbor Consulting Services)
on 4/3/13, 3:45 AM

only upgrade account & finance module .?

on 4/3/13, 3:46 AM

If you are directly changing code in account module then you have to update account module only.

Sudhir Arya (ERP Harbor Consulting Services)
on 4/3/13, 3:47 AM

i changed acount_view.xml line 1042 only.after upgrade also no result & its same (& see the result from Accounting->Configuration->Taxes->Taxes)

hope my editing lines & result page is equal

on 4/3/13, 3:50 AM

It will work when value of active field will change.

Sudhir Arya (ERP Harbor Consulting Services)
on 4/3/13, 3:56 AM

Make sure that changes you have made is really a view of tax or not? Because on account_view.xml: 1042 belongs to account.move.line form view. In your question you mentioned that you want to change line: 933.

Sudhir Arya (ERP Harbor Consulting Services)
on 4/3/13, 3:59 AM

Sudhir is right. I just tried that code directly from Setting --> User Interface --< Views and edit the account.tax.form view with the new attrs, given by him and its working fine.

Priyesh Solanki (pso)
on 4/3/13, 4:19 AM

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

0 follower(s)


Asked: 4/2/13, 2:24 PM
Seen: 5325 times
Last updated: 3/16/15, 8:10 AM