SALE: update product_uos_qty if not product

bzr revid: ced-61a732990169cd0ddd35d359023ff0d1d51eb00f
This commit is contained in:
ced 2007-06-12 13:01:17 +00:00
parent 880941c7d8
commit b748754ef9
1 changed files with 1 additions and 1 deletions

View File

@ -642,7 +642,7 @@ class sale_order_line(osv.osv):
lang=self.pool.get('res.partner').read(cr, uid, [partner_id])[0]['lang']
context = {'lang':lang}
if not product:
return {'value': {'price_unit': 0.0, 'notes':'', 'weight' : 0}, 'domain':{'product_uom':[]}}
return {'value': {'price_unit': 0.0, 'notes':'', 'weight' : 0, 'product_uos_qty': qty}, 'domain':{'product_uom':[]}}
if not pricelist:
raise osv.except_osv('No Pricelist !', 'You have to select a pricelist in the sale form !\nPlease set one before choosing a product.')
price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], product, qty or 1.0, partner_id, {'uom': uom})[pricelist]