← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 697110] Re: [6.0-rc2] Account problem

 

Hi there!

I'm afraid I see no fix in addons3... I might be wrong, though.

However, the failure is due the following issue:
Problem:
the test provides both a date and a currency, which triggers the "currency rate check" (not sure how it is called) therefore, if we are in a live environment, we get an error: currency rate not existing for the period!! teh test just fails with a generic error.

Solution:
take out the currency, as it comes by default anyway, and it is not really relevant for the test.

Remark: 
most of other tests which do have currency_id: base.EUR lack the date, therefore the check is not fired (I guess).
however, I think it is more consistent to take out the currency and ot the date from this test.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/697110

Title:
  [6.0-rc2] Account problem

Status in OpenObject Addons Modules:
  Fix Released

Bug description:
  Hello all,

  I just updated my code to the last versions of server, addons and web.
  I then began to create a new database. After haven choosen the
  applications to install, I get several errors messages. The most
  important is the one from the accounting :

  2011-01-04 08:49:01,329][mwp_25] INFO:init:module account: loading test/account_customer_invoice.yml
  [2011-01-04 08:49:01,464][mwp_25] ERROR:tests.account:('warning', 'Error')
  Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 725, in process
      self._process_node(node)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 759, in _process_node
      self.process_workflow({node: []})
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 452, in process_workflow
      wf_service.trg_validate(uid, workflow.model, id, workflow.action, self.cr)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_service.py", line 80, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 174, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 182, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 107, in _execute
      wkf_expr.execute(cr, ident, workitem, activity)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/safe_eval.py", line 281, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 181, in <lambda>
      return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/invoice.py", line 854, in action_move_create
      total, total_currency, iml = self.compute_invoice_totals(cr, uid, inv, company_currency, ref, iml)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/invoice.py", line 750, in compute_invoice_totals
      context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_currency.py", line 119, in compute
      rate = self._get_conversion_rate(cr, uid, from_currency, to_currency, context=context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/res_currency.py", line 30, in _get_conversion_rate
      rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_currency.py", line 102, in _get_conversion_rate
      'at the date: %s') % (currency_symbol, date))
  except_osv: ('warning', 'Error')
  [2011-01-04 08:49:01,465][mwp_25] ERROR:test:Tests failed to execute in module account
  Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/__init__.py", line 665, in load_test
      _load_data(cr, module_name, id_map, mode, 'test')
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/__init__.py", line 688, in _load_data
      tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 790, in yaml_import
      yaml_interpreter.process(yaml_string)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 725, in process
      self._process_node(node)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 759, in _process_node
      self.process_workflow({node: []})
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 452, in process_workflow
      wf_service.trg_validate(uid, workflow.model, id, workflow.action, self.cr)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_service.py", line 80, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 174, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 182, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/workitem.py", line 107, in _execute
      wkf_expr.execute(cr, ident, workitem, activity)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/safe_eval.py", line 281, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 181, in <lambda>
      return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/invoice.py", line 854, in action_move_create
      total, total_currency, iml = self.compute_invoice_totals(cr, uid, inv, company_currency, ref, iml)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/invoice.py", line 750, in compute_invoice_totals
      context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_currency.py", line 119, in compute
      rate = self._get_conversion_rate(cr, uid, from_currency, to_currency, context=context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/res_currency.py", line 30, in _get_conversion_rate
      rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_currency.py", line 102, in _get_conversion_rate
      'at the date: %s') % (currency_symbol, date))
  except_osv: ('warning', 'Error')





References