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 hide an item on a report?

By
Anirudh Lou
on 6/16/15, 5:09 AM 391 views

I did some changes one of the method on accounting report in OpenERP. My problem now is how can i make some item invisible or delete? In particular, I want to hide the "Liability" and its balance on the report.

I tried something like this on get_lines method:


     for report in lines:

          if report["name"].lower().replace(" ","") == 'liability':

                 del report["name"]

                 del report["balance"]


but when i tried to generate Balance sheet report. It says:

(<type 'exceptions.KeyError'>,KeyError('name',), <traceback object at 0x7f6c4c2903f8>)

Any help is much appreciated.

This might not be the best solution or it might the wierd solution, but this is what i did. Instead of trying to delete report["name"] and report["balance"], i just assign a white space on it that is: report["name"] = " " and report["balance"] = " ", this time Liability and its balance is no longer shown on the report.

Anirudh Lou
on 6/16/15, 8:55 PM

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: 6/16/15, 5:09 AM
Seen: 391 times
Last updated: 6/16/15, 8:55 PM