Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-579870-skh into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579870-skh/+merge/131821

Hello Sir,

[Fix]: 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.
Kindly review the barnch and please share your views on it.

Thanks, 
Somesh Khare

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579870-skh/+merge/131821
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579870-skh.
=== modified file 'account/wizard/account_financial_report.py'
--- account/wizard/account_financial_report.py	2012-02-13 10:49:37 +0000
+++ account/wizard/account_financial_report.py	2012-10-29 06:54:20 +0000
@@ -54,6 +54,11 @@
             'target_move': 'posted',
             '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:
@@ -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

Reply via email to