Browse Source

hide unused field myid

version2
venkata akhil 8 months ago
parent
commit
6138c77805
  1. 21
      smart_service/masters/doctype/role_master/role_master.py

21
smart_service/masters/doctype/role_master/role_master.py

@ -5,17 +5,18 @@ import frappe
from frappe.model.document import Document
class RoleMaster(Document):
def validate(self):
if self.is_new():
count = frappe.db.sql(
'''select max(my_id) as max_count from `tabRole Master`;''')
if count[0][0] is not None:
self.my_id = count[0][0] + 1
else:
self.my_id = 1
pass
# def validate(self):
# if self.is_new():
# count = frappe.db.sql(
# '''select max(my_id) as max_count from `tabRole Master`;''')
# if count[0][0] is not None:
# self.my_id = count[0][0] + 1
# else:
# self.my_id = 1
if self.role:
self.role = self.role.strip()
# if self.role:
# self.role = self.role.strip()
@ frappe.whitelist()
def get_module_names():

Loading…
Cancel
Save