raise ValueError('No record found for unique ID %s. It may have been deleted.' % (xmlid))
ValueError: No record found for unique ID base.public_user. It may have been deleted.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
5068
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
There is probably a default XML record being dropped that shouldn't have been the case (the public user ID). Update your base module and it should be resolved.
Hi Yenthe,
While I upgrade the base I am getting the following error. Please help
2019-09-17 11:14:46,390 10501 ERROR 12abhay odoo.sql_db: bad query: b'ALTER TABLE "ir_model" ADD FOREIGN KEY ("create_uid") REFERENCES "res_users"("id") ON DELETE set null'
ERROR: there is no unique constraint matching given keys for referenced table "res_users"
2019-09-17 11:14:46,391 10501 WARNING 12abhay odoo.modules.loading: Transient module states were reset
2019-09-17 11:14:46,391 10501 ERROR 12abhay odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 362, in load_modules
report=report, models_to_check=models_to_check)
File "/odoo/odoo-server/odoo/modules/loading.py", line 195, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name})
File "/odoo/odoo-server/odoo/modules/registry.py", line 301, in init_models
func()
File "/odoo/odoo-server/odoo/fields.py", line 2118, in update_db_foreign_key
new = process(model._cr, model._table, self.name, comodel._table, 'id', self.ondelete or 'set null')
File "/odoo/odoo-server/odoo/tools/sql.py", line 185, in fix_foreign_key
return add_foreign_key(cr, tablename1, columnname1, tablename2, columnname2, ondelete)
File "/odoo/odoo-server/odoo/tools/sql.py", line 158, in add_foreign_key
cr.execute(query.format(tablename1, columnname1, tablename2, columnname2, ondelete))
File "/odoo/odoo-server/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: there is no unique constraint matching given keys for referenced table "res_users"
2019-09-17 11:14:46,393 10501 CRITICAL 12abhay odoo.service.server: Failed to initialize database `12abhay`.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/service/server.py", line 1116, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 362, in load_modules
report=report, models_to_check=models_to_check)
File "/odoo/odoo-server/odoo/modules/loading.py", line 195, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name})
File "/odoo/odoo-server/odoo/modules/registry.py", line 301, in init_models
func()
File "/odoo/odoo-server/odoo/fields.py", line 2118, in update_db_foreign_key
new = process(model._cr, model._table, self.name, comodel._table, 'id', self.ondelete or 'set null')
File "/odoo/odoo-server/odoo/tools/sql.py", line 185, in fix_foreign_key
return add_foreign_key(cr, tablename1, columnname1, tablename2, columnname2, ondelete)
File "/odoo/odoo-server/odoo/tools/sql.py", line 158, in add_foreign_key
cr.execute(query.format(tablename1, columnname1, tablename2, columnname2, ondelete))
File "/odoo/odoo-server/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: there is no unique constraint matching given keys for referenced table "res_users"