[MERGE] lp:869556

bzr revid: rco@openerp.com-20111019101318-8qvk0wdbemxge2yp
This commit is contained in:
Raphael Collet 2011-10-19 12:13:18 +02:00
commit a59a30a088
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class purchase_order(osv.osv):
def inv_line_create(self, cr, uid, a, ol):
line = super(purchase_order, self).inv_line_create(cr, uid, a, ol)
if ol.product_id:
if ol.product_id and not ol.product_id.type == 'service':
oa = ol.product_id.property_stock_account_input and ol.product_id.property_stock_account_input.id
if not oa:
oa = ol.product_id.categ_id.property_stock_account_input_categ and ol.product_id.categ_id.property_stock_account_input_categ.id