[REF] project_timesheet

bzr revid: jvo@tinyerp.com-20101008211953-90137gcozrk0wk3s
This commit is contained in:
Jay (OpenERP) 2010-10-09 02:49:53 +05:30
parent d0317628aa
commit 15aca5c64f
1 changed files with 2 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class project_work(osv.osv):
raise osv.except_osv(_('Bad Configuration !'),
_('No journal defined on the related employee.\nFill in the timesheet tab of the employee form.'))
a = emp.product_id.product_tmpl_id.property_account_expense.id
a = emp.product_id.product_tmpl_id.property_account_expense.id
if not a:
a = emp.product_id.categ_id.property_account_expense_categ.id
if not a:
@ -108,7 +108,6 @@ class project_work(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
obj = self.pool.get('hr.analytic.timesheet')
timesheet_obj = self.pool.get('hr.analytic.timesheet')
project_obj = self.pool.get('project.project')
uom_obj = self.pool.get('product.uom')
@ -144,7 +143,7 @@ class project_work(osv.osv):
vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
# Compute based on pricetype
amount_unit = obj.on_change_unit_amount(cr, uid, line_id.id,
amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
prod_id=prod_id,
quantity=vals_line['unit_amount'], unit=False, context=context)