[IMP]: Replace currency code with currency symbol.
bzr revid: rch@tinyerp.com-20101118122459-8wxos4t4lsifc840
This commit is contained in:
parent
46571ed5a7
commit
ad917be442
|
@ -312,7 +312,7 @@ class account_account(osv.osv):
|
|||
def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}):
|
||||
result = {}
|
||||
for rec in self.browse(cr, uid, ids, context):
|
||||
result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.code)
|
||||
result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.symbol)
|
||||
return result
|
||||
|
||||
def _get_child_ids(self, cr, uid, ids, field_name, arg, context={}):
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</record>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" string="The currency unit of Test invoice 1 is EUR">
|
||||
<test expr="currency_id.code">EUR</test>
|
||||
<test expr="currency_id.symbol">€</test>
|
||||
</assert>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" severity="error" string="The amount of Test invoice 1 is correct">
|
||||
|
|
|
@ -1232,7 +1232,7 @@ class account_invoice(osv.osv):
|
|||
if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id:
|
||||
self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
|
||||
else:
|
||||
code = invoice.currency_id.code
|
||||
code = invoice.currency_id.symbol
|
||||
# TODO: use currency's formatting function
|
||||
msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \
|
||||
(name, pay_amount, code, invoice.amount_total, code, total, code)
|
||||
|
|
|
@ -301,7 +301,7 @@
|
|||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.symbol or '' ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
|
|
|
@ -136,7 +136,7 @@ class common_report_header(object):
|
|||
|
||||
def _get_currency(self, data):
|
||||
if data.get('form', False) and data['form'].get('chart_account_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol
|
||||
return ''
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue