[FIX] stock: onchange method should take the description
The onchange_product_id method used to only change the description if the stock.move is not saved yet. That does not make much sense. opw 607347, bug lp:1314700
This commit is contained in:
parent
70b246c3c7
commit
bc4217ced2
|
@ -1939,14 +1939,13 @@ class stock_move(osv.osv):
|
|||
product = self.pool.get('product.product').browse(cr, uid, [prod_id], context=ctx)[0]
|
||||
uos_id = product.uos_id and product.uos_id.id or False
|
||||
result = {
|
||||
'name': product.partner_ref,
|
||||
'product_uom': product.uom_id.id,
|
||||
'product_uos': uos_id,
|
||||
'product_qty': 1.00,
|
||||
'product_uos_qty' : self.pool.get('stock.move').onchange_quantity(cr, uid, ids, prod_id, 1.00, product.uom_id.id, uos_id)['value']['product_uos_qty'],
|
||||
'prodlot_id' : False,
|
||||
}
|
||||
if not ids:
|
||||
result['name'] = product.partner_ref
|
||||
if loc_id:
|
||||
result['location_id'] = loc_id
|
||||
if loc_dest_id:
|
||||
|
|
Loading…
Reference in New Issue