diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-20 15:06:17 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-20 15:06:17 +0700 |
| commit | 79bf9729d10c8fb37ef9071ab6df2b6644ddea49 (patch) | |
| tree | 6226da5e38ad44673a1bb5d7d4e2b0fd5df1fada /indoteknik_custom/models/bill_receipt.py | |
| parent | eb7661705303a64c97e84061b53d48d5c46f6293 (diff) | |
| parent | d2bb21ae878db2a3b77dbb3341046c9d12ba1de5 (diff) | |
Merge branch 'production' into iman/new-register
# Conflicts:
# indoteknik_custom/models/res_users.py
Diffstat (limited to 'indoteknik_custom/models/bill_receipt.py')
| -rw-r--r-- | indoteknik_custom/models/bill_receipt.py | 10 |
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: |
