[FIX]: sale: Fixed error when confirming sale order having lines without product

bzr revid: rpa@tinyerp.com-20101020110617-bqkc4m4sp87asxh4
This commit is contained in:
rpa (Open ERP) 2010-10-20 16:36:17 +05:30
parent d9f36476d5
commit b57746aa19
1 changed files with 3 additions and 2 deletions

View File

@ -940,9 +940,10 @@ class sale_order_line(osv.osv):
'for this product: "%s" (id:%d)') % \
(line.product_id.name, line.product_id.id,))
else:
a = self.pool.get('ir.property').get(cr, uid,
prop = self.pool.get('ir.property').get(cr, uid,
'property_account_income_categ', 'product.category',
context=context).id
context=context)
a = prop and prop.id or False
uosqty = _get_line_qty(line)
uos_id = _get_line_uom(line)
pu = 0.0