Merge pull request #18168 from netchampfaris/stock-validation-message
fix: Add links in validation message
diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py
index da60550..c79c5b8 100644
--- a/erpnext/config/manufacturing.py
+++ b/erpnext/config/manufacturing.py
@@ -4,43 +4,6 @@
def get_data():
return [
{
- "label": _("Production"),
- "icon": "fa fa-star",
- "items": [
- {
- "type": "doctype",
- "name": "Work Order",
- "description": _("Orders released for production."),
- "onboard": 1,
- "dependencies": ["Item", "BOM"]
- },
- {
- "type": "doctype",
- "name": "Production Plan",
- "description": _("Generate Material Requests (MRP) and Work Orders."),
- "onboard": 1,
- "dependencies": ["Item", "BOM"]
- },
- {
- "type": "doctype",
- "name": "Stock Entry",
- "onboard": 1,
- "dependencies": ["Item"]
- },
- {
- "type": "doctype",
- "name": "Timesheet",
- "description": _("Time Sheet for manufacturing."),
- "onboard": 1,
- "dependencies": ["Activity Type"]
- },
- {
- "type": "doctype",
- "name": "Job Card"
- }
- ]
- },
- {
"label": _("Bill of Materials"),
"items": [
{
@@ -86,6 +49,43 @@
]
},
{
+ "label": _("Production"),
+ "icon": "fa fa-star",
+ "items": [
+ {
+ "type": "doctype",
+ "name": "Work Order",
+ "description": _("Orders released for production."),
+ "onboard": 1,
+ "dependencies": ["Item", "BOM"]
+ },
+ {
+ "type": "doctype",
+ "name": "Production Plan",
+ "description": _("Generate Material Requests (MRP) and Work Orders."),
+ "onboard": 1,
+ "dependencies": ["Item", "BOM"]
+ },
+ {
+ "type": "doctype",
+ "name": "Stock Entry",
+ "onboard": 1,
+ "dependencies": ["Item"]
+ },
+ {
+ "type": "doctype",
+ "name": "Timesheet",
+ "description": _("Time Sheet for manufacturing."),
+ "onboard": 1,
+ "dependencies": ["Activity Type"]
+ },
+ {
+ "type": "doctype",
+ "name": "Job Card"
+ }
+ ]
+ },
+ {
"label": _("Tools"),
"icon": "fa fa-wrench",
"items": [
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 8fb21bc..a3ecea1 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -383,8 +383,9 @@
setup_sms: function() {
var me = this;
+ let blacklist = ['Purchase Invoice', 'BOM'];
if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped", "Closed"], this.frm.doc.status)
- && this.frm.doctype != "Purchase Invoice") {
+ && !blacklist.includes(this.frm.doctype)) {
this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); });
}
},