Comment 20 for bug 496889

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi,

I try it, but still get an error :

  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.-
      expected: 561.48,
           got: 561.0 (using ==)

       Diff:
      @@ -1,2 +1,2 @@
      -561.48
      +561.0
       (Spec::Expectations::ExpectationNotMetError)
      ./features/account/wizard/step_definitions/wizard_pay_invoice.rb:78:in `/^I should see a residual amount of (.*) (\w+)\.\-$/'
      features/account/wizard/pay_invoice.feature:26:in `Then I should see a residual amount of 561.48 CHF.-'

What is strange is that, doing the same test without your patch, get the following :

    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
*********** OpenERP Server ERROR:
            Traceback (most recent call last):
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/service/web_services.py", line 633, in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/service/web_services.py", line 613, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/wizard/__init__.py", line 177, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/wizard/__init__.py", line 156, in execute_cr
    self.abortResponse(2, e.name, 'warning', e.value)
  File "/Users/jgrandguillaume/c2c/Code/Official/5.0stable/server/bin/netsvc.py", line 58, in abortResponse
    raise Exception("%s -- %s\n\n%s"%(origin, description, details))
Exception: warning -- Error

Couldn't create move with currency different from the secondary currency of the account "1024 - Compte en devise A". Clear the secondary currency field of the account definition if you want to accept all currencies.

This is may be another bug from the actual stable version. Could you confirm you have the same trouble ?

Remember, I set journal in the wizard with a currency on the account (USD), on the journal (USD) and the company is in EUR.

Thanks and regards,