summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index c3ab71aa..6e09f3e9 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -633,7 +633,7 @@ class PurchaseOrder(models.Model):
date_done = self.date_approve
# day_extension = int(self.payment_term_id.line_ids.days)
- day_extension = int(max(self.payment_term_id.line_ids.mapped('days')))
+ day_extension = int(max(self.payment_term_id.line_ids.mapped('days'), default=0))
payment_schedule = date_done + timedelta(days=day_extension)
if payment_schedule.weekday() == 0: