Open SommelierOdoo opened 3 years ago
I am having the same issue in Odoo v13. smile_audit seems to affect the functionality of other modules with groups associated to them, rendering them useless.
Any help would be greatly appreciated.
Error: Odoo Server Error
Traceback (most recent call last): File "/home/vaell/odoo13/odoo/tools/cache.py", line 85, in lookup r = d[key] File "/home/vaell/odoo13/odoo/tools/func.py", line 69, in wrapper return func(self, *args, **kwargs) File "/home/vaell/odoo13/odoo/tools/lru.py", line 44, in getitem a = self.d[obj].me KeyError: ('audit.rule', <function AuditRule._check_audit_rule at 0x7f3cd04d72f0>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vaell/odoo13/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/vaell/odoo13/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/vaell/odoo13/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/vaell/odoo13/odoo/http.py", line 669, in dispatch
result = self._call_function(self.params)
File "/home/vaell/odoo13/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, *kwargs)
File "/home/vaell/odoo13/odoo/service/model.py", line 94, in wrapper
return f(dbname, args, kwargs)
File "/home/vaell/odoo13/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, kw)
File "/home/vaell/odoo13/odoo/http.py", line 915, in call
return self.method(*args, *kw)
File "/home/vaell/odoo13/odoo/http.py", line 515, in response_wrap
response = f(args, kw)
File "/home/vaell/odoo13/addons/web/controllers/main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/vaell/odoo13/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/vaell/odoo13/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/vaell/odoo13/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, kwargs)
File "/home/vaell/odoo13/odoo/addons/base/wizard/base_module_uninstall.py", line 59, in action_uninstall
return modules.button_immediate_uninstall()
File "
I am having the same issue in Odoo v13. smile_audit seems to affect the functionality of other modules with groups associated to them, rendering them useless.
Any help would be greatly appreciated.
Traceback:
Error: Odoo Server Error ...
Facing this very same problem with Odoo v13 smile_audit when trying to uninstall it. In addition when I tried to use it - it jammed whole Odoo server when creating a audit rule.
Hi, just faced the same problem I had to delete some content from models/base.py, just left import datetime from odoo import api, fields, models from odoo.tools.safe_eval import safe_eval
class Base(models.AbstractModel): _inherit = "base"
then update the module, and uninstall. the problem is that this inherits the base model (meaning ALL models), and when uninstall it tries to check the rules for the records written, but some fields of audt rule doesn't exist anymore
Thanks a lot @Androbas - that just saved me...
We keep on encountering an error when uninstalling:
` Error: Odoo Server Error
Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/tools/cache.py", line 88, in lookup r = d[key] File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper return func(self, *args, **kwargs) File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in getitem a = self.d[obj].me KeyError: ('audit.rule', <function AuditRule._check_audit_rule at 0x7f7a840e9510>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/http.py", line 656, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/src/odoo/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/odoo/src/odoo/odoo/http.py", line 698, in dispatch result = self._call_function(self.params) File "/home/odoo/src/odoo/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, *kwargs) File "/home/odoo/src/odoo/odoo/service/model.py", line 98, in wrapper return f(dbname, args, kwargs) File "/home/odoo/src/odoo/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, kw) File "/home/odoo/src/odoo/odoo/http.py", line 941, in call return self.method(*args, *kw) File "/home/odoo/src/odoo/odoo/http.py", line 519, in response_wrap response = f(args, kw) File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {}) File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/odoo/src/odoo/odoo/api.py", line 759, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/home/odoo/src/odoo/odoo/api.py", line 746, in _call_kw_multi result = method(recs, *args, kwargs) File "/home/odoo/src/odoo/odoo/addons/base/wizard/base_module_uninstall.py", line 60, in action_uninstall return modules.button_immediate_uninstall() File "", line 2, in button_immediate_uninstall
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, *kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 586, in button_immediate_uninstall
return self._button_immediate_function(type(self).button_uninstall)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 494, in load_modules
Module.browse(modules_to_remove.values()).module_uninstall()
File "", line 2, in module_uninstall
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, args, kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 463, in module_uninstall
self.with_context(prefetch_fields=False).write({'state': 'uninstalled', 'latest_version': False})
File "/home/odoo/src/odoo/addons/website_theme_install/models/ir_module_module.py", line 94, in write
return super(IrModuleModule, self).write(vals)
File "/home/odoo/src/user/smile_audit/models/base.py", line 105, in write
if not self._get_audit_rule('write'):
File "/home/odoo/src/user/smile_audit/models/base.py", line 59, in _get_audit_rule
rule_id = AuditRule._check_audit_rule(group_ids).get(
File "", line 2, in _check_audit_rule
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/user/smile_audit/models/audit_rule.py", line 86, in _check_audit_rule ('group_id', 'in', group_ids), File "/home/odoo/src/odoo/odoo/models.py", line 1581, in search res = self._search(args, offset=offset, limit=limit, order=order, count=count) File "/home/odoo/src/odoo/odoo/models.py", line 4150, in _search self._cr.execute(query_str, where_clause_params) File "/home/odoo/src/odoo/odoo/sql_db.py", line 148, in wrapper return f(self, *args, **kwargs) File "/home/odoo/src/odoo/odoo/sql_db.py", line 225, in execute res = self._obj.execute(query, params) psycopg2.ProgrammingError: column audit_rule.active does not exist LINE 1: SELECT "audit_rule".id FROM "audit_rule" WHERE (("audit_rule... ... `
We are trying to migrate from Odoo V12 to V13. For rarely to non used apps, we want to uninstall them to make the migration easier.
Thanks for the help.