diff --git a/addons/account/report/account_central_journal.py b/addons/account/report/account_central_journal.py index 4e28e2d5140..6ab5b38d03d 100644 --- a/addons/account/report/account_central_journal.py +++ b/addons/account/report/account_central_journal.py @@ -72,15 +72,15 @@ class journal_print(report_sxw.rml_parse, common_report_header): if self.target_move == 'posted': move_state = ['posted'] - self.cr.execute('SELECT a.currency_id, a.code, a.name, c.code AS currency_code, l.currency_id, l.amount_currency, SUM(debit) AS debit, SUM(credit) AS credit \ + self.cr.execute('SELECT a.currency_id, a.code, a.name, c.symbol AS currency_code, l.currency_id, l.amount_currency, SUM(debit) AS debit, SUM(credit) AS credit \ from account_move_line l \ LEFT JOIN account_move am ON (l.move_id=am.id) \ LEFT JOIN account_account a ON (l.account_id=a.id) \ - LEFT JOIN res_currency c on (l.currency_id=c.id) WHERE am.state IN %s AND l.period_id=%s AND l.journal_id=%s '+self.query_get_clause+' GROUP BY a.id, a.code, a.name,l.amount_currency,c.code, a.currency_id,l.currency_id', (tuple(move_state), period_id, journal_id)) + LEFT JOIN res_currency c on (l.currency_id=c.id) WHERE am.state IN %s AND l.period_id=%s AND l.journal_id=%s '+self.query_get_clause+' GROUP BY a.id, a.code, a.name,l.amount_currency,c.symbol, a.currency_id,l.currency_id', (tuple(move_state), period_id, journal_id)) return self.cr.dictfetchall() def _set_get_account_currency_code(self, account_id): - self.cr.execute("SELECT c.code as code "\ + self.cr.execute("SELECT c.symbol as code "\ "FROM res_currency c,account_account as ac "\ "WHERE ac.id = %s AND ac.currency_id = c.id"%(account_id)) result = self.cr.fetchone() diff --git a/addons/account/report/account_general_journal.py b/addons/account/report/account_general_journal.py index 843bedaaf63..4a20ac9ebc4 100644 --- a/addons/account/report/account_general_journal.py +++ b/addons/account/report/account_general_journal.py @@ -87,19 +87,19 @@ class journal_print(report_sxw.rml_parse, common_report_header): move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] - self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.code AS currency_code,l.currency_id, ' + self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.symbol AS currency_code,l.currency_id, ' 'SUM(l.debit) AS debit, SUM(l.credit) AS credit ' 'FROM account_move_line l ' 'LEFT JOIN account_move am ON (l.move_id=am.id) ' 'LEFT JOIN account_journal j ON (l.journal_id=j.id) ' 'LEFT JOIN res_currency c on (l.currency_id=c.id)' 'WHERE am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' ' - 'GROUP BY j.id, j.code, j.name, l.amount_currency, c.code, l.currency_id ', + 'GROUP BY j.id, j.code, j.name, l.amount_currency, c.symbol, l.currency_id ', (tuple(move_state), period_id, tuple(self.journal_ids))) return self.cr.dictfetchall() def _set_get_account_currency_code(self, account_id): - self.cr.execute("SELECT c.code AS code "\ + self.cr.execute("SELECT c.symbol AS code "\ "FROM res_currency c, account_account AS ac "\ "WHERE ac.id = %s AND ac.currency_id = c.id" % (account_id)) result = self.cr.fetchone() diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index ab7b6211064..a53da3fc08e 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -126,7 +126,7 @@ class journal_print(report_sxw.rml_parse, common_report_header): return obj_mline.browse(self.cr, self.uid, ids) def _set_get_account_currency_code(self, account_id): - self.cr.execute("SELECT c.code AS code "\ + self.cr.execute("SELECT c.symbol AS code "\ "FROM res_currency c,account_account AS ac "\ "WHERE ac.id = %s AND ac.currency_id = c.id" % (account_id)) result = self.cr.fetchone() diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py index e0b0713c614..f0f6030b0f3 100644 --- a/addons/account_payment/report/payment_order.py +++ b/addons/account_payment/report/payment_order.py @@ -70,7 +70,7 @@ class payment_order(report_sxw.rml_parse): def _get_company_currency(self): pool = pooler.get_pool(self.cr.dbname) user = pool.get('res.users').browse(self.cr, self.uid, self.uid) - return user.company_id and user.company_id.currency_id and user.company_id.currency_id.code or False + return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False def _get_company_currency_symbol(self): pool = pooler.get_pool(self.cr.dbname) diff --git a/addons/auction/report/buyer_list.rml b/addons/auction/report/buyer_list.rml index 4ac6e6694e1..c5e9ef9ca7b 100644 --- a/addons/auction/report/buyer_list.rml +++ b/addons/auction/report/buyer_list.rml @@ -75,13 +75,13 @@ Lot - Adj.([[ company.currency_id.code ]]) + Adj.([[ company.currency_id.symbol ]]) Buyer costs([[ o['amount' ]*100 ]]%) - To pay ([[ company.currency_id.code ]]) + To pay ([[ company.currency_id.symbol ]]) diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py index ae16f260876..8f16a491bc7 100644 --- a/addons/base_setup/todo.py +++ b/addons/base_setup/todo.py @@ -164,8 +164,8 @@ class res_currency(osv.osv): return [] if isinstance(ids, (int, long)): ids = [ids] - reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write') - return [(x['id'], tools.ustr(x['name']) + ' (' + tools.ustr(x['code']) + ')') for x in reads] + reads = self.read(cr, uid, ids, ['name','symbol'], context, load='_classic_write') + return [(x['id'], tools.ustr(x['name']) + ' (' + tools.ustr(x['symbol']) + ')') for x in reads] res_currency() diff --git a/addons/hr_payroll/report/payslip.rml b/addons/hr_payroll/report/payslip.rml index cdbbe6bd5f4..18a2bc7230c 100755 --- a/addons/hr_payroll/report/payslip.rml +++ b/addons/hr_payroll/report/payslip.rml @@ -505,13 +505,13 @@ - Total Earnings([[ o.company_id and o.company_id.currency_id.code or '' ]]) + Total Earnings([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) [[ formatLang(o.allounce + o.basic) ]] [[ o.company_id and o.company_id.currency_id.symbol ]] - Total Deductions([[ o.company_id and o.company_id.currency_id.code or '' ]]) + Total Deductions([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) [[ formatLang(o.deduction) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] @@ -558,7 +558,7 @@ - Net Amount([[ o.company_id and o.company_id.currency_id.code or '' ]]) + Net Amount([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) [[ formatLang(o.net) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] diff --git a/addons/hr_payroll/report/report_payroll_advice.rml b/addons/hr_payroll/report/report_payroll_advice.rml index 8fe18772c2f..c879a362228 100644 --- a/addons/hr_payroll/report/report_payroll_advice.rml +++ b/addons/hr_payroll/report/report_payroll_advice.rml @@ -257,7 +257,7 @@ - Total([[ company.currency_id.code ]]): + Total([[ company.currency_id.symbol ]]): [[ formatLang(get_total()) ]] [[ company.currency_id.symbol ]] diff --git a/addons/l10n_ch/report/bvr_invoice_report.rml b/addons/l10n_ch/report/bvr_invoice_report.rml index 46798ae7da4..ee69eedee2e 100755 --- a/addons/l10n_ch/report/bvr_invoice_report.rml +++ b/addons/l10n_ch/report/bvr_invoice_report.rml @@ -241,7 +241,7 @@ [[ round(l.discount) ]] - [[ comma_me(l.price_subtotal) ]] [[o.currency_id.code ]] + [[ comma_me(l.price_subtotal) ]] [[o.currency_id.symbol ]] @@ -293,7 +293,7 @@ Total (excl. taxes): - [[ comma_me(o.amount_untaxed) ]] [[o.currency_id.code ]] + [[ comma_me(o.amount_untaxed) ]] [[o.currency_id.symbol ]] @@ -301,7 +301,7 @@ Taxes: - [[ comma_me(o.amount_tax) ]] [[o.currency_id.code ]] + [[ comma_me(o.amount_tax) ]] [[o.currency_id.symbol ]] @@ -309,7 +309,7 @@ Total (incl. taxes): - [[ comma_me(o.amount_total) ]] [[o.currency_id.code ]] + [[ comma_me(o.amount_total) ]] [[o.currency_id.symbol ]] diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py index d3e2856387d..5de49008ae2 100644 --- a/addons/l10n_ch/wizard/create_dta.py +++ b/addons/l10n_ch/wizard/create_dta.py @@ -405,7 +405,7 @@ def _create_dta(obj, cr, uid, data, context=None): v['sequence'] = str(seq).rjust(5).replace(' ', '0') v['amount_to_pay']= str(pline.amount_currency).replace('.', ',') v['number'] = pline.name - v['currency'] = pline.currency.code + v['currency'] = pline.currency.symbol v['partner_bank_name'] = pline.bank_id.bank.name or False v['partner_bank_clearing'] = pline.bank_id.bank.clearing or False diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 52bcf3bcd4a..53271ef68fc 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -120,7 +120,7 @@ class report_custom(report_rml): %s - """ % (_('Work Center name'), _('Cycles Cost')+'('+company_currency.code+')', _('Hourly Cost')+'('+company_currency.code+')',_('Work Cost')+'('+company_currency.code+')') + """ % (_('Work Center name'), _('Cycles Cost')+'('+company_currency.symbol+')', _('Hourly Cost')+'('+company_currency.symbol+')',_('Work Cost')+'('+company_currency.symbol+')') prod_header = """ %s @@ -129,7 +129,7 @@ class report_custom(report_rml): %s %s - """ % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom')+'('+company_currency.code+')', _('Supplier Price per Uom')+'('+company_currency.code+')') + """ % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom')+'('+company_currency.symbol+')', _('Supplier Price per Uom')+'('+company_currency.symbol+')') purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') @@ -149,7 +149,7 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: + """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.symbol+')'+ """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -176,7 +176,7 @@ class report_custom(report_rml): xml += "" + xml_tmp + '' xml += """ - """ + _('Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'(' + company_currency.code +')'+ """: + """ + _('Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'(' + company_currency.symbol +')'+ """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -193,14 +193,14 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+""": + """ + _('Work Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.symbol+')'+""": """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ - """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: + """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.symbol+')'+ """: """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index 08a1ab14fe0..ac9eeef69c3 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -330,7 +330,7 @@
[[ repeatIn(o.invoice_line,'l') ]] - + [[ l.name ]] @@ -360,7 +360,7 @@ [[ formatLang(l.price_subtotal) ]] - [[ o.currency_id.code ]] + [[ o.currency_id.symbol ]] @@ -437,7 +437,7 @@ - + Total (excl. taxes): @@ -446,14 +446,14 @@ [[ formatLang(o.amount_untaxed) ]] - [[ o.currency_id.code ]] + [[ o.currency_id.symbol ]] - + Taxes: @@ -462,14 +462,14 @@ [[ formatLang(o.amount_tax) ]] - [[ o.currency_id.code ]] + [[ o.currency_id.symbol ]] - + Total (inclu. taxes): @@ -478,7 +478,7 @@ [[ formatLang(o.amount_total) ]] - [[ o.currency_id.code ]] + [[ o.currency_id.symbol ]]