server-tools
server-tools copied to clipboard
[15.0][ADD] server_action_logging
source PR: https://github.com/OCA/server-tools/pull/2945
@SilvioC2C, any idea how to fix the following error?
2024-05-30 09:35:24,446 473 INFO odoo odoo.addons.server_action_logging.tests.test_server_action_logging: ======================================================================
2024-05-30 09:35:24,446 473 ERROR odoo odoo.addons.server_action_logging.tests.test_server_action_logging: FAIL: TestServerActionLogging.test_01_log_action_sql_db
Traceback (most recent call last):
File "/__w/server-tools/server-tools/server_action_logging/tests/test_server_action_logging.py", line 83, in test_01_log_action_sql_db
self.action_with_sql_log.run()
AssertionError: no logs of level DEBUG or higher triggered on odoo.sql_db
@vvrossem you can try this:
- change
server_action_logging/tests/test_server_action_logging.py:L83withself.action_with_sql_log.with_context(test=1).run() - in
server_action_logging/models/ir_actions_server.py, before thefor act in actions:loop, add this:
res = False
if self._context.get("test"):
import pdb
pdb.set_trace()
for act in actions:
Then, through the PDB shell, you should be able to check the odoo.sql_db level configuration and check why it's failing.