Hello,
Thanks for your review.
As per my investigation the problem comes from account_voucher.
First of all credit side entry is placed due to considering line.untax_amount
which is the amount with tax.
account_voucher.py line 722,
amount = currency_pool.compute(cr, uid, current_currency, company_currency,
line.untax_amount or line.amount, context=context_multi_currency)
For ex. we add tax(included in price) 10% and total amount is 100(90.91 untax +
9.09 tax)
Now current behavior is that it consider line.untax_amount which is 100 and
creating wrong credit entry. and tax entry is posted on the bases of this
credit side entry(100) which will be 9.09.
so,
credit debit
1) 100
2) 9.09
100
9.09(extra entry due to difference)
Current behavior is only considered for tax *not* included in price.
We should maintain both the amount(total amount and amount without tax), so
that entry 1 will be posted for amount without tax and entry 2 will calculate
tax on the basis on total amount. That way we can have balanced entries like,
credit debit
90.91
9.09
100
The solution you suggested,
tax_result = tax_obj.compute_all(cr, uid, [tax_id], total, 1.00)
posts tax entrie(9.09) on the basis of total(100) but before this 100 credit
side entry is already getting created which is wrong entry.
Please share your view on this. Kindly correct me if I am missing something.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17387-rha/+merge/76338
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-17387-rha.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp