Skip to content

Commit

Permalink
Merge PR #246 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Apr 20, 2023
2 parents 4eb3e23 + 41ca6f4 commit 6dbda03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ddmrp/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ def action_view_supply_outside_dlt_window(self):
@api.model
def cron_ddmrp_adu(self, automatic=False):
"""calculate ADU for each DDMRP buffer. Called by cronjob."""
auto_commit = not getattr(threading.currentThread(), "testing", False)
auto_commit = not getattr(threading.current_thread(), "testing", False)
_logger.info("Start cron_ddmrp_adu.")
buffer_ids = self.search([]).ids
i = 0
Expand Down Expand Up @@ -1685,7 +1685,7 @@ def cron_actions(self, only_nfp=False):
def cron_ddmrp(self, automatic=False):
"""Calculate key DDMRP parameters for each buffer.
Called by cronjob."""
auto_commit = not getattr(threading.currentThread(), "testing", False)
auto_commit = not getattr(threading.current_thread(), "testing", False)
_logger.info("Start cron_ddmrp.")
buffer_ids = self.search([]).ids
i = 0
Expand Down
2 changes: 1 addition & 1 deletion ddmrp_warning/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def action_generate_warnings(self):

@api.model
def cron_generate_ddmrp_warnings(self, automatic=False):
auto_commit = not getattr(threading.currentThread(), "testing", False)
auto_commit = not getattr(threading.current_thread(), "testing", False)
buffer_ids = self.search([]).ids
i = 0
j = len(buffer_ids)
Expand Down

0 comments on commit 6dbda03

Please sign in to comment.