diff --git a/stock_cycle_count/models/stock_cycle_count_rule.py b/stock_cycle_count/models/stock_cycle_count_rule.py index 00b988ead..6a952ce8c 100644 --- a/stock_cycle_count/models/stock_cycle_count_rule.py +++ b/stock_cycle_count/models/stock_cycle_count_rule.py @@ -152,6 +152,8 @@ class StockCycleCountRule(models.Model): latest_inventory, DEFAULT_SERVER_DATETIME_FORMAT) + timedelta( days=period) + if next_date < datetime.today(): + next_date = datetime.today() except Exception as e: raise UserError( _('Error found determining the frequency of periodic '