From 28ede437d9a1b375bfaca49bfa0e9af9ee4775ae Mon Sep 17 00:00:00 2001 From: Christophe Chauvet Date: Fri, 6 Mar 2009 23:18:24 +0100 Subject: [IMP] * add missing tools.translate * translate all missing raise * add encoding: utf-8 in missing file * add vim comment (when missing) at the end of file * convert tabs to spaces (PEP8 Compliant) * more pythonic when concatenate value bzr revid: christophe.chauvet@syleam.fr-20090306221824-xt1oeip60sq8fwws --- addons/analytic_user_function/analytic_user_function.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'addons/analytic_user_function/analytic_user_function.py') diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index ba99465579e..1f630053864 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -21,6 +21,7 @@ ############################################################################## from osv import fields,osv from osv import orm +from tools.translate import _ class analytic_user_funct_grid(osv.osv): @@ -94,9 +95,9 @@ class hr_analytic_timesheet(osv.osv): if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv('Error !', - 'There is no expense account define ' \ - 'for this product: "%s" (id:%d)' % \ + raise osv.except_osv(_('Error !'), + _('There is no expense account define ' \ + 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) amount = unit_amount * self.pool.get('product.uom')._compute_price(cr, uid, r.product_id.uom_id.id, r.product_id.standard_price, False) @@ -127,9 +128,9 @@ class hr_analytic_timesheet(osv.osv): if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv('Error !', - 'There is no expense account define ' \ - 'for this product: "%s" (id:%d)' % \ + raise osv.except_osv(_('Error !'), + _('There is no expense account define ' \ + 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) amount = unit_amount * r.product_id.uom_id._compute_price(cr, uid, r.product_id.uom_id.id, r.product_id.standard_price, False) -- cgit v1.2.3