diff options
| author | Atul Patel (OpenERP) <atp@tinyerp.com> | 2013-06-12 17:28:36 +0530 |
|---|---|---|
| committer | Atul Patel (OpenERP) <atp@tinyerp.com> | 2013-06-12 17:28:36 +0530 |
| commit | a003381647a017f00b7e589d8d3a129d323811bb (patch) | |
| tree | 2a4f1bf317541aaab811109bfd466964fdfb96d1 /addons/analytic_user_function/analytic_user_function.py | |
| parent | 39b952466d90ec86d89f58bfaffcd70b376ec82a (diff) | |
| parent | 70f16ce73b0dab305b9e7d63a74416cbcb0448da (diff) | |
[MERGE]: Merged with addons
bzr revid: atp@tinyerp.com-20130612115836-cvsgd903an5szcy1
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 |
