summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/purchase_order.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b3ecca56..c3ab71aa 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -632,7 +632,8 @@ class PurchaseOrder(models.Model):
date_done = self.date_approve
- day_extension = int(self.payment_term_id.line_ids.days)
+ # day_extension = int(self.payment_term_id.line_ids.days)
+ day_extension = int(max(self.payment_term_id.line_ids.mapped('days')))
payment_schedule = date_done + timedelta(days=day_extension)
if payment_schedule.weekday() == 0: