venkata akhil
1 year ago
9 changed files with 110 additions and 12 deletions
@ -0,0 +1,8 @@ |
|||
// Copyright (c) 2023, Hard n Soft Technologies Pvt Ltd and contributors
|
|||
// For license information, please see license.txt
|
|||
|
|||
frappe.ui.form.on('Special Tool Information Category Master', { |
|||
// refresh: function(frm) {
|
|||
|
|||
// }
|
|||
}); |
@ -0,0 +1,62 @@ |
|||
{ |
|||
"actions": [], |
|||
"allow_rename": 1, |
|||
"autoname": "format:{category_name}", |
|||
"creation": "2023-10-19 15:53:02.286633", |
|||
"doctype": "DocType", |
|||
"editable_grid": 1, |
|||
"engine": "InnoDB", |
|||
"field_order": [ |
|||
"category_name", |
|||
"display_order", |
|||
"my_id", |
|||
"active_status" |
|||
], |
|||
"fields": [ |
|||
{ |
|||
"fieldname": "category_name", |
|||
"fieldtype": "Data", |
|||
"label": "Category Name", |
|||
"unique": 1 |
|||
}, |
|||
{ |
|||
"fieldname": "display_order", |
|||
"fieldtype": "Int", |
|||
"label": "Display Order" |
|||
}, |
|||
{ |
|||
"fieldname": "my_id", |
|||
"fieldtype": "Int", |
|||
"label": "My Id" |
|||
}, |
|||
{ |
|||
"fieldname": "active_status", |
|||
"fieldtype": "Select", |
|||
"label": "Active Status", |
|||
"options": "Active\nInactive" |
|||
} |
|||
], |
|||
"index_web_pages_for_search": 1, |
|||
"links": [], |
|||
"modified": "2023-10-19 15:56:03.355802", |
|||
"modified_by": "Administrator", |
|||
"module": "Phase-2", |
|||
"name": "Special Tool Information Category Master", |
|||
"owner": "Administrator", |
|||
"permissions": [ |
|||
{ |
|||
"create": 1, |
|||
"delete": 1, |
|||
"email": 1, |
|||
"export": 1, |
|||
"print": 1, |
|||
"read": 1, |
|||
"report": 1, |
|||
"role": "System Manager", |
|||
"share": 1, |
|||
"write": 1 |
|||
} |
|||
], |
|||
"sort_field": "modified", |
|||
"sort_order": "DESC" |
|||
} |
@ -0,0 +1,15 @@ |
|||
# Copyright (c) 2023, Hard n Soft Technologies Pvt Ltd and contributors |
|||
# For license information, please see license.txt |
|||
|
|||
import frappe |
|||
from frappe.model.document import Document |
|||
|
|||
class SpecialToolInformationCategoryMaster(Document): |
|||
def autoname(self): |
|||
|
|||
count = frappe.db.sql( |
|||
'''select max(my_id) as max_count from `tabSpecial Tool Information Category Master`;''') |
|||
if count[0][0] is not None: |
|||
self.my_id = count[0][0] + 1 |
|||
else: |
|||
self.my_id = 1 |
@ -0,0 +1,8 @@ |
|||
# Copyright (c) 2023, Hard n Soft Technologies Pvt Ltd and Contributors |
|||
# See license.txt |
|||
|
|||
# import frappe |
|||
import unittest |
|||
|
|||
class TestSpecialToolInformationCategoryMaster(unittest.TestCase): |
|||
pass |
Loading…
Reference in new issue