From 542ae6ab97f1ffbc873e80cc492b88e14a7b3c92 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 2 Nov 2020 08:50:48 +0530 Subject: [PATCH] chore: Linter and Sider fixes - Translatable strings cannot be multi line or be formatted by '+' - Reduce no of tabs in stock_entry.js --- erpnext/buying/doctype/purchase_order/purchase_order.js | 2 +- erpnext/stock/doctype/material_request/material_request.js | 3 +-- erpnext/stock/doctype/stock_entry/stock_entry.js | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 3c6ebd6604..2f52a9e035 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -299,7 +299,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( if(me.values) { me.values.sub_con_rm_items.map((row,i) => { if (!row.item_code || !row.rm_item_code || !row.warehouse || !row.qty || row.qty === 0) { - frappe.throw(__("Item Code, warehouse, quantity are required on row" + (i+1))); + frappe.throw(__("Item Code, warehouse, quantity are required on row {0}", [i+1])); } }) me._make_rm_stock_entry(me.dialog.fields_dict.sub_con_rm_items.grid.get_selected_children()) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index f004e9145a..01edd99e9d 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -281,8 +281,7 @@ frappe.ui.form.on('Material Request', { fieldname:'default_supplier', fieldtype: 'Link', options: 'Supplier', - 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.'), + 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/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 32923353ee..91217582ca 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -425,9 +425,9 @@ frappe.ui.form.on('Stock Entry', { show_bom_custom_button: function(frm){ if (frm.doc.docstatus === 0 && ['Material Issue', 'Material Receipt', 'Material Transfer', 'Send to Subcontractor'].includes(frm.doc.purpose)) { - frm.add_custom_button(__('Bill of Materials'), function() { - frm.events.get_items_from_bom(frm); - }, __("Get Items From")); + frm.add_custom_button(__('Bill of Materials'), function() { + frm.events.get_items_from_bom(frm); + }, __("Get Items From")); } },