Skip to content

Commit

Permalink
Merge pull request #156 from efeone/smith
Browse files Browse the repository at this point in the history
feat: Remaned Doctype Smith Details to Smith.
  • Loading branch information
muhammadmp authored Oct 24, 2023
2 parents f41e174 + 46f3c91 commit e6c4762
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 41 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2023, efeone and contributors
// For license information, please see license.txt

frappe.ui.form.on('Smith Details', {
frappe.ui.form.on('Smith', {
// refresh: function(frm) {

// }
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"actions": [],
"allow_rename": 1,
"autoname": "format:S{######}",
"creation": "2023-10-18 10:02:01.800347",
"creation": "2023-10-24 09:54:51.116100",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
Expand All @@ -28,22 +28,37 @@
"options": "\nInternal\nExternal"
},
{
"fieldname": "department",
"depends_on": "eval:doc.smith_type == 'Internal'",
"fieldname": "employee",
"fieldtype": "Link",
"label": "Department",
"options": "Department"
"label": "Employee",
"options": "Employee"
},
{
"fieldname": "hourly_rate",
"depends_on": "eval:doc.smith_type == 'External'",
"fieldname": "supplier",
"fieldtype": "Link",
"label": "Supplier",
"options": "Supplier"
},
{
"depends_on": "eval:doc.smith_type == 'External'",
"fetch_from": "supplier.supplier_name",
"fieldname": "supplier_name",
"fieldtype": "Data",
"label": "Hourly Rate"
"label": "Supplier Name"
},
{
"fetch_from": "department.head_of_department",
"fieldname": "head_of_smith",
"fieldtype": "Link",
"label": "Head of smith",
"options": "Employee"
"depends_on": "eval:doc.smith_type =='Internal'",
"fetch_from": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name"
},
{
"fieldname": "column_break_mhz6m",
"fieldtype": "Column Break"
},
{
"fieldname": "warehouse",
Expand All @@ -52,49 +67,34 @@
"options": "Warehouse"
},
{
"depends_on": "eval:doc.smith_type == 'External'",
"fieldname": "supplier",
"fieldname": "department",
"fieldtype": "Link",
"label": "Supplier",
"options": "Supplier"
"label": "Department",
"options": "Department"
},
{
"depends_on": "eval:doc.smith_type == 'Internal'",
"fieldname": "employee",
"fetch_from": "department.head_of_department",
"fieldname": "head_of_smith",
"fieldtype": "Link",
"label": "Employee",
"label": "Head of smith",
"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",
"fieldname": "hourly_rate",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name"
"label": "Hourly Rate"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-10-20 16:01:00.222753",
"modified": "2023-10-24 09:54:51.116100",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Smith Details",
"name": "Smith",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2023, efeone and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class SmithDetails(Document):
pass
class Smith(Document):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
from frappe.tests.utils import FrappeTestCase


class TestSmithDetails(FrappeTestCase):
class TestSmith(FrappeTestCase):
pass

0 comments on commit e6c4762

Please sign in to comment.