Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-opw-579870-port-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-579870-port-mma/+merge/136371
Hello,
I have fixes the issue of balance sheet did not consider the target move
while printing the report.
Steps:-
1. Make some journal entries and try to print balance sheet report from .
2. select target move to "All Entries"
See the report it did not consider the target move.
This branch fixes this issue.
code is forward port from 6.1
Thanks,
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-579870-port-mma/+merge/136371
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-opw-579870-port-mma.
=== modified file 'account/wizard/account_financial_report.py'
--- account/wizard/account_financial_report.py 2012-08-07 11:31:37 +0000
+++ account/wizard/account_financial_report.py 2012-11-27 11:30:31 +0000
@@ -55,6 +55,11 @@
'account_report_id': _get_account_report,
}
+ def _build_contexts(self, cr, uid, ids, data, context=None):
+ result = super(accounting_report, self)._build_contexts(cr, uid, ids,data, context=context)
+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
+ return result
+
def _build_comparison_context(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
@@ -62,6 +67,7 @@
result['fiscalyear'] = 'fiscalyear_id_cmp' in data['form'] and data['form']['fiscalyear_id_cmp'] or False
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
if data['form']['filter_cmp'] == 'filter_date':
result['date_from'] = data['form']['date_from_cmp']
result['date_to'] = data['form']['date_to_cmp']
@@ -86,7 +92,7 @@
return res
def _print_report(self, cr, uid, ids, data, context=None):
- data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter'], context=context)[0])
+ data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter', 'target_move'], context=context)[0])
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.financial.report',
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp