[price list] on deletion of price list, delete all item price record for the same price list
diff --git a/setup/doctype/price_list/price_list.py b/setup/doctype/price_list/price_list.py
index ae49bf8..5c03a3a 100644
--- a/setup/doctype/price_list/price_list.py
+++ b/setup/doctype/price_list/price_list.py
@@ -33,3 +33,6 @@
msgprint(_("""Please check "Valid For All Countries" or \
enter atlease one row in the "Countries" table."""), raise_exception=True)
+ def on_trash(self):
+ webnotes.conn.sql("""delete from `tabItem Price` where price_list_name = %s""",
+ self.doc.name)
\ No newline at end of file