diff options
| author | Christophe Chauvet <christophe.chauvet@syleam.fr> | 2009-03-06 23:18:24 +0100 |
|---|---|---|
| committer | Christophe Chauvet <christophe.chauvet@syleam.fr> | 2009-03-06 23:18:24 +0100 |
| commit | 28ede437d9a1b375bfaca49bfa0e9af9ee4775ae (patch) | |
| tree | bff48deeb75799db2a137e027d77c3ecba09b5a6 /addons/analytic_user_function | |
| parent | 11b72020eead2146d1f1d9c22f8e5c6ccbca964c (diff) | |
[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
Diffstat (limited to 'addons/analytic_user_function')
| -rw-r--r-- | addons/analytic_user_function/analytic_user_function.py | 13 |
1 files changed, 7 insertions, 6 deletions
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) |
