[FIX] stock: Exception are not correctly logged
Il during the scheduler an exception append, the error is not correctly logged. This PR allow to catch the error with logger analyser (like sentry). closes odoo/odoo#82648 X-original-commit: c68e1d1c13d116bda6b91fcbbcd61a26739a9894 Signed-off-by: Raphael Collet <rco@odoo.com> Co-authored-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
co-authored by
Raphael Collet
parent
6a46d5e50a
commit
09985fd42a
@@ -562,6 +562,9 @@ class ProcurementGroup(models.Model):
|
||||
self = self.with_env(self.env(cr=cr)) # TDE FIXME
|
||||
|
||||
self._run_scheduler_tasks(use_new_cursor=use_new_cursor, company_id=company_id)
|
||||
except Exception:
|
||||
_logger.error("Error during stock scheduler", exc_info=True)
|
||||
raise
|
||||
finally:
|
||||
if use_new_cursor:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user