Ravi Gohil (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-578234-rgo 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-578234-rgo/+merge/120337
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.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578234-rgo/+merge/120337
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-578234-rgo.
=== modified file 'account_followup/report/account_followup_print.py'
--- account_followup/report/account_followup_print.py 2011-12-19 16:54:40 +0000
+++ account_followup/report/account_followup_print.py 2012-08-20 06:57:39 +0000
@@ -52,8 +52,6 @@
def _lines_get(self, stat_by_partner_line):
pool = pooler.get_pool(self.cr.dbname)
moveline_obj = pool.get('account.move.line')
- company_obj = pool.get('res.company')
- obj_currency = pool.get('res.currency')
movelines = moveline_obj.search(self.cr, self.uid,
[('partner_id', '=', stat_by_partner_line.partner_id.id),
('account_id.type', '=', 'receivable'),
@@ -66,17 +64,16 @@
for line in movelines:
if line.currency_id and (not line.currency_id.id in line_cur):
line_cur[line.currency_id.id] = {'line': []}
- currency = line.currency_id or line.company_id.currency_id
line_data = {
'name': line.move_id.name,
'ref': line.ref,
'date':line.date,
'date_maturity': line.date_maturity,
- 'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),
+ 'balance': line.invoice.currency_id.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),
'blocked': line.blocked,
- 'currency_id': currency.symbol or currency.name,
+ 'currency_id': line.invoice.currency_id,
}
- line_cur[currency.id]['line'].append(line_data)
+ line_cur[line.invoice.currency_id.id]['line'].append(line_data)
for cur in line_cur:
if line_cur[cur]['line']:
=== modified file 'account_followup/report/account_followup_print.rml'
--- account_followup/report/account_followup_print.rml 2011-12-21 09:08:11 +0000
+++ account_followup/report/account_followup_print.rml 2012-08-20 06:57:39 +0000
@@ -199,7 +199,7 @@
<para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'], date=True) ]]</para>
</td>
<td>
- <para style="terp_default_Right_9">[[ formatLang(line['balance']) ]] [[ line['currency_id'] ]]</para>
+ <para style="terp_default_Right_9">[[ formatLang(line['balance'], dp='Account', currency_obj=line['currency_id']) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
@@ -217,7 +217,7 @@
<para style="terp_tblheader_Details_Centre">Total: </para>
</td>
<td>
- <para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['balance'], cur_lines['line'], 0.00)) ]] [[ line['currency_id'] ]] </para>
+ <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>
</td>
<td>
<para style="terp_default_Right_9">
_______________________________________________
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