fix: More MR UX fixes

This commit is contained in:
marination 2020-09-19 00:43:53 +05:30
parent cc6ca97dc5
commit 90d9d80ef9
6 changed files with 44 additions and 69 deletions

View File

@ -381,7 +381,6 @@ class ProductionPlan(Document):
"transaction_date": nowdate(),
"status": "Draft",
"company": self.company,
"requested_by": frappe.session.user,
'material_request_type': material_request_type,
'customer': item_doc.customer or ''
})

View File

@ -989,7 +989,6 @@ def make_raw_material_request(items, company, sales_order, project=None):
doctype = 'Material Request',
transaction_date = nowdate(),
company = company,
requested_by = frappe.session.user,
material_request_type = 'Purchase'
))
for item in raw_materials:

View File

@ -280,7 +280,8 @@ frappe.ui.form.on('Material Request', {
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",

View File

@ -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",
@ -153,18 +152,10 @@
"oldfieldtype": "Section Break",
"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",

View File

@ -7,7 +7,7 @@ def get_data():
'fieldname': 'material_request',
'transactions': [
{
'label': _('Related'),
'label': _('Reference'),
'items': ['Request for Quotation', 'Supplier Quotation', 'Purchase Order']
},
{

View File

@ -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",
@ -335,12 +336,6 @@
"print_hide": 1,
"read_only": 1
},
{
"collapsible": 1,
"fieldname": "accounting_details",
"fieldtype": "Section Break",
"label": "Accounting Details"
},
{
"fieldname": "expense_account",
"fieldtype": "Link",
@ -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",