ValueError: No references to base.group_hr_user

Bug #695241 reported by OpenBMS JSC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

I experience the following error when creating a new DB. Steps to produce

1. Create a new DB (e.g. newtest) with demo data, locale=vi_VN.
2. Skip the configuration wizard
3. Install the account module from the "Administration => Modules => Modules". It generates the error below

On the client side

Environment Information :
System : Linux-2.6.32-27-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-27-generic
Operating System Version : #49-Ubuntu SMP Thu Dec 2 00:51:09 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : vi_VN.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1738 <email address hidden>
Traceback (most recent call last):
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 598, in dispatch
    res = fn(db, uid, *params)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 100, in upgrade_module
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 869, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 742, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 633, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/convert.py", line 945, in convert_csv_import
    result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 859, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 809, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 723, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/misc.py", line 808, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/ir/ir_model.py", line 416, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base.group_hr_user

In server log
[2010-12-29 09:45:16,904][newtest] INFO:i18n:module analytic: loading translation file for language vi
[2010-12-29 09:45:16,904][newtest] INFO:i18n:loading /home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/analytic/i18n/vi.po
[2010-12-29 09:45:17,209][newtest] INFO:init:module account: loading security/account_security.xml
[2010-12-29 09:45:17,364][newtest] INFO:init:module account: loading security/ir.model.access.csv
[2010-12-29 09:45:17,422][newtest] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 100, in upgrade_module
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 869, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 742, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 633, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/convert.py", line 945, in convert_csv_import
    result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 859, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 809, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 723, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/misc.py", line 808, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/ir/ir_model.py", line 416, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base.group_hr_user
[2010-12-29 09:45:17,423][newtest] DEBUG:web-services:netrpc: rpc-dispatching exception
Traceback (most recent call last):
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/netrpc_server.py", line 70, in run
    result = self.dispatch(msg[0], msg[1], msg[2:])
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 499, in dispatch
    raise OpenERPDispatcherException(e, tb_s)
OpenERPDispatcherException

Version information
addons/ : <email address hidden> 4077
addons-community/ : fran@fran-pc-20101213182241-2fogs8yh5u4ma31q 292
addons-extra/ : <email address hidden> 5126
client/ : <email address hidden> 1738
server/ : <email address hidden> 3163
web/ : <email address hidden> 4195

Revision history for this message
snook (snook) wrote :

Looks like same issue when updating an existing database.

Just refreshed modules from trunk and this is the result of updating a database with NO HR module installed:

Updating Database with current modules
Traceback (most recent call last):
  File "./openerp-server.py", line 121, in <module>
    db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False)
  File "/home/openerp/openerp/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/openerp/openerp/server/bin/addons/__init__.py", line 869, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/home/openerp/openerp/server/bin/addons/__init__.py", line 742, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/home/openerp/openerp/server/bin/addons/__init__.py", line 633, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/home/openerp/openerp/server/bin/tools/convert.py", line 945, in convert_csv_import
    result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
  File "/home/openerp/openerp/server/bin/osv/orm.py", line 859, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/openerp/openerp/server/bin/osv/orm.py", line 809, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/openerp/openerp/server/bin/osv/orm.py", line 723, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/home/openerp/openerp/server/bin/tools/misc.py", line 808, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/home/openerp/openerp/server/bin/addons/base/ir/ir_model.py", line 416, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base.group_hr_user

V6 trunk at:
Server 3163
Addons 4080

Revision history for this message
snook (snook) wrote :

Temporary fix:

Remove the two lines in "addons/account/security/ir.model.access.csv" that refer to "group_hr_user"

Has now allowed database to be updated.

Seems references to "group_hr_user" should not exist in "account" module unless "hr" module is installed.

Need proper solution.

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

I must add that this never happens before in the last couple weeks or so. This might also the cause for problem I experience in https://bugs.launchpad.net/openobject-addons/+bug/599559

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

"Seems references to "group_hr_user" should not exist in "account" module unless "hr" module is installed."

If account module need to refer to something in "hr" module, shouldn't this made obvious using dependencies?

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :
Download full text (3.3 KiB)

I tried to remove 2 lines as suggested but experience the below error

Environment Information :
System : Linux-2.6.32-27-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-27-generic
Operating System Version : #49-Ubuntu SMP Thu Dec 2 00:51:09 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : vi_VN.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1738 <email address hidden>
Traceback (most recent call last):
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 598, in dispatch
    res = fn(db, uid, *params)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 100, in upgrade_module
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 869, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 742, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/__init__.py", line 633, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/convert.py", line 945, in convert_csv_import
    result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 859, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/osv/orm.py", line 809, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/phon...

Read more...

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.