[FIX] project_timesheet : variable reference corrected
lp bug: https://launchpad.net/bugs/653032 fixed bzr revid: ach@tinyerp.com-20101004130605-iz181rxj15g5wjfs
This commit is contained in:
parent
863f4f5d99
commit
31b73b77e3
|
@ -112,6 +112,7 @@ class project_work(osv.osv):
|
|||
timesheet_obj = self.pool.get('hr.analytic.timesheet')
|
||||
project_obj = self.pool.get('project.project')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
result = {}
|
||||
|
||||
if isinstance(ids, (long, int)):
|
||||
ids = [ids,]
|
||||
|
@ -139,7 +140,7 @@ class project_work(osv.osv):
|
|||
vals_line['unit_amount'] = vals['hours']
|
||||
prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set
|
||||
|
||||
if result['product_uom_id'] and (not result['product_uom_id'] == default_uom):
|
||||
if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom):
|
||||
vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
|
||||
|
||||
# Compute based on pricetype
|
||||
|
|
Loading…
Reference in New Issue