From 074f7e6c0190c1ae5e08db6db0dd3f4f3e28e941 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Fri, 5 Jul 2024 15:08:02 +0700 Subject: change request --- indoteknik_custom/models/sale_order.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indoteknik_custom/models/sale_order.py') 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', }) -- cgit v1.2.3