summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-07-14 11:38:37 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-07-14 11:38:37 +0700
commit8c51dd97b7ddba2059d1b648799844aedd733501 (patch)
tree5afba8fa1a3d7c9b88d715160a9b64f0e6384044
parent27bd82c6e3e9ee8239751fffda02d4975ba23e68 (diff)
<miqdad> add biaya lain2 field in customer commision
-rw-r--r--indoteknik_custom/models/commision.py5
-rw-r--r--indoteknik_custom/views/customer_commision.xml1
2 files changed, 4 insertions, 2 deletions
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):
diff --git a/indoteknik_custom/views/customer_commision.xml b/indoteknik_custom/views/customer_commision.xml
index 1c17bf63..64f1ef76 100644
--- a/indoteknik_custom/views/customer_commision.xml
+++ b/indoteknik_custom/views/customer_commision.xml
@@ -104,6 +104,7 @@
<!-- <field name="status" readonly="1"/>-->
<field name="payment_status" readonly="1"/>
<field name="total_dpp"/>
+ <field name="biaya_lain_lain"/>
</group>
</group>
<notebook>