From 0ecd24dd099295d664c3e80f064e8276395a8f89 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 2 Jan 2024 08:56:20 +0700 Subject: change message validation on purchase pricelist and sale order --- indoteknik_custom/models/purchase_pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models/purchase_pricelist.py') 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 -- cgit v1.2.3