summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-01-02 08:56:20 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-01-02 08:56:20 +0700
commit0ecd24dd099295d664c3e80f064e8276395a8f89 (patch)
tree0f36fe302cc1e8fdb228b1e4ab54b461e46d7fb5
parent5446eefa619906ba785d1f867fd828cce0d0748c (diff)
change message validation on purchase pricelist and sale order
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py2
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py
index b7c3785a..86bb2f54 100755
--- a/indoteknik_custom/models/purchase_pricelist.py
+++ b/indoteknik_custom/models/purchase_pricelist.py
@@ -39,8 +39,8 @@ class PurchasePricelist(models.Model):
]
domain.append(('id', '!=', price.id))
- massage="Product dan vendor yang anda gunakan sudah ada di purchase pricelist"
existing_purchase = self.search(domain, limit=1)
+ massage="Ada duplikat product dan vendor, berikut data yang anda duplikat : \n" + str(existing_purchase.product_id.name) + " - " + str(existing_purchase.vendor_id.name) + " - " + str(existing_purchase.product_price)
if existing_purchase:
raise UserError(massage)
\ No newline at end of file
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 12526131..07c37fe7 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -366,7 +366,7 @@ class SaleOrder(models.Model):
def _validate_order(self):
if self.payment_term_id.id == 31 and self.total_percent_margin < 25:
- raise UserError("Total Margin Belum mencapai 25%")
+ raise UserError("Jika ingin menggunakan Tempo 90 Hari maka margin harus di atas 25%")
if self.warehouse_id.id != 8: #GD Bandengan
raise UserError('Gudang harus Bandengan')