[FIX] account : [Anglo-Saxon Accounting] Purchase of Service Line - wrong accounting entries
lp bug: https://launchpad.net/bugs/869556 fixed bzr revid: bde@tinyerp.com-20111010124917-l3mu50huehusfhnv
This commit is contained in:
parent
f0eed5901f
commit
604d152b53
|
@ -29,6 +29,9 @@ 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.type == 'service':
|
||||
oa = ol.product_id.categ_id.property_account_expense_categ and ol.product_id.categ_id.property_account_expense_categ.id
|
||||
else:
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue