Skip to Content
Menu
This question has been flagged
3 Replies
5080 Views

I bought the theme Laze and was never a fan but left it because we never used the e-commerce side. NOW, I purchased another that suites us perfect but can't get it installed... When I uninstall Laze I get;


Odoo Server Error

Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/odoo/odoo-server/odoo/http.py", line 677, in dispatch

    result = self._call_function(**self.params)

  File "/odoo/odoo-server/odoo/http.py", line 333, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/odoo/odoo-server/odoo/service/model.py", line 101, in wrapper

    return f(dbname, *args, **kwargs)

  File "/odoo/odoo-server/odoo/http.py", line 326, in checked_call

    result = self.endpoint(*a, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 935, in __call__

    return self.method(*args, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 506, in response_wrap

    response = f(*args, **kw)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 889, in call_button

    action = self._call_kw(model, method, args, {})

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 877, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/odoo/odoo-server/odoo/addons/base/module/wizard/base_module_upgrade.py", line 76, in upgrade_module

    odoo.modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 89, in new

    del cls.registries[db_name]

  File "/odoo/odoo-server/odoo/tools/func.py", line 68, in wrapper

    return func(self, *args, **kwargs)

  File "/odoo/odoo-server/odoo/tools/lru.py", line 72, in __delitem__

    nobj = self.d[obj]

KeyError: u'production'

Avatar
Discard
Best Answer

upgrade web module through the terminal

sudo su postgres
./odoo-bin -d db_name -u module_name[web] -r role/db_user -w password
Avatar
Discard
Author

Ok here's what I get

2020-03-25 13:51:00,910 14857 INFO ? odoo: Odoo version 10.0

2020-03-25 13:51:00,910 14857 INFO ? odoo: addons paths: ['/var/lib/postgresql/.local/share/Odoo/addons/10.0', u'/odoo/odoo-server/odoo/addons', u'/odoo/odoo-server/addons']

2020-03-25 13:51:00,910 14857 INFO ? odoo: database: odoo.config@default:default

2020-03-25 13:51:00,912 14857 INFO ? odoo.sql_db: Connection to the database failed

Traceback (most recent call last):

File "./odoo-bin", line 9, in <module>

odoo.cli.main()

File "/odoo/odoo-server/odoo/cli/command.py", line 64, in main

o.run(args)

File "/odoo/odoo-server/odoo/cli/server.py", line 175, in run

main(args)

File "/odoo/odoo-server/odoo/cli/server.py", line 140, in main

odoo.service.db._create_empty_database(db_name)

File "/odoo/odoo-server/odoo/service/db.py", line 79, in _create_empty_database

with closing(db.cursor()) as cr:

File "/odoo/odoo-server/odoo/sql_db.py", line 635, in cursor

return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)

File "/odoo/odoo-server/odoo/sql_db.py", line 177, in __init__

self._cnx = pool.borrow(dsn)

File "/odoo/odoo-server/odoo/sql_db.py", line 518, in _locked

return fun(self, *args, **kwargs)

File "/odoo/odoo-server/odoo/sql_db.py", line 586, in borrow

**connection_info)

File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect

conn = _connect(dsn, connection_factory=connection_factory, async=async)

psycopg2.OperationalError: FATAL: Peer authentication failed for user "odoo.config"

1. We open the terminal and kill the process of odoo

ps aux | grep odoo

2. We identify the odoo process number and stop it.

sudo kill -9 #process

3. Go to the / etc / postgresql address and edit the file pg_hba.conf, add: local all odoo12 <- user that gives us problems and trust

local all odoo12 trust

* I have a user for each version, therefore I will put odoo12 because it is the one that is giving me problems.

4. We save, close and restart postgres

sudo service postgresql restart.

Author Best Answer

I saw your last comment you deleted... I was able to get the command line to actually work but the argument was I didn't need -r or -w. I went to the directory /odoo-server and ran it without, but then once updated I got this;

2020-03-25 14:13:19,703 1762 ERROR production odoo.modules.registry: Failed to load registry

Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/modules/registry.py", line 83, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 341, in load_modules

    registry.setup_models(cr)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 292, in setup_models

    model._setup_base(partial)

  File "/odoo/odoo-server/odoo/models.py", line 2817, in _setup_base

    self._add_manual_fields(partial)

  File "/odoo/odoo-server/odoo/models.py", line 654, in _add_manual_fields

    field = IrModelFields._instanciate(field_data, partial)

  File "/odoo/odoo-server/odoo/addons/base/ir/ir_model.py", line 683, in _instanciate

    rel, col1, col2 = self._custom_many2many_names(field_data['model'], field_data['relation'])

  File "/odoo/odoo-server/odoo/addons/base/ir/ir_model.py", line 385, in _custom_many2many_names

    rel2 = self.env[comodel_name]._table

  File "/odoo/odoo-server/odoo/api.py", line 760, in __getitem__

    return self.registry[model_name]._browse((), self)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 178, in __getitem__

    return self.models[model_name]

KeyError: u'product.brand'

2020-03-25 14:13:19,704 1762 CRITICAL production odoo.service.server: Failed to initialize database `production`.

Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/service/server.py", line 911, in preload_registries

    registry = Registry.new(dbname, update_module=update_module)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 83, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 341, in load_modules

    registry.setup_models(cr)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 292, in setup_models

    model._setup_base(partial)

  File "/odoo/odoo-server/odoo/models.py", line 2817, in _setup_base

    self._add_manual_fields(partial)

  File "/odoo/odoo-server/odoo/models.py", line 654, in _add_manual_fields

    field = IrModelFields._instanciate(field_data, partial)

  File "/odoo/odoo-server/odoo/addons/base/ir/ir_model.py", line 683, in _instanciate

    rel, col1, col2 = self._custom_many2many_names(field_data['model'], field_data['relation'])

  File "/odoo/odoo-server/odoo/addons/base/ir/ir_model.py", line 385, in _custom_many2many_names

    rel2 = self.env[comodel_name]._table

  File "/odoo/odoo-server/odoo/api.py", line 760, in __getitem__

    return self.registry[model_name]._browse((), self)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 178, in __getitem__

    return self.models[model_name]

KeyError: u'product.brand'


Avatar
Discard

Please once again follow my last comment and let me know in deleted comment i missed one thing.Which i have added right now. I hope now it will fixed. After testing please let me know.

Thanks

Author

Edit pg_hba.conf but still getting error. Can you confirm this is correct?

# Database administrative login by Unix domain socket

local all postgres peer

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only

local all all peer

# IPv4 local connections:

host all all 127.0.0.1/32 md5

# IPv6 local connections:

host all all ::1/128 md5

# Allow replication connections from localhost, by a user with the

# replication privilege.

#local replication postgres peer

#host replication postgres 127.0.0.1/32 md5

#host replication postgres ::1/128 md5

local all odoo12 trust

Change this line

local all postgres peer

to

local all postgres trust

after checking please let me know

Author

The developer of the "new" theme I was installing figured out it a specific module, but also updated my database. Theme works but now all of my purchased or custom modules won't... What a nightmare.

Related Posts Replies Views Activity
2
Mar 22
2549
2
Mar 15
4577
2
Sep 18
4060
1
Mar 24
1565
1
May 17
2271