activity type fixs

This commit is contained in:
Neil Trini Lasrado
2015-02-12 18:47:17 +05:30
parent a6c361c00e
commit 744aec8def
4 changed files with 22 additions and 2 deletions

View File

@@ -7,4 +7,10 @@ import frappe
from frappe.model.document import Document
class ActivityType(Document):
pass
def on_trash(self):
self.validate_manufacturing_type()
def validate_manufacturing_type(self):
if self.activity_type == 'Manufacturing':
frappe.throw(_("Activity Type 'Manufacturing' cannot be deleted."))