summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-07-09 11:15:10 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-07-09 11:15:10 +0700
commit0604dbc3a2789c139ea66dd561726f796ad92cd6 (patch)
tree65590a02278f442a3d095dee67e243f4d170320a /indoteknik_custom/models
parent3537b1a2c0cea81db9c8d09656fa638745579752 (diff)
add grand total on approval payment term
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/approval_payment_term.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/approval_payment_term.py b/indoteknik_custom/models/approval_payment_term.py
index 00d990de..6e1c8103 100644
--- a/indoteknik_custom/models/approval_payment_term.py
+++ b/indoteknik_custom/models/approval_payment_term.py
@@ -44,6 +44,13 @@ class ApprovalPaymentTerm(models.Model):
string='Sale Order Totals',
compute='_compute_total'
)
+
+ grand_total = fields.Float(string='Grand Total', compute="_compute_grand_total")
+
+ def _compute_grand_total(self):
+ for rec in self:
+ grand_total = sum(order.amount_total for order in rec.sale_order_ids)
+ rec.grand_total = grand_total
def _compute_total(self):
for rec in self: