[6.0-rc2] Account problem

Bug #697110 reported by forstera
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

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')

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

It's probably related to a bad installation. Can you check your installation and put a full traceback ?

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote : Re: [Bug 697110] Re: [6.0-rc2] Account problem

ok, I will re-install the whole and check again...

Le 04.01.2011 09:03, Fabien (Open ERP) a écrit :
> It's probably related to a bad installation. Can you check your
> installation and put a full traceback ?
>

--

Meilleures salutations*

**MW Programmation SA*
Arnaud Forster
Rue Charles Schäublin 2
2735 Malleray-Bévilard

Tél. (+41).032.491.65.30
Fax (+41).032.491.65.35

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :

ok, I reinstall the whole with last revisions. The error still occurs. I join to this post the trace files of the instlallations and the creation of a new database.

Thanks

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :
Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

I have installed accounting application with latest server, addons, web. Did not find the problem.

Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Hello Arnaud,

I have checked the issue with latest revision but I am not getting any error.
As said in comment #1,I recommend you to re-install and check again.

Thanks

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :

ok, I'll dot it again,

  Thanks

Le 05.01.2011 14:19, Jas(OpenERP) a écrit :
> Hello Arnaud,
>
> I have checked the issue with latest revision but I am not getting any error.
> As said in comment #1,I recommend you to re-install and check again.
>
> Thanks
>
> ** Changed in: openobject-addons
> Status: New => Invalid
>

--

Meilleures salutations*

**MW Programmation SA*
Arnaud Forster
Rue Charles Schäublin 2
2735 Malleray-Bévilard

Tél. (+41).032.491.65.30
Fax (+41).032.491.65.35

Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Steps to reproduce :

1) Create new db with demo data.
2) Change the default currency type.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: Invalid → Confirmed
Changed in openobject-addons:
milestone: none → 6.0
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello forstera,

I have checked the above problem on trunk addons (It seems it is yaml problem) and i am getting same error. Now i tested it with Addons3 (Development) branch it is not creating trouble while installing accounting application because we made some changes on yaml recent days in addons3 branch.

So i make this bug fix for now, and addons3 branch merged with trunk soon.

Thanks,
ara

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

I agree with ARA, Its fixed in Addons3.

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :

ok, thanks for the information

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

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.

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

Sorry, the solution in addons3 is correct and more elegant than mine! waiting for the merge!

The check fails only for past periods, so the current date avoids this issue. However, i still think that currency is useless in this case :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.