summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-05 15:08:02 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-05 15:08:02 +0700
commit074f7e6c0190c1ae5e08db6db0dd3f4f3e28e941 (patch)
treed2561768d57fa32ede8cabbe249990f9db880cf4 /indoteknik_custom/models/sale_order.py
parent0cbdf05b4fce0460cdc951cb60d4bd00cac51a13 (diff)
change request
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index ac81737d..0d28e677 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -201,6 +201,10 @@ class SaleOrder(models.Model):
@api.model
def action_multi_update_state(self):
for sale in self:
+ for picking_ids in sale.picking_ids:
+ if not picking_ids.state == 'cancel':
+ raise UserError('DO harus cancel terlebih dahulu')
+
sale.update({
'state': 'cancel',
})