From 88aa7b824e3e34fa7f67c1e3ebbc2787cb87c53d Mon Sep 17 00:00:00 2001 From: Alan <2.alan.tom@gmail.com> Date: Tue, 31 Aug 2021 15:16:04 +0530 Subject: [PATCH] fix: pass labels through translation function (#27252) --- .../process_loss_report.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/report/process_loss_report/process_loss_report.py b/erpnext/stock/report/process_loss_report/process_loss_report.py index 7494328ab4..3d48ebde1a 100644 --- a/erpnext/stock/report/process_loss_report/process_loss_report.py +++ b/erpnext/stock/report/process_loss_report/process_loss_report.py @@ -2,6 +2,7 @@ # For license information, please see license.txt import frappe +from frappe import _ from typing import Dict, List, Tuple Filters = frappe._dict @@ -24,57 +25,57 @@ def get_data(filters: Filters) -> Data: def get_columns() -> Columns: return [ { - 'label': 'Work Order', + 'label': _('Work Order'), 'fieldname': 'name', 'fieldtype': 'Link', 'options': 'Work Order', 'width': '200' }, { - 'label': 'Item', + 'label': _('Item'), 'fieldname': 'production_item', 'fieldtype': 'Link', 'options': 'Item', 'width': '100' }, { - 'label': 'Status', + 'label': _('Status'), 'fieldname': 'status', 'fieldtype': 'Data', 'width': '100' }, { - 'label': 'Manufactured Qty', + 'label': _('Manufactured Qty'), 'fieldname': 'produced_qty', 'fieldtype': 'Float', 'width': '150' }, { - 'label': 'Loss Qty', + 'label': _('Loss Qty'), 'fieldname': 'process_loss_qty', 'fieldtype': 'Float', 'width': '150' }, { - 'label': 'Actual Manufactured Qty', + 'label': _('Actual Manufactured Qty'), 'fieldname': 'actual_produced_qty', 'fieldtype': 'Float', 'width': '150' }, { - 'label': 'Loss Value', + 'label': _('Loss Value'), 'fieldname': 'total_pl_value', 'fieldtype': 'Float', 'width': '150' }, { - 'label': 'FG Value', + 'label': _('FG Value'), 'fieldname': 'total_fg_value', 'fieldtype': 'Float', 'width': '150' }, { - 'label': 'Raw Material Value', + 'label': _('Raw Material Value'), 'fieldname': 'total_rm_value', 'fieldtype': 'Float', 'width': '150'