[Fix] mrp :Fix the problem of stock_variation account
bzr revid: sbh@tinyerp.com-20100806140425-9l3ohh4d12gzkoc2
This commit is contained in:
parent
211fa4ee67
commit
84acd55b9d
|
@ -32,7 +32,7 @@ class product_product(osv.osv):
|
|||
@return: dictionary which contains information regarding stock input account, stock output account and stock journal
|
||||
"""
|
||||
product_obj = self.pool.get('product.product').browse(cr, uid, product_id, False)
|
||||
|
||||
res = super(product_product,self).get_product_accounts(cr, uid, product_id, context)
|
||||
stock_input_acc = product_obj.property_stock_account_input and product_obj.property_stock_account_input.id or False
|
||||
if not stock_input_acc:
|
||||
stock_input_acc = product_obj.categ_id.property_stock_account_input_categ and product_obj.categ_id.property_stock_account_input_categ.id or False
|
||||
|
@ -43,7 +43,6 @@ class product_product(osv.osv):
|
|||
|
||||
journal_id = product_obj.categ_id.property_stock_journal and product_obj.categ_id.property_stock_journal.id or False
|
||||
|
||||
res = {}
|
||||
res.update({'stock_account_input': stock_input_acc})
|
||||
res.update({'stock_account_output': stock_output_acc})
|
||||
res.update({'stock_journal': journal_id})
|
||||
|
|
Loading…
Reference in New Issue