diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-06-12 17:15:34 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-06-12 17:15:34 +0200 |
| commit | bd10a9471d9ba52f0dc2b81e8811741c80b59385 (patch) | |
| tree | bae68616fc2d3648e418a3f5dc43cdcc93b77b31 /addons/analytic_user_function/analytic_user_function.py | |
| parent | 283838cca8afe5f45ecdbceb4cea31f30f5b0024 (diff) | |
| parent | e532701d28d63fba37df3149e89804630f14f999 (diff) | |
[MERGE] sync
bzr revid: mat@openerp.com-20130612151534-294ch1a1apeca3nu
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function.py')
| -rw-r--r-- | addons/analytic_user_function/analytic_user_function.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index ec2aa1688d6..1adefb2d59d 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -42,12 +42,12 @@ class analytic_user_funct_grid(osv.osv): return {} value = {} + if product_id: + prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context) emp = emp_obj.browse(cr, uid, emp_id[0], context=context) if emp.product_id and not product_id: value['product_id'] = emp.product_id.id prod = emp.product_id - if product_id: - prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context) if prod: value['price'] = prod.list_price value['uom_id'] = prod.uom_id.id @@ -104,7 +104,7 @@ class hr_analytic_timesheet(osv.osv): 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 ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) # Compute based on pricetype @@ -133,7 +133,7 @@ class hr_analytic_timesheet(osv.osv): 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 ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) # Compute based on pricetype |
