From b0effc107cd0dcb1d9f5a458a00b2c1170edf1e8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 13 Jun 2023 13:38:21 +0700 Subject: Menambahkan detail validasi approve/confirm so jika barang tidak dijual --- indoteknik_custom/models/sale_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 1bdc7f7d..e592326d 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -311,7 +311,7 @@ class SaleOrder(models.Model): for line in order.order_line: # must add product can sell validation if not line.product_id.product_tmpl_id.sale_ok: - raise UserError('Product ini belum bisa dijual, harap hubungi finance') + raise UserError('Product %s belum bisa dijual, harap hubungi finance' % line.product_id.display_name) if not line.product_id or line.product_id.type == 'service': continue if line.product_id.id == 232383: @@ -355,7 +355,7 @@ class SaleOrder(models.Model): for line in order.order_line: # must add product can sell validation if not line.product_id.product_tmpl_id.sale_ok: - raise UserError('Product ini belum bisa dijual, harap hubungi finance') + raise UserError('Product %s belum bisa dijual, harap hubungi finance' % line.product_id.display_name) if not line.product_id or line.product_id.type == 'service': continue if line.product_id.id == 232383: -- cgit v1.2.3