summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-06-13 13:38:21 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-06-13 13:38:21 +0700
commitb0effc107cd0dcb1d9f5a458a00b2c1170edf1e8 (patch)
tree56a14d77118e8392aaee64e7a248f8f405d23750
parent7fb9ffb595b27c0ee2ee51249e907dddf8603414 (diff)
Menambahkan detail validasi approve/confirm so jika barang tidak dijual
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files 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: