[6.0RC1] ValueError: No references to account.test_invoice_1

Bug #665157 reported by Maxime Chambreuil (http://www.savoirfairelinux.com)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Mustufa Rangwala (Open ERP)

Bug Description

Ubuntu 10.04

openobject-server from trunk
openobject-addons from trunk
openobject-client from trunk

Create database (demo data: Yes, Language: French)
Select interface: Extended
Company name : Test; Currency: CAD
Install applications : check Accounting & Finance

Then the installation continue, but I have this error message in the server console. Maybe nothing important, but worth filing a bug :

[2010-10-22 10:52:14,745][accounting] INFO:init:module account: loading test/account_bank_statement.yml
[2010-10-22 10:52:15,652][accounting] INFO:init:module account: loading test/account_cash_statement.yml
[2010-10-22 10:52:17,185][accounting] INFO:init:module account: loading test/account_report.yml
[2010-10-22 10:52:17,276][accounting] ERROR:tests.account:No references to account.test_invoice_1
Traceback (most recent call last):
  File "/home/max/openerp/openobject-server/bin/tools/yaml_import.py", line 723, in process
    self._process_node(node)
  File "/home/max/openerp/openobject-server/bin/tools/yaml_import.py", line 738, in _process_node
    self.process_python(node)
  File "/home/max/openerp/openobject-server/bin/tools/yaml_import.py", line 412, in process_python
    unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
  File "/home/max/openerp/openobject-addons/trunk/account/test/account_report.yml", line 2, in <module>
    In order to test the PDF reports defined on an invoice, we will print an Invoice Report
  File "/home/max/openerp/openobject-server/bin/tools/yaml_import.py", line 177, in get_id
    ir_id = self.pool.get('ir.model.data')._get_id(self.cr, self.uid, module, checked_xml_id)
  File "/home/max/openerp/openobject-server/bin/tools/misc.py", line 808, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/home/max/openerp/openobject-server/bin/addons/base/ir/ir_model.py", line 402, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to account.test_invoice_1

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

I uncommented line 122 in account/__openerp__.py

        'account_unit_test.xml',

and got :

[2010-10-22 11:18:09,920][accounting] INFO:init:module account: loading test/account_cash_statement.yml
[2010-10-22 11:18:11,375][accounting] INFO:init:module account: loading test/account_report.yml
/home/max/openerp/openobject-server/bin/report/pyPdf/pdf.py:163: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import struct, md5
[2010-10-22 11:18:12,349][accounting] ERROR:report:'fiscalyear'
Traceback (most recent call last):
  File "/home/max/openerp/openobject-server/bin/report/render/rml2pdf/utils.py", line 89, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/home/max/openerp/openobject-server/bin/tools/safe_eval.py", line 271, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/max/openerp/openobject-addons/trunk/account/report/account_tax_report.py", line 46, in get_years
    fiscal_year_name = self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'])
KeyError: 'fiscalyear'
[2010-10-22 11:18:12,644][accounting] ERROR:report:'type'
Traceback (most recent call last):
  File "/home/max/openerp/openobject-server/bin/report/render/rml2pdf/utils.py", line 89, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/home/max/openerp/openobject-server/bin/tools/safe_eval.py", line 271, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/max/openerp/openobject-addons/trunk/account/report/account_balance_sheet.py", line 106, in get_data
    if self.res_bl['type'] == 'Net Profit C.F.B.L.':
KeyError: 'type'
[2010-10-22 11:18:12,717][accounting] ERROR:report:'type'
Traceback (most recent call last):
  File "/home/max/openerp/openobject-server/bin/report/render/rml2pdf/utils.py", line 89, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/home/max/openerp/openobject-server/bin/tools/safe_eval.py", line 271, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/max/openerp/openobject-addons/trunk/account/report/account_balance_sheet.py", line 106, in get_data
    if self.res_bl['type'] == 'Net Profit C.F.B.L.':
KeyError: 'type'

summary: - ValueError: No references to account.test_invoice_1
+ [6.0RC1] ValueError: No references to account.test_invoice_1
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Yes i confirm this and evaluation i think is very buggy has with "Net Profit C.F.B.L."

Regards,

Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

Both the errors fixed with lp:~openerp-dev/openobject-addons/trunk-dev-addons3 branch

will be merged soon with trunk addons.

thank you,

Changed in openobject-addons:
status: Confirmed → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
milestone: none → 6.0-rc2
assignee: nobody → mra (Open ERP) (mra-tinyerp)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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