From 8c51dd97b7ddba2059d1b648799844aedd733501 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 14 Jul 2025 11:38:37 +0700 Subject: add biaya lain2 field in customer commision --- indoteknik_custom/models/commision.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models/commision.py') diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 97184cdb..26b5df37 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -193,6 +193,7 @@ class CustomerCommision(models.Model): commision_amt_text = fields.Char(string='Amount Text', compute='compute_delivery_amt_text') total_cashback_text = fields.Char(string='Cashback Text', compute='compute_total_cashback_text') total_dpp = fields.Float(string='Total DPP', compute='_compute_total_dpp') + biaya_lain_lain = fields.Float(string='Biaya Lain-lain') commision_type = fields.Selection([ ('fee', 'Fee'), ('cashback', 'Cashback'), @@ -363,13 +364,13 @@ class CustomerCommision(models.Model): else: self.cashback = 0 self.total_commision = 0 - + def _compute_total_dpp(self): for data in self: total_dpp = 0 for line in data.commision_lines: total_dpp = total_dpp + line.dpp - data.total_dpp = total_dpp + data.total_dpp = total_dpp - data.biaya_lain_lain @api.model def create(self, vals): -- cgit v1.2.3