Priyesh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-32041-pso into 
lp:openobject-addons/6.0.

Requested reviews:
  nel (nel-tinyerp)
Related bugs:
  Bug #887483 in OpenERP Addons: "Mixed Invoices of Different Currencies in 
Customer/Supplier Payment"
  https://bugs.launchpad.net/openobject-addons/+bug/887483

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-32041-pso/+merge/83934

Hello,

To reproduce the issue, follow the steps:

1. Create 2 invoices with company currency (EUR) for a customer.
2. Create other invoice with other currency rather than company currency (CNY) 
having same customer
3. Validate both invoices
4. Open Customer Payment form and set Payment method having currency CNY
5. Select the customer and It will fetch both journal entries created from 
invoices
6. Set Paid amount and Check the distribution for Amount among voucher lines

Can you please share your views on this ?

If anything is missing, Would you please describe it with your test cases ?

Thanks,
Priyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-32041-pso/+merge/83934
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-32041-pso.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-10-24 07:25:44 +0000
+++ account_voucher/account_voucher.py	2011-11-30 12:33:29 +0000
@@ -509,11 +509,11 @@
             if line.credit:
                 amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency))
                 rs['amount'] = amount
-                total_debit -= amount
+                total_debit -= currency_pool.compute(cr, uid, currency_id, company_currency, amount, context=context_multi_currency)
             else:
                 amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency))
                 rs['amount'] = amount
-                total_credit -= amount
+                total_credit -= currency_pool.compute(cr, uid, currency_id, company_currency, amount, context=context_multi_currency)
 
             default['value']['line_ids'].append(rs)
             if rs['type'] == 'cr':

_______________________________________________
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

Reply via email to