diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-26 13:16:13 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-26 13:16:13 +0700 |
| commit | 44220214132f20202da9f225ed46ecfe14057e2c (patch) | |
| tree | 6be86478d582690d6bf5c8baaf78d4d908db63a1 | |
| parent | aada0aa508549c9357cdee1a16cd7a23d6a38b22 (diff) | |
push
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 6 |
1 files 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): |
