[MERGE] [FIX] warning: modify onchange behaviour for purchase.order.line to match the one of original purchase.order.line: when removing product, keeps other information instead of setting it to blank. Had the side effet to make impossible to select a unit of measure (required field) without a product (not mandatory)

bzr revid: mat@openerp.com-20131121164723-02617zye2qnekahz
This commit is contained in:
Martin Trigaux 2013-11-21 17:47:23 +01:00
commit 50121cc659
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ class purchase_order_line(osv.osv):
name=False, price_unit=False, notes=False, context=None):
warning = {}
if not product:
return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'notes': notes or '', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
product_obj = self.pool.get('product.product')
product_info = product_obj.browse(cr, uid, product)
title = False