Merge lp:~sbi/ocb-addons/trunk-bug1101811 into lp:ocb-addons

Proposed by Stéphane Bidoul (Acsone) on 2013-02-24
Status: Merged
Merged at revision: 8762
Proposed branch: lp:~sbi/ocb-addons/trunk-bug1101811
Merge into: lp:ocb-addons
Diff against target: 21 lines (+2/-2)
1 file modified
account/report/account_financial_report.py (+2/-2)
To merge this branch: bzr merge lp:~sbi/ocb-addons/trunk-bug1101811
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) 2013-02-24 Approve on 2013-02-25
Review via email: mp+150250@code.launchpad.net

Description of the change

Resubmitting following comment from Stephan Rijnhart about -0.0

Original review here: https://code.launchpad.net/~sbi/ocb-addons/trunk-bug1101811/+merge/150192

To post a comment you must log in.

Thanks for the update, and for adapting the MP on the official branches too!

review: Approve
Stéphane Bidoul (Acsone) (sbi) wrote :

You're welcome. IMHO, all MPs on ocb branches MUST have equivalent MPs on the official branches. Otherwise ocb is at risk of becoming a fork with a different behaviour.

That is why I checked, glad you agree!

Interestingly, your MP on the official branch was merged today. As the ocb-addons only contained the previous version of this MP, this halted the automatic branch synchronization process (for the first one, I must say). I merged this branch just now, mainly because it was the easiest way to get the synchronization back up and running.

At least OpenERP SA merged the reviewed and improved branch ;-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_financial_report.py'
2--- account/report/account_financial_report.py 2013-01-19 15:14:25 +0000
3+++ account/report/account_financial_report.py 2013-02-24 23:01:24 +0000
4@@ -65,7 +65,7 @@
5 vals['debit'] = report.debit
6 vals['credit'] = report.credit
7 if data['form']['enable_filter']:
8- vals['balance_cmp'] = self.pool.get('account.financial.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance * report.sign
9+ vals['balance_cmp'] = self.pool.get('account.financial.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance * report.sign or 0.0
10 lines.append(vals)
11 account_ids = []
12 if report.display_detail == 'no_detail':
13@@ -97,7 +97,7 @@
14 if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance']):
15 flag = True
16 if data['form']['enable_filter']:
17- vals['balance_cmp'] = account_obj.browse(self.cr, self.uid, account.id, context=data['form']['comparison_context']).balance * report.sign
18+ vals['balance_cmp'] = account_obj.browse(self.cr, self.uid, account.id, context=data['form']['comparison_context']).balance * report.sign or 0.0
19 if not currency_obj.is_zero(self.cr, self.uid, account.company_id.currency_id, vals['balance_cmp']):
20 flag = True
21 if flag: