fix: More MR UX fixes
This commit is contained in:
parent
cc6ca97dc5
commit
90d9d80ef9
@ -381,7 +381,6 @@ class ProductionPlan(Document):
|
|||||||
"transaction_date": nowdate(),
|
"transaction_date": nowdate(),
|
||||||
"status": "Draft",
|
"status": "Draft",
|
||||||
"company": self.company,
|
"company": self.company,
|
||||||
"requested_by": frappe.session.user,
|
|
||||||
'material_request_type': material_request_type,
|
'material_request_type': material_request_type,
|
||||||
'customer': item_doc.customer or ''
|
'customer': item_doc.customer or ''
|
||||||
})
|
})
|
||||||
|
@ -989,7 +989,6 @@ def make_raw_material_request(items, company, sales_order, project=None):
|
|||||||
doctype = 'Material Request',
|
doctype = 'Material Request',
|
||||||
transaction_date = nowdate(),
|
transaction_date = nowdate(),
|
||||||
company = company,
|
company = company,
|
||||||
requested_by = frappe.session.user,
|
|
||||||
material_request_type = 'Purchase'
|
material_request_type = 'Purchase'
|
||||||
))
|
))
|
||||||
for item in raw_materials:
|
for item in raw_materials:
|
||||||
|
@ -280,7 +280,8 @@ frappe.ui.form.on('Material Request', {
|
|||||||
fieldname:'default_supplier',
|
fieldname:'default_supplier',
|
||||||
fieldtype: 'Link',
|
fieldtype: 'Link',
|
||||||
options: 'Supplier',
|
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: () => {
|
get_query: () => {
|
||||||
return{
|
return{
|
||||||
query: "erpnext.stock.doctype.material_request.material_request.get_default_supplier_query",
|
query: "erpnext.stock.doctype.material_request.material_request.get_default_supplier_query",
|
||||||
|
@ -11,9 +11,10 @@
|
|||||||
"naming_series",
|
"naming_series",
|
||||||
"title",
|
"title",
|
||||||
"material_request_type",
|
"material_request_type",
|
||||||
"transfer_status",
|
|
||||||
"customer",
|
"customer",
|
||||||
|
"status",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
|
"transaction_date",
|
||||||
"schedule_date",
|
"schedule_date",
|
||||||
"company",
|
"company",
|
||||||
"amended_from",
|
"amended_from",
|
||||||
@ -25,11 +26,8 @@
|
|||||||
"scan_barcode",
|
"scan_barcode",
|
||||||
"items",
|
"items",
|
||||||
"more_info",
|
"more_info",
|
||||||
"requested_by",
|
|
||||||
"transaction_date",
|
|
||||||
"column_break2",
|
|
||||||
"status",
|
|
||||||
"per_ordered",
|
"per_ordered",
|
||||||
|
"column_break2",
|
||||||
"per_received",
|
"per_received",
|
||||||
"printing_details",
|
"printing_details",
|
||||||
"letter_head",
|
"letter_head",
|
||||||
@ -82,7 +80,8 @@
|
|||||||
"fieldname": "customer",
|
"fieldname": "customer",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Customer",
|
"label": "Customer",
|
||||||
"options": "Customer"
|
"options": "Customer",
|
||||||
|
"print_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_2",
|
"fieldname": "column_break_2",
|
||||||
@ -92,12 +91,12 @@
|
|||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"fieldname": "schedule_date",
|
"fieldname": "schedule_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Required By"
|
"label": "Required By"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
@ -153,18 +152,10 @@
|
|||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"options": "fa fa-file-text"
|
"options": "fa fa-file-text"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "requested_by",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"in_standard_filter": 1,
|
|
||||||
"label": "Requested For",
|
|
||||||
"options": "Email"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"default": "Today",
|
"default": "Today",
|
||||||
"fieldname": "transaction_date",
|
"fieldname": "transaction_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Transaction Date",
|
"label": "Transaction Date",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "transaction_date",
|
"oldfieldname": "transaction_date",
|
||||||
@ -197,7 +188,7 @@
|
|||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.docstatus==1",
|
"depends_on": "eval:doc.per_ordered > 0",
|
||||||
"fieldname": "per_ordered",
|
"fieldname": "per_ordered",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
"label": "% Ordered",
|
"label": "% Ordered",
|
||||||
@ -208,7 +199,7 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.docstatus==1",
|
"depends_on": "eval:doc.per_received > 0",
|
||||||
"fieldname": "per_received",
|
"fieldname": "per_received",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
"label": "% Received",
|
"label": "% Received",
|
||||||
@ -282,13 +273,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "warehouse_section",
|
"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",
|
"fieldname": "set_warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Set Warehouse",
|
"in_list_view": 1,
|
||||||
|
"label": "Set Target Warehouse",
|
||||||
"options": "Warehouse"
|
"options": "Warehouse"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -300,26 +293,18 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.material_request_type == 'Material Transfer'",
|
"depends_on": "eval:doc.material_request_type == 'Material Transfer'",
|
||||||
|
"description": "Sets 'Source Warehouse' in each row of the Items table.",
|
||||||
"fieldname": "set_from_warehouse",
|
"fieldname": "set_from_warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Set From Warehouse",
|
"label": "Set Source Warehouse",
|
||||||
"options": "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",
|
"icon": "fa fa-ticket",
|
||||||
"idx": 70,
|
"idx": 70,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-08-10 13:27:54.891058",
|
"modified": "2020-09-19 00:36:00.306761",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Material Request",
|
"name": "Material Request",
|
||||||
|
@ -7,7 +7,7 @@ def get_data():
|
|||||||
'fieldname': 'material_request',
|
'fieldname': 'material_request',
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
'label': _('Related'),
|
'label': _('Reference'),
|
||||||
'items': ['Request for Quotation', 'Supplier Quotation', 'Purchase Order']
|
'items': ['Request for Quotation', 'Supplier Quotation', 'Purchase Order']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -13,12 +13,10 @@
|
|||||||
"schedule_date",
|
"schedule_date",
|
||||||
"section_break_4",
|
"section_break_4",
|
||||||
"description",
|
"description",
|
||||||
|
"column_break_12",
|
||||||
"item_group",
|
"item_group",
|
||||||
"brand",
|
"brand",
|
||||||
"image_section",
|
|
||||||
"image",
|
"image",
|
||||||
"column_break_12",
|
|
||||||
"manufacturer_part_no",
|
|
||||||
"quantity_and_warehouse",
|
"quantity_and_warehouse",
|
||||||
"qty",
|
"qty",
|
||||||
"stock_uom",
|
"stock_uom",
|
||||||
@ -34,26 +32,26 @@
|
|||||||
"amount",
|
"amount",
|
||||||
"manufacture_details",
|
"manufacture_details",
|
||||||
"manufacturer",
|
"manufacturer",
|
||||||
|
"manufacturer_part_no",
|
||||||
|
"col_break_mfg",
|
||||||
|
"bom_no",
|
||||||
|
"accounting_dimensions_section",
|
||||||
|
"project",
|
||||||
|
"dimension_col_break",
|
||||||
|
"cost_center",
|
||||||
"more_info",
|
"more_info",
|
||||||
"lead_time_date",
|
"lead_time_date",
|
||||||
"sales_order",
|
"sales_order",
|
||||||
"sales_order_item",
|
"sales_order_item",
|
||||||
"production_plan",
|
"production_plan",
|
||||||
"material_request_plan_item",
|
"material_request_plan_item",
|
||||||
|
"expense_account",
|
||||||
"col_break4",
|
"col_break4",
|
||||||
"min_order_qty",
|
"min_order_qty",
|
||||||
"projected_qty",
|
"projected_qty",
|
||||||
"actual_qty",
|
"actual_qty",
|
||||||
"ordered_qty",
|
"ordered_qty",
|
||||||
"received_qty",
|
"received_qty",
|
||||||
"accounting_details",
|
|
||||||
"expense_account",
|
|
||||||
"accounting_dimensions_section",
|
|
||||||
"project",
|
|
||||||
"dimension_col_break",
|
|
||||||
"cost_center",
|
|
||||||
"section_break_37",
|
|
||||||
"bom_no",
|
|
||||||
"section_break_46",
|
"section_break_46",
|
||||||
"page_break"
|
"page_break"
|
||||||
],
|
],
|
||||||
@ -164,7 +162,7 @@
|
|||||||
"fieldname": "warehouse",
|
"fieldname": "warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "For Warehouse",
|
"label": "Target Warehouse",
|
||||||
"oldfieldname": "warehouse",
|
"oldfieldname": "warehouse",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Warehouse",
|
"options": "Warehouse",
|
||||||
@ -191,12 +189,14 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Rate"
|
"label": "Rate",
|
||||||
|
"print_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -326,6 +326,7 @@
|
|||||||
"report_hide": 1
|
"report_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:doc.docstatus==1",
|
||||||
"fieldname": "ordered_qty",
|
"fieldname": "ordered_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Completed Qty",
|
"label": "Completed Qty",
|
||||||
@ -335,12 +336,6 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collapsible": 1,
|
|
||||||
"fieldname": "accounting_details",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"label": "Accounting Details"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "expense_account",
|
"fieldname": "expense_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -367,21 +362,10 @@
|
|||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsible": 1,
|
"depends_on": "eval:doc.docstatus==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"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "received_qty",
|
"fieldname": "received_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Received Quantity",
|
"label": "Received Qty",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
@ -398,6 +382,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
|
"depends_on": "eval:in_list([\"Manufacture\", \"Purchase\"], parent.material_request_type)",
|
||||||
"fieldname": "manufacture_details",
|
"fieldname": "manufacture_details",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Manufacture"
|
"label": "Manufacture"
|
||||||
@ -430,10 +415,11 @@
|
|||||||
"depends_on": "eval:parent.material_request_type == \"Material Transfer\"",
|
"depends_on": "eval:parent.material_request_type == \"Material Transfer\"",
|
||||||
"fieldname": "from_warehouse",
|
"fieldname": "from_warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Source Warehouse (Material Transfer)",
|
"label": "Source Warehouse",
|
||||||
"options": "Warehouse"
|
"options": "Warehouse"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 1,
|
||||||
"fieldname": "bom_no",
|
"fieldname": "bom_no",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "BOM No",
|
"label": "BOM No",
|
||||||
@ -444,12 +430,17 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "section_break_46",
|
"fieldname": "section_break_46",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "col_break_mfg",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-05-15 09:00:00.992835",
|
"modified": "2020-09-18 20:52:33.265074",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Material Request Item",
|
"name": "Material Request Item",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user