Unfortunately I was not successful in running you r module. I had to make these changes in order to get the module loaded:
-> In openerp/addons/account/report/__init__.py I had to comment out:
#import account_balance_sheet
#import account_profit_loss
because the new modules would conflict with existing modules
-> openerp/addons/account_report_alt/report/account_balance_sheet.py I had to make this change:
#from openerp.addons.account_report_alt.report import account_profit_loss
import account_profit_loss
because the server complained it couldn't find openerp.addons.account_report_alt.report import account_profit_loss
Error #1 is of course related to #2, but I fail to see what is wrong with the path openerp.addons.account_report_alt.report.
Anyway, WHEN I have it up and running, I get this error:
[2012-02-17 14:18:34,408][demo] ERROR:web-services:[11]: File "/usr/share/pyshared/openerp/addons/account_report_alt/report/account_profit_loss.py", line 63, in set_context
[2012-02-17 14:18:34,408][demo] ERROR:web-services:[12]: new_ids = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] and [data['form']['chart_account_id'][0]] or []
[2012-02-17 14:18:34,408][demo] ERROR:web-services:[13]: TypeError: 'int' object is not subscriptable
> /usr/share/pyshared/openerp/netsvc.py(131)abortResponse()
-> raise
Which seems to me either a version problem or a wrong object class, maybe because I changed the wrong things.
I think the errors are because my lack of understanding.
However, when I look into the code of account_profit_loss.py, it seems to me that still the absolute value of the account balance is being used to calculate net profit or net loss.
Unless the error is solved sooner, I would be gratefule if you could reproduce the bug in the demo version and confirm. I noticed you are from the Netherlands as well, so may it is a Dutch problem that we want to have negative balances on Expense accounts.
Just kidding, the demo database I use is English language with a generic accounting scheme.
Thanks for sending me.
Unfortunately I was not successful in running you r module. I had to make these changes in order to get the module loaded:
-> In openerp/ addons/ account/ report/ __init_ _.py I had to comment out: balance_ sheet
#import account_
#import account_profit_loss
because the new modules would conflict with existing modules
-> openerp/ addons/ account_ report_ alt/report/ account_ balance_ sheet.py I had to make this change: addons. account_ report_ alt.report import account_profit_loss addons. account_ report_ alt.report import account_profit_loss
#from openerp.
import account_profit_loss
because the server complained it couldn't find openerp.
Error #1 is of course related to #2, but I fail to see what is wrong with the path openerp. addons. account_ report_ alt.report.
Anyway, WHEN I have it up and running, I get this error: services: [11]: File "/usr/share/ pyshared/ openerp/ addons/ account_ report_ alt/report/ account_ profit_ loss.py" , line 63, in set_context services: [12]: new_ids = 'chart_account_id' in data['form'] and data['form' ]['chart_ account_ id'] and [data[' form'][ 'chart_ account_ id'][0] ] or [] services: [13]: TypeError: 'int' object is not subscriptable pyshared/ openerp/ netsvc. py(131) abortResponse( )
[2012-02-17 14:18:34,408][demo] ERROR:web-
[2012-02-17 14:18:34,408][demo] ERROR:web-
[2012-02-17 14:18:34,408][demo] ERROR:web-
> /usr/share/
-> raise
Which seems to me either a version problem or a wrong object class, maybe because I changed the wrong things.
I think the errors are because my lack of understanding.
However, when I look into the code of account_ profit_ loss.py, it seems to me that still the absolute value of the account balance is being used to calculate net profit or net loss.
In the mean time, I got some replies on my own bug report https:/ /bugs.launchpad .net/bugs/ 930739 and in the OpenERP forum.
Unless the error is solved sooner, I would be gratefule if you could reproduce the bug in the demo version and confirm. I noticed you are from the Netherlands as well, so may it is a Dutch problem that we want to have negative balances on Expense accounts.
Just kidding, the demo database I use is English language with a generic accounting scheme.
jlinkels