summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/bill_receipt.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-09-24 09:03:52 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-09-24 09:03:52 +0700
commitcc4be72fc2f0d98f8bc2190ea5c404536bb3c56d (patch)
treea00f22741ba1ec63b59659834a9c6177b20db343 /indoteknik_custom/models/bill_receipt.py
parent1f9d0136758531831ea6c7a90556c9a472ed8d40 (diff)
parent649f3037e4357dab42d1a8d799e5f2a2f1fd2e52 (diff)
Merge branch 'production' into unreserved_permission
# Conflicts: # indoteknik_custom/models/sale_order.py
Diffstat (limited to 'indoteknik_custom/models/bill_receipt.py')
-rw-r--r--indoteknik_custom/models/bill_receipt.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/indoteknik_custom/models/bill_receipt.py b/indoteknik_custom/models/bill_receipt.py
index 76449c1f..7d38d5ad 100644
--- a/indoteknik_custom/models/bill_receipt.py
+++ b/indoteknik_custom/models/bill_receipt.py
@@ -22,8 +22,16 @@ class BillReceipt(models.Model):
resi_tukar_faktur = fields.Char(string='Resi Faktur')
date_terima_tukar_faktur = fields.Date(string='Terima Faktur')
shipper_faktur_id = fields.Many2one('delivery.carrier', string='Shipper Faktur')
- is_validated = fields.Boolean(string='Validated')
+ is_validated = fields.Boolean(string='Validated')
notification = fields.Char(string='Notification')
+ grand_total = fields.Float(string='Grand Total', compute="_compute_grand_total")
+
+ def _compute_grand_total(self):
+ for record in self:
+ grand_total = 0
+ for line in record.bill_line:
+ grand_total += line.total_amt
+ record.grand_total = grand_total
def copy_date_faktur(self):
if not self.is_validated: