summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@tinyerp.com>2009-03-19 15:55:51 +0100
committerStephane Wirtel <stephane@tinyerp.com>2009-03-19 15:55:51 +0100
commit0f5795da3e77c6fd7463acf90f39d21dff575a3c (patch)
tree474fa5a4f81162c0091411b7193fbfb1fe5e79bb /addons/analytic_user_function
parent92cdbaded28b0c5ae623ef908879c4e9d0f750a4 (diff)
parent28ede437d9a1b375bfaca49bfa0e9af9ee4775ae (diff)
[MERGE] From Christophe Chauvet (Sylëam)
[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: stephane@tinyerp.com-20090319145551-knhkfderl68ezvjz
Diffstat (limited to 'addons/analytic_user_function')
-rw-r--r--addons/analytic_user_function/analytic_user_function.py13
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)