chore: Linter and Sider fixes

- Translatable  strings cannot be multi line or be formatted by '+'
- Reduce no of tabs in stock_entry.js
This commit is contained in:
marination 2020-11-02 08:50:48 +05:30
parent 97d38548aa
commit 542ae6ab97
3 changed files with 5 additions and 6 deletions

View File

@ -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())

View File

@ -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",

View File

@ -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"));
}
},