mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[REL] delivery_fedex_hibou,delivery_gso,delivery_hibou,delivery_ups_hibou,sale_planner,stock_delivery_planner: per-package tracking from 11.0
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
from odoo import api, fields, models
|
||||
@@ -61,6 +63,9 @@ class DeliveryCarrier(models.Model):
|
||||
|
||||
def calculate_transit_days(self, date_planned, date_delivered):
|
||||
self.ensure_one()
|
||||
if not self.delivery_calendar_id:
|
||||
return 0
|
||||
|
||||
if isinstance(date_planned, str):
|
||||
date_planned = fields.Datetime.from_string(date_planned)
|
||||
if isinstance(date_delivered, str):
|
||||
|
||||
Reference in New Issue
Block a user