-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
866df9f
commit 68c997a
Showing
19 changed files
with
896 additions
and
151 deletions.
There are no files selected for viewing
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,19 @@ | ||
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("Plant Floor", { | ||
refresh(frm) { | ||
frm.trigger('prepare_dashboard') | ||
}, | ||
|
||
prepare_dashboard(frm) { | ||
let wrapper = $(frm.fields_dict["plant_dashboard"].wrapper); | ||
wrapper.empty(); | ||
|
||
frappe.visual_plant_floor = new frappe.ui.VisualPlantFloor({ | ||
wrapper: wrapper, | ||
skip_filters: true, | ||
plant_floor: frm.doc.name, | ||
}); | ||
}, | ||
}); |
81 changes: 81 additions & 0 deletions
81
erpnext/manufacturing/doctype/plant_floor/plant_floor.json
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,81 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "field:floor_name", | ||
"creation": "2023-10-06 15:06:07.976066", | ||
"default_view": "List", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"workstations_tab", | ||
"plant_dashboard", | ||
"details_tab", | ||
"column_break_mvbx", | ||
"floor_name", | ||
"section_break_cczv", | ||
"volumetric_weight" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "floor_name", | ||
"fieldtype": "Data", | ||
"label": "Floor Name", | ||
"unique": 1 | ||
}, | ||
{ | ||
"depends_on": "eval:!doc.__islocal", | ||
"fieldname": "workstations_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Dashboard" | ||
}, | ||
{ | ||
"fieldname": "plant_dashboard", | ||
"fieldtype": "HTML", | ||
"label": "Plant Dashboard" | ||
}, | ||
{ | ||
"fieldname": "details_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Details" | ||
}, | ||
{ | ||
"fieldname": "column_break_mvbx", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "section_break_cczv", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "volumetric_weight", | ||
"fieldtype": "Float", | ||
"label": "Volumetric Weight" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2023-12-04 15:36:09.641203", | ||
"modified_by": "Administrator", | ||
"module": "Manufacturing", | ||
"name": "Plant Floor", | ||
"naming_rule": "By fieldname", | ||
"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,21 @@ | ||
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class PlantFloor(Document): | ||
# begin: auto-generated types | ||
# This code is auto-generated. Do not modify anything in this block. | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from frappe.types import DF | ||
|
||
floor_name: DF.Data | None | ||
volumetric_weight: DF.Float | ||
# end: auto-generated types | ||
|
||
pass |
9 changes: 9 additions & 0 deletions
9
erpnext/manufacturing/doctype/plant_floor/test_plant_floor.py
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, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestPlantFloor(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
Oops, something went wrong.