[FIX]account_anglo_saxon : Fix the problem stock move entry in stok output account when prodcut valution is manual.

bzr revid: mma@tinyerp.com-20121106110235-wpzpa1hpg3b9idjh
This commit is contained in:
Jagdish Panchal (Open ERP) 2012-11-06 16:32:35 +05:30 committed by Mayur Maheshwari (OpenERP)
parent aabb0f38fa
commit 44d1708551
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ class account_invoice_line(osv.osv):
if inv.type in ('out_invoice','out_refund'):
for i_line in inv.invoice_line:
if i_line.product_id:
if i_line.product_id and i_line.product_id.valuation == 'real_time':
if inv.type == 'out_invoice':
# debit account dacc will be the output account
# first check the product, if empty check the category
@ -87,7 +87,7 @@ class account_invoice_line(osv.osv):
})
elif inv.type in ('in_invoice','in_refund'):
for i_line in inv.invoice_line:
if i_line.product_id:
if i_line.product_id and i_line.product_id.valuation == 'real_time':
if i_line.product_id.type != 'service':
# get the price difference account at the product
acc = i_line.product_id.property_account_creditor_price_difference and i_line.product_id.property_account_creditor_price_difference.id