Keywords: Odoo - Google Cloud Platform - Technical issue - Other
Description:
Add a record in the Contact Object to limit the visibility of customers per user. But now every time a user accesses he gets this error:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/api.py", line 745, in get
value = self._data[field][record._ids[0]]
KeyError: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/fields.py", line 1002, in __get__
value = env.cache.get(record, self)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/api.py", line 751, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('mail.channel(1,).moderator_ids', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.rule', <function IrRule._compute_domain at 0x7f0bfe56a560>, 13, False, 'res.partner', 'read', ((1,),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 915, in __call__
return self.method(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/addons/mail/controllers/main.py", line 254, in mail_init_messaging
'channel_slots': request.env['mail.channel'].channel_fetch_slot(),
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/addons/mail/models/mail_channel.py", line 834, in channel_fetch_slot
values['channel_channel'] = self.search([('channel_type', '=', 'channel'), ('public', 'in', ['public', 'groups']), ('channel_partner_ids', 'in', [my_partner_id])]).channel_info()
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/addons/mail/models/mail_channel.py", line 558, in channel_info
'is_moderator': self.env.uid in channel.moderator_ids.ids,
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/fields.py", line 2313, in __get__
return super().__get__(records, owner)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/fields.py", line 1009, in __get__
recs._fetch_field(self)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/models.py", line 2947, in _fetch_field
self._read(fnames)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/models.py", line 3047, in _read
field.read(fetched)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/fields.py", line 3314, in read
comodel._apply_ir_rules(wquery, 'read')
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/models.py", line 4181, in _apply_ir_rules
where_clause, where_params, tables = Rule.domain_get(parent_model, mode)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/addons/base/models/ir_rule.py", line 182, in domain_get
dom = self._compute_domain(model_name, mode)
File "<decorator-gen-49>", line 2, in _compute_domain
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/addons/base/models/ir_rule.py", line 153, in _compute_domain
dom = safe_eval(rule.domain_force, eval_context) if rule.domain_force else []
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/safe_eval.py", line 349, in safe_eval
c = test_expr(expr, _SAFE_OPCODES, mode=mode)
File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/safe_eval.py", line 208, in test_expr
code_obj = compile(expr, "", mode)
File "<string>", line 1
['|',('user_id','=',user.id),('user_id','=',False)
^
SyntaxError: unexpected EOF while parsing
The super user works and I delete the registration in sales - user -Only show own documents. But it still doesn't work and if new users are created the same error is generated.
Any idea how it can be fixed?
Thanks.