diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-10-14 11:43:05 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-10-14 11:43:05 +0000 |
| commit | 60dfef625548cf7e8cdaa8fdfd76238f208790e7 (patch) | |
| tree | 75216848656a4b3fa9058dbe1584307d34dcc4c4 /indoteknik_custom/models/sale_order.py | |
| parent | b41c2d160e5e114bf805baed573d791fbac3feac (diff) | |
| parent | dab2cdebb698b817b979efd2087175060f9b8f03 (diff) | |
Merged in cr_approval_status (pull request #448)
<Miqdad> set back to pengajuan1 when CO from website and change SO line behavior onchange vendor_id
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 4a7203a1..3bd1ca59 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -3230,6 +3230,10 @@ class SaleOrder(models.Model): # order._auto_set_shipping_from_website() order._compute_etrts_date() order._validate_expected_ready_ship_date() + for line in order.order_line: + updated_vals = line._update_purchase_info() + if updated_vals: + line.write(updated_vals) # order._validate_delivery_amt() # order._check_total_margin_excl_third_party() # order._update_partner_details() @@ -3361,6 +3365,12 @@ class SaleOrder(models.Model): if any(field in vals for field in ["order_line", "client_order_ref"]): self._calculate_etrts_date() + for order in self: + for line in order.order_line: + updated_vals = line._update_purchase_info() + if updated_vals: + line.write(updated_vals) + return res def button_refund(self): |
