summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-02-27 15:25:13 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-02-27 15:25:13 +0700
commit860edce900b22241d5f75e1e4613945c577e1c14 (patch)
tree5f5b28edbda90593b512af4f856612ac91918d0f
parent1171e457721567242d3d56f89c5e58a340392916 (diff)
<iman> update code jaga jaga kalau so tidak ter-cancel
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index f53041cb..d6b5e848 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1162,6 +1162,8 @@ class SaleOrder(models.Model):
def confirm_cancel_order(self):
"""Fungsi ini akan dipanggil oleh wizard setelah alasan pembatalan dipilih"""
+ if self.state != 'cancel':
+ self.state = 'cancel'
return super(SaleOrder, self).action_cancel()
def validate_partner_invoice_due(self):