From a2c5c098f1973b0153f157e8e98b7536a4941734 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 11 Jul 2024 10:51:36 +0700 Subject: add margin to customer commision --- indoteknik_custom/models/commision.py | 1 + indoteknik_custom/views/customer_commision.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 7ec2cecc..c5809005 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -316,6 +316,7 @@ class CustomerCommisionLine(models.Model): dpp = fields.Float(string='DPP') tax = fields.Float(string='TaxAmt') total = fields.Float(string='Total') + total_percent_margin = fields.Float('Total Margin', related='invoice_id.sale_id.total_percent_margin') product_id = fields.Many2one('product.product', string='Product') class AccountMove(models.Model): diff --git a/indoteknik_custom/views/customer_commision.xml b/indoteknik_custom/views/customer_commision.xml index 4b74cd34..0b72587e 100644 --- a/indoteknik_custom/views/customer_commision.xml +++ b/indoteknik_custom/views/customer_commision.xml @@ -27,6 +27,7 @@ + -- cgit v1.2.3