From fca62b9b9a56f92abffd624067ee75c64f1c84fa Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 29 Sep 2022 11:42:31 +0700 Subject: Update sale_order.py and sale_order.xml --- indoteknik_custom/models/sale_order.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index f1f281a8..6410c150 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -46,6 +46,8 @@ class SaleOrder(models.Model): raise UserError("Status harus draft atau sent") if not order.sales_tax_id: raise UserError("Tax di Header harus diisi") + if not order.carrier_id: + raise UserError("Shipping Method harus diisi") approval1 = approval2 = 0 for line in order.order_line: if not line.product_id or line.product_id.type == 'service': @@ -74,6 +76,8 @@ class SaleOrder(models.Model): for order in self: if not order.sales_tax_id: raise UserError("Tax di Header harus diisi") + if not order.carrier_id: + raise UserError("Shipping Method harus diisi") approval1 = approval2 = 0 for line in order.order_line: if not line.product_id or line.product_id.type == 'service': -- cgit v1.2.3