[9.0][FIX] stock_cycle_count: Do not propose cycle counts in the past.

This commit is contained in:
lreficent
2017-05-10 14:28:17 +02:00
committed by Lois Rilo
parent 8b482ccfa8
commit 6e7f9c38a6

View File

@@ -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 '