From 44220214132f20202da9f225ed46ecfe14057e2c Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Mar 2025 13:16:13 +0700 Subject: push --- indoteknik_custom/models/sale_order.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index d8c1888f..f66da470 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -234,8 +234,8 @@ class SaleOrder(models.Model): nomor_so_pengganti = fields.Char(string='Nomor SO Pengganti', copy=False, tracking=3) shipping_option_id = fields.Many2one("shipping.option", string="Selected Shipping Option", domain="['|', ('sale_order_id', '=', False), ('sale_order_id', '=', id)]") - @api.constrains('delivery_amt', 'biaya_lain_lain', 'fee_third_party') - def _check_margin_excl_third_party(self): + @api.constrains('write_date') + def _check_total_margin_excl_third_party(self): for rec in self: if rec.fee_third_party == 0: rec.total_margin_excl_third_party = rec.total_percent_margin @@ -251,7 +251,7 @@ class SaleOrder(models.Model): carrier_names = order.picking_ids.mapped('carrier_id.name') order.shipping_method_picking = ', '.join(filter(None, carrier_names)) else: - order.shipping_method_picking = False + order.shipping_method_picking = False @api.onchange('payment_status') def _is_continue_transaction(self): -- cgit v1.2.3