diff options
| author | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2026-02-24 12:40:04 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2026-02-24 12:40:04 +0700 |
| commit | 1112947139e69732589352359105e7602d6539b2 (patch) | |
| tree | 1216aace7dd09e9e5a01ed9d12dba540b94f5691 | |
| parent | ec8b27f8b71e8d6d2967016f2772a700acb8c423 (diff) | |
(andri) fix error singleton create bill po karena payment term dp 30 multi line
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 3 |
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: |
