mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
FIX sale_planner Transit time calculations.
Tested in these scenarios. - won't ship until next week and would be delivered in the week - won't ship until next week and delivered the following week - will ship this week and deliver this week - will ship this week and deliver next week
This commit is contained in:
@@ -72,12 +72,9 @@ class DeliveryCarrier(models.Model):
|
||||
return self._calculate_transit_days_naive(date_planned, date_delivered)
|
||||
if current_date_planned == date_planned:
|
||||
date_planned += timedelta(days=1)
|
||||
transit_days += 1
|
||||
else:
|
||||
date_planned = current_date_planned
|
||||
transit_days += 1
|
||||
|
||||
if transit_days > 1:
|
||||
transit_days -= 1
|
||||
|
||||
return transit_days
|
||||
|
||||
|
||||
Reference in New Issue
Block a user