Merge lp:~openerp-dev/openobject-addons/6.1-opw-578234-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-578234-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 55 lines (+5/-8)
2 files modified
account_followup/report/account_followup_print.py (+3/-6)
account_followup/report/account_followup_print.rml (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578234-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+120337@code.launchpad.net

Description of the change

Hello,

Irrespective of currency setting, currency symbol always shown after the amount in pdf report generated for account folloup.

This fix fixes this issue, kindly review the fix.

Note: For now, I am leaving the account_folloup_print.sxw file unchanged as I found it different(it seems it wasn't kept up-to-date as per it's respective .rml) from what it should be after checking it's respective .rml file.

Thanks.

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

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). 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

6953. By Ravi Gohil (OpenERP)

[FIX] account_followup: Currency symbol always stays after the amount in .pdf report, irrespective of currency setting: (Maintenance Case : 578234)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_followup/report/account_followup_print.py'
2--- account_followup/report/account_followup_print.py 2011-12-19 16:54:40 +0000
3+++ account_followup/report/account_followup_print.py 2012-08-20 06:57:39 +0000
4@@ -52,8 +52,6 @@
5 def _lines_get(self, stat_by_partner_line):
6 pool = pooler.get_pool(self.cr.dbname)
7 moveline_obj = pool.get('account.move.line')
8- company_obj = pool.get('res.company')
9- obj_currency = pool.get('res.currency')
10 movelines = moveline_obj.search(self.cr, self.uid,
11 [('partner_id', '=', stat_by_partner_line.partner_id.id),
12 ('account_id.type', '=', 'receivable'),
13@@ -66,17 +64,16 @@
14 for line in movelines:
15 if line.currency_id and (not line.currency_id.id in line_cur):
16 line_cur[line.currency_id.id] = {'line': []}
17- currency = line.currency_id or line.company_id.currency_id
18 line_data = {
19 'name': line.move_id.name,
20 'ref': line.ref,
21 'date':line.date,
22 'date_maturity': line.date_maturity,
23- 'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),
24+ 'balance': line.invoice.currency_id.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),
25 'blocked': line.blocked,
26- 'currency_id': currency.symbol or currency.name,
27+ 'currency_id': line.invoice.currency_id,
28 }
29- line_cur[currency.id]['line'].append(line_data)
30+ line_cur[line.invoice.currency_id.id]['line'].append(line_data)
31
32 for cur in line_cur:
33 if line_cur[cur]['line']:
34
35=== modified file 'account_followup/report/account_followup_print.rml'
36--- account_followup/report/account_followup_print.rml 2011-12-21 09:08:11 +0000
37+++ account_followup/report/account_followup_print.rml 2012-08-20 06:57:39 +0000
38@@ -199,7 +199,7 @@
39 <para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'], date=True) ]]</para>
40 </td>
41 <td>
42- <para style="terp_default_Right_9">[[ formatLang(line['balance']) ]] [[ line['currency_id'] ]]</para>
43+ <para style="terp_default_Right_9">[[ formatLang(line['balance'], dp='Account', currency_obj=line['currency_id']) ]]</para>
44 </td>
45 <td>
46 <para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
47@@ -217,7 +217,7 @@
48 <para style="terp_tblheader_Details_Centre">Total: </para>
49 </td>
50 <td>
51- <para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['balance'], cur_lines['line'], 0.00)) ]] [[ line['currency_id'] ]] </para>
52+ <para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['balance'], cur_lines['line'], 0.00), dp='Account', currency_obj=line['currency_id']) ]] </para>
53 </td>
54 <td>
55 <para style="terp_default_Right_9">