-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from efeone/TASK-2023-00406
feat: Created doctype Smith Details
- Loading branch information
Showing
8 changed files
with
253 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"custom_fields": [ | ||
{ | ||
"_assign": null, | ||
"_comments": null, | ||
"_liked_by": null, | ||
"_user_tags": null, | ||
"allow_in_quick_entry": 0, | ||
"allow_on_submit": 0, | ||
"bold": 0, | ||
"collapsible": 0, | ||
"collapsible_depends_on": null, | ||
"columns": 0, | ||
"creation": "2023-10-20 15:16:08.680216", | ||
"default": null, | ||
"depends_on": null, | ||
"description": null, | ||
"docstatus": 0, | ||
"dt": "Department", | ||
"fetch_from": null, | ||
"fetch_if_empty": 0, | ||
"fieldname": "head_of_department", | ||
"fieldtype": "Link", | ||
"hidden": 0, | ||
"hide_border": 0, | ||
"hide_days": 0, | ||
"hide_seconds": 0, | ||
"idx": 3, | ||
"ignore_user_permissions": 0, | ||
"ignore_xss_filter": 0, | ||
"in_global_search": 0, | ||
"in_list_view": 0, | ||
"in_preview": 0, | ||
"in_standard_filter": 0, | ||
"insert_after": "parent_department", | ||
"is_system_generated": 0, | ||
"is_virtual": 0, | ||
"label": "Head of Department", | ||
"length": 0, | ||
"mandatory_depends_on": null, | ||
"modified": "2023-10-20 15:16:08.680216", | ||
"modified_by": "Administrator", | ||
"module": null, | ||
"name": "Department-head_of_department", | ||
"no_copy": 0, | ||
"non_negative": 0, | ||
"options": "Employee", | ||
"owner": "Administrator", | ||
"permlevel": 0, | ||
"precision": "", | ||
"print_hide": 0, | ||
"print_hide_if_no_value": 0, | ||
"print_width": null, | ||
"read_only": 0, | ||
"read_only_depends_on": null, | ||
"report_hide": 0, | ||
"reqd": 0, | ||
"search_index": 0, | ||
"sort_options": 0, | ||
"translatable": 0, | ||
"unique": 0, | ||
"width": null | ||
} | ||
], | ||
"custom_perms": [], | ||
"doctype": "Department", | ||
"links": [], | ||
"property_setters": [], | ||
"sync_on_migrate": 1 | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) 2023, efeone and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('Smith Details', { | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "format:S{######}", | ||
"creation": "2023-10-18 10:02:01.800347", | ||
"default_view": "List", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"smith_type", | ||
"employee", | ||
"supplier", | ||
"supplier_name", | ||
"employee_name", | ||
"column_break_mhz6m", | ||
"warehouse", | ||
"department", | ||
"head_of_smith", | ||
"section_break_9mmii", | ||
"hourly_rate" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "smith_type", | ||
"fieldtype": "Select", | ||
"label": "Smith Type", | ||
"options": "\nInternal\nExternal" | ||
}, | ||
{ | ||
"fieldname": "department", | ||
"fieldtype": "Link", | ||
"label": "Department", | ||
"options": "Department" | ||
}, | ||
{ | ||
"fieldname": "hourly_rate", | ||
"fieldtype": "Data", | ||
"label": "Hourly Rate" | ||
}, | ||
{ | ||
"fetch_from": "department.head_of_department", | ||
"fieldname": "head_of_smith", | ||
"fieldtype": "Link", | ||
"label": "Head of smith", | ||
"options": "Employee" | ||
}, | ||
{ | ||
"fieldname": "warehouse", | ||
"fieldtype": "Link", | ||
"label": "Warehouse", | ||
"options": "Warehouse" | ||
}, | ||
{ | ||
"depends_on": "eval:doc.smith_type == 'External'", | ||
"fieldname": "supplier", | ||
"fieldtype": "Link", | ||
"label": "Supplier", | ||
"options": "Supplier" | ||
}, | ||
{ | ||
"depends_on": "eval:doc.smith_type == 'Internal'", | ||
"fieldname": "employee", | ||
"fieldtype": "Link", | ||
"label": "Employee", | ||
"options": "Employee" | ||
}, | ||
{ | ||
"fieldname": "column_break_mhz6m", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "section_break_9mmii", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"depends_on": "eval:doc.smith_type == 'External'", | ||
"fetch_from": "supplier.supplier_name", | ||
"fieldname": "supplier_name", | ||
"fieldtype": "Data", | ||
"label": "Supplier Name" | ||
}, | ||
{ | ||
"depends_on": "eval:doc.smith_type =='Internal'", | ||
"fetch_from": "employee.employee_name", | ||
"fieldname": "employee_name", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Employee Name" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2023-10-20 16:01:00.222753", | ||
"modified_by": "Administrator", | ||
"module": "AuMMS", | ||
"name": "Smith Details", | ||
"naming_rule": "Expression", | ||
"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", | ||
"states": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2023, efeone and contributors | ||
# For license information, please see license.txt | ||
|
||
from frappe.model.document import Document | ||
|
||
|
||
class SmithDetails(Document): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023, efeone and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestSmithDetails(FrappeTestCase): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters