Hi Jay, I applied this one (Just change the indentation from yours...): === modified file 'account/wizard/wizard_pay_invoice.py' --- account/wizard/wizard_pay_invoice.py 2010-01-20 11:40:27 +0000 +++ account/wizard/wizard_pay_invoice.py 2010-01-22 11:03:01 +0000 @@ -60,14 +60,16 @@ journal = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context) # Compute the amount in company's currency, with the journal currency (which is equal to payment currency) # when it is needed : If payment currency (according to selected journal.currency) is <> from company currency + cur_diff = False if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id: ctx = {'date':data['form']['date']} amount = cur_obj.compute(cr, uid, journal.currency.id, invoice.company_id.currency_id.id, amount, context=ctx) currency_id = journal.currency.id # Put the paid amount in currency, and the currency, in the context if currency is different from company's currency context.update({'amount_currency':form['amount'],'currency_id':currency_id}) - - if invoice.company_id.currency_id.id<>invoice.currency_id.id: + cur_diff = True + # if invoice.company_id.currency_id.id<>invoice.currency_id.id: + if not cur_diff and invoice.company_id.currency_id.id<>invoice.currency_id.id: ctx = {'date':data['form']['date']} amount = cur_obj.compute(cr, uid, invoice.currency_id.id, invoice.company_id.currency_id.id, amount, context=ctx) currency_id = invoice.currency_id.id This pass the last errors, but still get one on the next one: Background: Given I am loged as admin user with password admin used And the company currency is set to EUR And the following currency rate settings are: |code|rate|name| |EUR|1.000|01-01-2009| |CHF|1.644|01-01-2009| |CHF|1.500|09-09-2009| |CHF|0.6547|10-10-2009| |USD|1.3785|01-01-2009| And a cash journal in USD exists And a cash journal in CHF exists And a cash journal in EUR exists Scenario: make_and_validate_payments_with_pay_invoice_wizard Given I have recorded on the 1 jan 2009 a supplier invoice (in_invoice) of 1000,0 CHF without tax called MySupplierInvoicePayWizard When I press the validate button Then I should see the invoice MySupplierInvoicePayWizard open When I call the Pay invoice wizard And I partially pay 200.0 CHF.- on the 10 jan 2009 Then I should see a residual amount of 800.0 CHF.- When I call the Pay invoice wizard And I partially pay 200.0 USD.- on the 11 jan 2009 Then I should see a residual amount of 561.48 CHF.- When I call the Pay invoice wizard And I partially pay 200.0 EUR.- on the 12 jan 2009 Then I should see a residual amount of 232.68 CHF.- BREAKS HERE !!! expected: 232.68, got: 361.48 (using ==) When I call the Pay invoice wizard And I completely pay the residual amount in CHF on the 13 sep 2009 Then I should see a residual amount of 0.0 CHF.- And I should see the invoice MySupplierInvoicePayWizard paid Regards P.S. You can know check it o the new Stable release (0.3) of OERPScenario here : Branch : bzr branch lp:oerpsenario/stable Project : https://launchpad.net/oerpsenario