Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit log module Break Odoo Uni test #3121

Open
uynil opened this issue Nov 18, 2024 · 0 comments
Open

Audit log module Break Odoo Uni test #3121

uynil opened this issue Nov 18, 2024 · 0 comments
Labels

Comments

@uynil
Copy link
Member

uynil commented Nov 18, 2024

Module

Audit log module Break Odoo Uni test

Describe the bug

Audit log module Break Odoo Uni test

To Reproduce

Affected versions:
17.0
odoo enterprise

Steps to reproduce the behavior:

  1. run odoo unit test ( my system is odoo.sh)

Error log
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/web/tests/test_reports.py", line 55, in test_report_session_cookie
mock_request.session.sid = self.authenticate(admin.login, admin.login).sid
File "/home/odoo/src/odoo/odoo/tests/common.py", line 1793, in authenticate
session.context = dict(env['res.users'].context_get())
File "", line 2, in context_get
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/res_users.py", line 809, in context_get
values = user.read(list(name_to_key), load=False)[0]
File "/home/odoo/src/user/auditlog/models/rule.py", line 363, in read
rule_model.sudo().create_logs(
File "/home/odoo/src/user/auditlog/models/rule.py", line 523, in create_logs
"http_request_id": http_request_model.current_http_request(),
File "/home/odoo/src/user/auditlog/models/http_request.py", line 53, in current_http_request
self.env.cr.execute(
File "/home/odoo/src/odoo/odoo/sql_db.py", line 332, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: can't adapt type 'Mock'

2024-11-18 15:36:37,751 43 ERROR sjfoiew 9978 odoo.sql_db: bad query: SELECT id FROM %s WHERE id = %s
ERROR: can't adapt type 'Mock'

Expected behavior
Pass Unit Test

Additional context
Python 3.10
Ubuntu 22.04

@uynil uynil added the bug label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant