Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3935 Zobrazení

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.

Avatar
Zrušit
Autor

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.

Related Posts Odpovědi Zobrazení Aktivita
0
čvc 25
588
2
úno 23
1960
2
čvn 16
5864
0
čvn 25
531
0
říj 24
1375