Merge lp:~openerp-dev/openobject-addons/6.1-opw-579870-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 7048
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-579870-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 32 lines (+7/-1)
1 file modified
account/wizard/account_financial_report.py (+7/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-579870-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+131821@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

ello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-579870-port-mma/+merge/136371 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7048. By Somesh Khare

[FIX] balance sheet: Balance sheet report did not consider the target move (Case: Ref 579870)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/wizard/account_financial_report.py'
2--- account/wizard/account_financial_report.py 2012-02-13 10:49:37 +0000
3+++ account/wizard/account_financial_report.py 2012-10-29 06:54:20 +0000
4@@ -54,6 +54,11 @@
5 'target_move': 'posted',
6 'account_report_id': _get_account_report,
7 }
8+
9+ def _build_contexts(self, cr, uid, ids, data, context=None):
10+ result = super(accounting_report, self)._build_contexts(cr, uid, ids,data, context=context)
11+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
12+ return result
13
14 def _build_comparison_context(self, cr, uid, ids, data, context=None):
15 if context is None:
16@@ -62,6 +67,7 @@
17 result['fiscalyear'] = 'fiscalyear_id_cmp' in data['form'] and data['form']['fiscalyear_id_cmp'] or False
18 result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
19 result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
20+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
21 if data['form']['filter_cmp'] == 'filter_date':
22 result['date_from'] = data['form']['date_from_cmp']
23 result['date_to'] = data['form']['date_to_cmp']
24@@ -86,7 +92,7 @@
25 return res
26
27 def _print_report(self, cr, uid, ids, data, context=None):
28- 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])
29+ 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])
30 return {
31 'type': 'ir.actions.report.xml',
32 'report_name': 'account.financial.report',