diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-11 10:51:36 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-11 10:51:36 +0700 |
| commit | a2c5c098f1973b0153f157e8e98b7536a4941734 (patch) | |
| tree | 85c47fd5c69ff9a3427f9367409d948d9ffeb38c | |
| parent | 695daba1c3c4f94bbc686b751128a17a73577355 (diff) | |
add margin to customer commision
| -rw-r--r-- | indoteknik_custom/models/commision.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/views/customer_commision.xml | 1 |
2 files changed, 2 insertions, 0 deletions
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 @@ <field name="state" readonly="1"/> <field name="product_id" readonly="1" optional="hide"/> <field name="dpp" readonly="1"/> + <field name="total_percent_margin" readonly="1"/> <field name="tax" readonly="1" optional="hide"/> <field name="total" readonly="1" optional="hide"/> </tree> |
