Meera Trambadia (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-account-voucher-rework-fix-mtr into
lp:~openerp/openobject-addons/trunk-account-voucher-rework-qdp.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-voucher-rework-fix-mtr/+merge/72016
account_voucher: Applied patch consisting of a fix for writeoff amount method
to compute correct values under multi-currency scenario
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-voucher-rework-fix-mtr/+merge/72016
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-account-voucher-rework-fix-mtr.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2011-07-15 14:41:26 +0000
+++ account_voucher/account_voucher.py 2011-08-18 11:07:27 +0000
@@ -182,15 +182,16 @@
ctx.update({'date': voucher.date})
for l in voucher.line_dr_ids:
real_amount -= l.amount_in_company_currency
- counter_for_writeoff -= (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency
+ counter_for_writeoff -= (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency
#ctx.update({'date': l.date_original})
#counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx)
counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx)
for l in voucher.line_cr_ids:
real_amount += l.amount_in_company_currency
- counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency
+# counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency
#ctx.update({'date': l.date_original})
#counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx)
+ counter_for_writeoff += (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency
counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx)
writeoff_amount = voucher.amount - counter_for_writeoff
res[voucher.id]['writeoff_amount'] = writeoff_amount
_______________________________________________
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