if product_id:
product=self.pool.get('product.product').browse(cr,uid,product_id, context=context)
v['name']=product.name
-
+
# Compute based on pricetype of employee company
pricetype_id = self.pool.get('hr.employee').browse(cr,uid,employee_id).user_id.company_id.property_valuation_price_type.id
+ context['currency_id']=self.pool.get('hr.employee').browse(cr,uid,employee_id).user_id.company_id.currency_id.id
pricetype=self.pool.get('product.price.type').browse(cr,uid,pricetype_id)
amount_unit=product.price_get(pricetype.field, context)[product.id]
-
+
v['unit_amount']=amount_unit
if not uom_id:
v['uom_id']=product.uom_id.id