diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-05-23 09:05:27 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-05-23 09:05:27 +0700 |
| commit | fad209db285b0a6204dc1fcbf2e2e0cb13f872b0 (patch) | |
| tree | fb54bcb29f5b06332b149763b03de8367b88f864 /indoteknik_custom/models/sale_order.py | |
| parent | 34174e95638e1337169dfa5f3be56b9ef57021a1 (diff) | |
(andri) penyesuaian data quotation SO ke delivery biteship
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 5a5255b3..38d2505d 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -249,7 +249,7 @@ class SaleOrder(models.Model): string="Attachment Bukti Cancel", readonly=False, ) 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)]") + shipping_option_id = fields.Many2one("shipping.option", string="Selected Service Option", domain="['|', ('sale_order_id', '=', False), ('sale_order_id', '=', id)]") select_shipping_option = fields.Selection([ ('biteship', 'Biteship'), @@ -296,7 +296,8 @@ class SaleOrder(models.Model): @api.onchange('shipping_option_id') def _onchange_shipping_option_id(self): if self.shipping_option_id: - self.delivery_amt = self.shipping_option_id.price + self.delivery_amt = self.shipping_option_id.price + self.delivery_service_type = self.shipping_option_id.courier_service_code def _get_biteship_courier_codes(self): return [ @@ -786,6 +787,7 @@ class SaleOrder(models.Model): if selected_option: self.shipping_option_id = selected_option.id self.delivery_amt = selected_option.price + self.delivery_service_type = selected_option.courier_service_code if use_coordinate: origin_info = f"Koordinat ({origin_data.get('origin_latitude')}, {origin_data.get('origin_longitude')})" |
