fix: More MR UX fixes
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index c889237..5b14d05 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -381,7 +381,6 @@
"transaction_date": nowdate(),
"status": "Draft",
"company": self.company,
- "requested_by": frappe.session.user,
'material_request_type': material_request_type,
'customer': item_doc.customer or ''
})
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index f882898..62a5d4e 100755
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -989,7 +989,6 @@
doctype = 'Material Request',
transaction_date = nowdate(),
company = company,
- requested_by = frappe.session.user,
material_request_type = 'Purchase'
))
for item in raw_materials:
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 3c4e353..8c47098 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -280,7 +280,8 @@
fieldname:'default_supplier',
fieldtype: 'Link',
options: 'Supplier',
- description: __('Select a Supplier from the Default Supplier List of the items below.'),
+ description: __('Select a Supplier from the Default Suppliers of the items below. \
+ On selection, a Purchase Order will be made against items belonging to the selected Supplier only.'),
get_query: () => {
return{
query: "erpnext.stock.doctype.material_request.material_request.get_default_supplier_query",
diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json
index 44503d2..da73bc8 100644
--- a/erpnext/stock/doctype/material_request/material_request.json
+++ b/erpnext/stock/doctype/material_request/material_request.json
@@ -11,9 +11,10 @@
"naming_series",
"title",
"material_request_type",
- "transfer_status",
"customer",
+ "status",
"column_break_2",
+ "transaction_date",
"schedule_date",
"company",
"amended_from",
@@ -25,11 +26,8 @@
"scan_barcode",
"items",
"more_info",
- "requested_by",
- "transaction_date",
- "column_break2",
- "status",
"per_ordered",
+ "column_break2",
"per_received",
"printing_details",
"letter_head",
@@ -82,7 +80,8 @@
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
- "options": "Customer"
+ "options": "Customer",
+ "print_hide": 1
},
{
"fieldname": "column_break_2",
@@ -92,12 +91,12 @@
"allow_on_submit": 1,
"fieldname": "schedule_date",
"fieldtype": "Date",
+ "in_list_view": 1,
"label": "Required By"
},
{
"fieldname": "company",
"fieldtype": "Link",
- "in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"oldfieldname": "company",
@@ -154,17 +153,9 @@
"options": "fa fa-file-text"
},
{
- "fieldname": "requested_by",
- "fieldtype": "Data",
- "in_standard_filter": 1,
- "label": "Requested For",
- "options": "Email"
- },
- {
"default": "Today",
"fieldname": "transaction_date",
"fieldtype": "Date",
- "in_list_view": 1,
"label": "Transaction Date",
"no_copy": 1,
"oldfieldname": "transaction_date",
@@ -197,7 +188,7 @@
"width": "100px"
},
{
- "depends_on": "eval:doc.docstatus==1",
+ "depends_on": "eval:doc.per_ordered > 0",
"fieldname": "per_ordered",
"fieldtype": "Percent",
"label": "% Ordered",
@@ -208,7 +199,7 @@
"read_only": 1
},
{
- "depends_on": "eval:doc.docstatus==1",
+ "depends_on": "eval:doc.per_received > 0",
"fieldname": "per_received",
"fieldtype": "Percent",
"label": "% Received",
@@ -282,13 +273,15 @@
},
{
"fieldname": "warehouse_section",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "Warehouse"
},
{
- "description": "Sets 'For Warehouse' in each row of the Items table.",
+ "description": "Sets 'Target Warehouse' in each row of the Items table.",
"fieldname": "set_warehouse",
"fieldtype": "Link",
- "label": "Set Warehouse",
+ "in_list_view": 1,
+ "label": "Set Target Warehouse",
"options": "Warehouse"
},
{
@@ -300,26 +293,18 @@
},
{
"depends_on": "eval:doc.material_request_type == 'Material Transfer'",
+ "description": "Sets 'Source Warehouse' in each row of the Items table.",
"fieldname": "set_from_warehouse",
"fieldtype": "Link",
- "label": "Set From Warehouse",
+ "label": "Set Source Warehouse",
"options": "Warehouse"
- },
- {
- "allow_on_submit": 1,
- "depends_on": "eval:doc.add_to_transit == 1",
- "fieldname": "transfer_status",
- "fieldtype": "Select",
- "label": "Transfer Status",
- "options": "\nNot Started\nIn Transit\nCompleted",
- "read_only": 1
}
],
"icon": "fa fa-ticket",
"idx": 70,
"is_submittable": 1,
"links": [],
- "modified": "2020-08-10 13:27:54.891058",
+ "modified": "2020-09-19 00:36:00.306761",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",
diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py
index 0e4fb7a..f3e5e5d 100644
--- a/erpnext/stock/doctype/material_request/material_request_dashboard.py
+++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py
@@ -7,7 +7,7 @@
'fieldname': 'material_request',
'transactions': [
{
- 'label': _('Related'),
+ 'label': _('Reference'),
'items': ['Request for Quotation', 'Supplier Quotation', 'Purchase Order']
},
{
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json
index 32bd4a0..08c2738 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.json
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.json
@@ -13,12 +13,10 @@
"schedule_date",
"section_break_4",
"description",
+ "column_break_12",
"item_group",
"brand",
- "image_section",
"image",
- "column_break_12",
- "manufacturer_part_no",
"quantity_and_warehouse",
"qty",
"stock_uom",
@@ -34,26 +32,26 @@
"amount",
"manufacture_details",
"manufacturer",
+ "manufacturer_part_no",
+ "col_break_mfg",
+ "bom_no",
+ "accounting_dimensions_section",
+ "project",
+ "dimension_col_break",
+ "cost_center",
"more_info",
"lead_time_date",
"sales_order",
"sales_order_item",
"production_plan",
"material_request_plan_item",
+ "expense_account",
"col_break4",
"min_order_qty",
"projected_qty",
"actual_qty",
"ordered_qty",
"received_qty",
- "accounting_details",
- "expense_account",
- "accounting_dimensions_section",
- "project",
- "dimension_col_break",
- "cost_center",
- "section_break_37",
- "bom_no",
"section_break_46",
"page_break"
],
@@ -164,7 +162,7 @@
"fieldname": "warehouse",
"fieldtype": "Link",
"in_list_view": 1,
- "label": "For Warehouse",
+ "label": "Target Warehouse",
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
"options": "Warehouse",
@@ -191,12 +189,14 @@
{
"fieldname": "rate",
"fieldtype": "Currency",
- "label": "Rate"
+ "label": "Rate",
+ "print_hide": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount",
+ "print_hide": 1,
"read_only": 1
},
{
@@ -326,6 +326,7 @@
"report_hide": 1
},
{
+ "depends_on": "eval:doc.docstatus==1",
"fieldname": "ordered_qty",
"fieldtype": "Float",
"label": "Completed Qty",
@@ -336,12 +337,6 @@
"read_only": 1
},
{
- "collapsible": 1,
- "fieldname": "accounting_details",
- "fieldtype": "Section Break",
- "label": "Accounting Details"
- },
- {
"fieldname": "expense_account",
"fieldtype": "Link",
"label": "Expense Account",
@@ -367,21 +362,10 @@
"print_hide": 1
},
{
- "collapsible": 1,
- "fieldname": "image_section",
- "fieldtype": "Section Break",
- "label": "Image"
- },
- {
- "depends_on": "eval:parent.material_request_type == \"Manufacture\"",
- "fieldname": "section_break_37",
- "fieldtype": "Section Break",
- "label": "Manufacturing"
- },
- {
+ "depends_on": "eval:doc.docstatus==1",
"fieldname": "received_qty",
"fieldtype": "Float",
- "label": "Received Quantity",
+ "label": "Received Qty",
"no_copy": 1,
"print_hide": 1,
"read_only": 1
@@ -398,6 +382,7 @@
},
{
"collapsible": 1,
+ "depends_on": "eval:in_list([\"Manufacture\", \"Purchase\"], parent.material_request_type)",
"fieldname": "manufacture_details",
"fieldtype": "Section Break",
"label": "Manufacture"
@@ -430,10 +415,11 @@
"depends_on": "eval:parent.material_request_type == \"Material Transfer\"",
"fieldname": "from_warehouse",
"fieldtype": "Link",
- "label": "Source Warehouse (Material Transfer)",
+ "label": "Source Warehouse",
"options": "Warehouse"
},
{
+ "allow_on_submit": 1,
"fieldname": "bom_no",
"fieldtype": "Link",
"label": "BOM No",
@@ -444,12 +430,17 @@
{
"fieldname": "section_break_46",
"fieldtype": "Section Break"
+ },
+ {
+ "fieldname": "col_break_mfg",
+ "fieldtype": "Column Break"
}
],
"idx": 1,
+ "index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2020-05-15 09:00:00.992835",
+ "modified": "2020-09-18 20:52:33.265074",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request Item",