[FIX]purchase_requisition:small change in onchange_product_id method
bzr revid: mso@mso-20100520111036-i6f05dgllwr9ecyx
This commit is contained in:
parent
035cfdc75f
commit
129cfb4572
|
@ -93,22 +93,17 @@ class purchase_requisition_line(osv.osv):
|
|||
@param product_id: Changed product_id
|
||||
@return: Dictionary of changed values
|
||||
"""
|
||||
value = {}
|
||||
|
||||
value = {'product_uom_id': ''}
|
||||
if product_id:
|
||||
prod = self.pool.get('product.product').browse(cr, uid, [product_id])[0]
|
||||
value = {'product_uom_id': prod.uom_id.id}
|
||||
if product_uom_id != prod.uom_id.id:
|
||||
value = {'product_uom_id': prod.uom_id.id}
|
||||
return {'value': value}
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
|
||||
purchase_requisition_line()
|
||||
|
||||
|
||||
class purchase_order(osv.osv):
|
||||
_inherit = "purchase.order"
|
||||
_columns = {
|
||||
|
|
Loading…
Reference in New Issue