From 4bab0a2f546d45c095a40d328c97c8fd2cbd2ce9 Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Wed, 10 Sep 2014 15:36:53 +0800 Subject: [PATCH 1/7] various translation missed __() --- .../payment_reconciliation.js | 4 ++-- .../page/accounts_browser/accounts_browser.js | 2 +- erpnext/accounts/page/pos/pos.js | 2 +- erpnext/home/page/activity/activity.js | 2 +- .../selling/page/sales_browser/sales_browser.js | 16 ++++++++-------- .../selling/page/sales_funnel/sales_funnel.js | 10 +++++----- erpnext/stock/doctype/item/item.js | 2 +- erpnext/stock/doctype/price_list/price_list.js | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index c495a35825..97484da468 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -36,8 +36,8 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext } }); - var help_content = ' Note:
'+ - ''; + var help_content = ' ' + __("Note") + ':
'+ + ''; this.frm.set_value("reconcile_help", help_content); }, diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js index ba8d747d72..8802093f44 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.js +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js @@ -45,7 +45,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){ 'icon-plus'); } - wrapper.appframe.set_title_right('Refresh', function() { + wrapper.appframe.set_title_right(__('Refresh'), function() { wrapper.$company_select.change(); }); diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 0d06de1152..e394410766 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -1,7 +1,7 @@ frappe.pages['pos'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: 'Start POS', + title: __('Start POS'), single_column: true }); diff --git a/erpnext/home/page/activity/activity.js b/erpnext/home/page/activity/activity.js index ac44b4d776..f50f6c89e5 100644 --- a/erpnext/home/page/activity/activity.js +++ b/erpnext/home/page/activity/activity.js @@ -20,7 +20,7 @@ frappe.pages['activity'].onload = function(wrapper) { }); list.run(); - wrapper.appframe.set_title_right("Refresh", function() { list.run(); }); + wrapper.appframe.set_title_right(__("Refresh"), function() { list.run(); }); // Build Report Button if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) { diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js index a8fd464c68..b5587ce06b 100644 --- a/erpnext/selling/page/sales_browser/sales_browser.js +++ b/erpnext/selling/page/sales_browser/sales_browser.js @@ -8,7 +8,7 @@ pscript['onload_Sales Browser'] = function(wrapper){ wrapper.appframe.add_module_icon("Selling") - wrapper.appframe.set_title_right('Refresh', function() { + wrapper.appframe.set_title_right(__('Refresh'), function() { wrapper.make_tree(); }); @@ -44,7 +44,7 @@ pscript['onshow_Sales Browser'] = function(wrapper){ // set route var ctype = frappe.get_route()[1] || 'Territory'; - wrapper.appframe.set_title(ctype+' Tree') + wrapper.appframe.set_title(__('{0} Tree',[__(ctype)])); if(erpnext.sales_chart && erpnext.sales_chart.ctype != ctype) { wrapper.make_tree(); @@ -64,7 +64,7 @@ erpnext.SalesChart = Class.extend({ this.tree = new frappe.ui.Tree({ parent: $(parent), - label: root, + label: __(root), args: {ctype: ctype}, method: 'erpnext.selling.page.sales_browser.sales_browser.get_children', toolbar: [ @@ -112,20 +112,20 @@ erpnext.SalesChart = Class.extend({ var fields = [ {fieldtype:'Data', fieldname: 'name_field', - label:'New ' + me.ctype + ' Name', reqd:true}, - {fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes', + label:__('New {0} Name',[me.ctype]), reqd:true}, + {fieldtype:'Select', fieldname:'is_group', label:__('Group Node'), options:'No\nYes', description: __("Further nodes can be only created under 'Group' type nodes")}, - {fieldtype:'Button', fieldname:'create_new', label:'Create New' } + {fieldtype:'Button', fieldname:'create_new', label:__('Create New') } ] if(me.ctype == "Sales Person") { - fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee', + fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:__('Employee'), options:'Employee', description: __("Please enter Employee Id of this sales parson")}); } // the dialog var d = new frappe.ui.Dialog({ - title: __('New ') + __(me.ctype), + title: __('New {0}',[__(me.ctype)]), fields: fields }) diff --git a/erpnext/selling/page/sales_funnel/sales_funnel.js b/erpnext/selling/page/sales_funnel/sales_funnel.js index cc46c046ce..76707629cf 100644 --- a/erpnext/selling/page/sales_funnel/sales_funnel.js +++ b/erpnext/selling/page/sales_funnel/sales_funnel.js @@ -4,7 +4,7 @@ frappe.pages['sales-funnel'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: 'Sales Funnel', + title: __('Sales Funnel'), single_column: true }); @@ -30,13 +30,13 @@ erpnext.SalesFunnel = Class.extend({ this.elements = { layout: $(wrapper).find(".layout-main"), - from_date: wrapper.appframe.add_date("From Date"), - to_date: wrapper.appframe.add_date("To Date"), - refresh_btn: wrapper.appframe.set_title_right("Refresh", + from_date: wrapper.appframe.add_date(__("From Date")), + to_date: wrapper.appframe.add_date(__("To Date")), + refresh_btn: wrapper.appframe.set_title_right(__("Refresh"), function() { me.get_data(); }, "icon-refresh"), }; - this.elements.no_data = $('
No Data
') + this.elements.no_data = $('
' + __("No Data") + '
') .toggle(false) .appendTo(this.elements.layout); diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 93c1191da5..b9b55ccd72 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -47,7 +47,7 @@ cur_frm.cscript.make_dashboard = function() { } cur_frm.cscript.edit_prices_button = function() { - cur_frm.add_custom_button("Add / Edit Prices", function() { + cur_frm.add_custom_button(__("Add / Edit Prices)", function() { frappe.set_route("Report", "Item Price", {"item_code": cur_frm.doc.name}); }, "icon-money"); } diff --git a/erpnext/stock/doctype/price_list/price_list.js b/erpnext/stock/doctype/price_list/price_list.js index ea7b6dbcf0..125242faaa 100644 --- a/erpnext/stock/doctype/price_list/price_list.js +++ b/erpnext/stock/doctype/price_list/price_list.js @@ -7,7 +7,7 @@ $.extend(cur_frm.cscript, { }, refresh: function() { - cur_frm.add_custom_button("Add / Edit Prices", function() { + cur_frm.add_custom_button(__("Add / Edit Prices"), function() { frappe.route_options = { "price_list": cur_frm.doc.name }; From 351be9ca428fa15b2f676642937c82527924a368 Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Thu, 11 Sep 2014 08:37:49 +0800 Subject: [PATCH 2/7] translations. --- erpnext/selling/page/sales_browser/sales_browser.js | 2 +- .../supplier_wise_sales_analytics.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js index b5587ce06b..d254028865 100644 --- a/erpnext/selling/page/sales_browser/sales_browser.js +++ b/erpnext/selling/page/sales_browser/sales_browser.js @@ -112,7 +112,7 @@ erpnext.SalesChart = Class.extend({ var fields = [ {fieldtype:'Data', fieldname: 'name_field', - label:__('New {0} Name',[me.ctype]), reqd:true}, + label:__('New {0} Name',[__(me.ctype)]), reqd:true}, {fieldtype:'Select', fieldname:'is_group', label:__('Group Node'), options:'No\nYes', description: __("Further nodes can be only created under 'Group' type nodes")}, {fieldtype:'Button', fieldname:'create_new', label:__('Create New') } diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py index 22b4ec62ed..04beb6a211 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import flt def execute(filters=None): @@ -40,12 +41,12 @@ def execute(filters=None): def get_columns(filters): """return columns based on filters""" - columns = ["Item:Link/Item:100"] + ["Item Name::100"] + \ - ["Description::150"] + ["UOM:Link/UOM:90"] + \ - ["Consumed Qty:Float:110"] + ["Consumed Amount:Currency:130"] + \ - ["Delivered Qty:Float:110"] + ["Delivered Amount:Currency:130"] + \ - ["Total Qty:Float:110"] + ["Total Amount:Currency:130"] + \ - ["Supplier(s)::250"] + columns = [_("Item") + ":Link/Item:100"] + [_("Item Name") + "::100"] + \ + [_("Description") + "::150"] + [_("UOM") + ":Link/UOM:90"] + \ + [_("Consumed Qty") + ":Float:110"] + [_("Consumed Amount") + ":Currency:130"] + \ + [_("Delivered Qty") + ":Float:110"] + [_("Delivered Amount") + ":Currency:130"] + \ + [_("Total Qty") + ":Float:110"] + [_("Total Amount") + ":Currency:130"] + \ + [_("Supplier(s)") + "::250"] return columns From 951da0ca3ded51eeb1103f38b75374fb386a16ea Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Thu, 11 Sep 2014 16:15:27 +0800 Subject: [PATCH 3/7] added translations to report py file. --- .../accounts_payable/accounts_payable.py | 12 +++++------ .../accounts_receivable.py | 14 ++++++------- .../bank_clearance_summary.py | 6 +++--- .../bank_reconciliation_statement.py | 6 +++--- .../budget_variance_report.py | 12 +++++------ .../report/general_ledger/general_ledger.py | 6 +++--- .../report/gross_profit/gross_profit.py | 11 +++++----- .../item_wise_purchase_register.py | 13 ++++++------ .../item_wise_sales_register.py | 13 ++++++------ .../payment_period_based_on_invoice_date.py | 10 +++++----- .../purchase_register/purchase_register.py | 10 +++++----- .../report/sales_register/sales_register.py | 8 ++++---- .../supplier_addresses_and_contacts.json | 6 +++--- erpnext/controllers/trends.py | 16 +++++++-------- .../employee_birthday/employee_birthday.py | 7 ++++--- .../employee_leave_balance.py | 8 ++++---- .../monthly_attendance_sheet.py | 8 ++++---- .../monthly_salary_register.py | 8 ++++---- .../daily_time_log_summary.py | 7 ++++--- .../project_wise_stock_tracking.py | 13 ++++++------ .../customer_acquisition_and_loyalty.py | 15 +++++++------- .../customers_not_buying_since_long_time.py | 20 +++++++++---------- ..._person_target_variance_item_group_wise.py | 12 +++++------ .../sales_person_wise_transaction_summary.py | 8 ++++---- ...rritory_target_variance_item_group_wise.py | 12 +++++------ .../batch_wise_balance_history.py | 6 +++--- .../stock/report/item_prices/item_prices.py | 7 ++++--- .../itemwise_recommended_reorder_level.py | 8 ++++---- .../stock/report/stock_ageing/stock_ageing.py | 7 ++++--- .../stock/report/stock_ledger/stock_ledger.py | 13 ++++++------ .../stock_projected_qty.py | 13 ++++++------ .../support_analytics/support_analytics.js | 2 +- 32 files changed, 164 insertions(+), 153 deletions(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.py b/erpnext/accounts/report/accounts_payable/accounts_payable.py index b65c1e8ba8..3ae741e772 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.py @@ -67,12 +67,12 @@ def execute(filters=None): def get_columns(supplier_naming_by): columns = [ - "Posting Date:Date:80", "Account:Link/Account:150", "Voucher Type::110", - "Voucher No::120", "::30", "Due Date:Date:80", "Bill No::80", "Bill Date:Date:80", - "Invoiced Amount:Currency:100", "Paid Amount:Currency:100", - "Outstanding Amount:Currency:100", "Age:Int:50", "0-30:Currency:100", - "30-60:Currency:100", "60-90:Currency:100", "90-Above:Currency:100", - "Supplier:Link/Supplier:150" + _("Posting Date") + ":Date:80", _("Account") + ":Link/Account:150", _("Voucher Type") + "::110", + _("Voucher No") + "::120", "::30", _("Due Date") + ":Date:80", _("Bill No") + "::80", _("Bill Date") + ":Date:80", + _("Invoiced Amount") + ":Currency:100", _("Paid Amount") + ":Currency:100", + _("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50", "0-30:Currency:100", + "30-60:Currency:100", "60-90:Currency:100", _("90-Above") + ":Currency:100", + _("Supplier") + ":Link/Supplier:150" ] if supplier_naming_by == "Naming Series": diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 427669fba8..2891b053f0 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -20,13 +20,13 @@ class AccountsReceivableReport(object): def get_columns(self, customer_naming_by): columns = [ - "Posting Date:Date:80", "Account:Link/Account:150", - "Voucher Type::110", "Voucher No::120", "::30", - "Due Date:Date:80", - "Invoiced Amount:Currency:100", "Payment Received:Currency:100", - "Outstanding Amount:Currency:100", "Age:Int:50", "0-30:Currency:100", - "30-60:Currency:100", "60-90:Currency:100", "90-Above:Currency:100", - "Customer:Link/Customer:200" + _("Posting Date") + ":Date:80", _("Account") + ":Link/Account:150", + _("Voucher Type") + "::110", _("Voucher No") + "::120", "::30", + _("Due Date") + ":Date:80", + _("Invoiced Amount") + ":Currency:100", _("Payment Received") + ":Currency:100", + _("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50", "0-30:Currency:100", + "30-60:Currency:100", "60-90:Currency:100", _("90-Above") + ":Currency:100", + _("Customer") + ":Link/Customer:200" ] if customer_naming_by == "Naming Series": diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py index f86c932422..dbf86e352d 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py @@ -14,9 +14,9 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Journal Voucher:Link/Journal Voucher:140", "Account:Link/Account:140", - "Posting Date:Date:100", "Clearance Date:Date:110", "Against Account:Link/Account:200", - "Debit:Currency:120", "Credit:Currency:120" + return [_("Journal Voucher") + ":Link/Journal Voucher:140", _("Account") + ":Link/Account:140", + _("Posting Date") + ":Date:100", _("Clearance Date") + ":Date:110", _("Against Account") + ":Link/Account:200", + _("Debit") + ":Currency:120", _("Credit") + ":Currency:120" ] def get_conditions(filters): diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 923aa340c0..cbe5988c14 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -47,9 +47,9 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Posting Date:Date:100", "Journal Voucher:Link/Journal Voucher:220", - "Debit:Currency:120", "Credit:Currency:120", - "Against Account:Link/Account:200", "Reference::100", "Ref Date:Date:110", "Clearance Date:Date:110" + return [_("Posting Date") + ":Date:100", _("Journal Voucher") + ":Link/Journal Voucher:220", + _("Debit") + ":Currency:120", _("Credit") + ":Currency:120", + _("Against Account") + ":Link/Account:200", _("Reference") + "::100", _("Ref Date") + ":Date:110", _("Clearance Date") + ":Date:110" ] def get_entries(filters): diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py index c98d2054f3..fba4aa2da8 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py @@ -44,21 +44,21 @@ def get_columns(filters): msgprint(_("Please specify") + ": " + label, raise_exception=True) - columns = ["Cost Center:Link/Cost Center:120", "Account:Link/Account:120"] + columns = [_("Cost Center") + ":Link/Cost Center:120", _("Account") + ":Link/Account:120"] group_months = False if filters["period"] == "Monthly" else True for from_date, to_date in get_period_date_ranges(filters["period"], filters["fiscal_year"]): - for label in ["Target (%s)", "Actual (%s)", "Variance (%s)"]: + for label in [_("Target") + " (%s)", _("Actual") + " (%s)", _("Variance") + " (%s)"]: if group_months: - label = label % (from_date.strftime("%b") + " - " + to_date.strftime("%b")) + label = label % (_(from_date.strftime("%b")) + " - " + _(to_date.strftime("%b"))) else: - label = label % from_date.strftime("%b") + label = label % _(from_date.strftime("%b")) columns.append(label+":Float:120") - return columns + ["Total Target:Float:120", "Total Actual:Float:120", - "Total Variance:Float:120"] + return columns + [_("Total Target") + ":Float:120", _("Total Actual") + ":Float:120", + _("Total Variance") + ":Float:120"] #Get cost center & target details def get_costcenter_target_details(filters): diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index d1ea4421a5..362f42e5e5 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -34,9 +34,9 @@ def validate_filters(filters, account_details): frappe.throw(_("From Date must be before To Date")) def get_columns(): - return ["Posting Date:Date:100", "Account:Link/Account:200", "Debit:Float:100", - "Credit:Float:100", "Voucher Type::120", "Voucher No::160", "Link::20", - "Against Account::120", "Cost Center:Link/Cost Center:100", "Remarks::400"] + return [_("Posting Date") + ":Date:100", _("Account") + ":Link/Account:200", _("Debit") + ":Float:100", + _("Credit") + ":Float:100", _("Voucher Type") + "::120", _("Voucher No") + "::160", _("Link") + "::20", + _("Against Account") + "::120", _("Cost Center") + ":Link/Cost Center:100", _("Remarks") + "::400"] def get_result(filters, account_details): gl_entries = get_gl_entries(filters) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 1bbf2d116e..76e7b4a163 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import flt from erpnext.stock.utils import get_buying_amount, get_sales_bom_buying_amount @@ -13,11 +14,11 @@ def execute(filters=None): source = get_source_data(filters) item_sales_bom = get_item_sales_bom() - columns = ["Delivery Note/Sales Invoice::120", "Link::30", "Posting Date:Date", "Posting Time", - "Item Code:Link/Item", "Item Name", "Description", "Warehouse:Link/Warehouse", - "Qty:Float", "Selling Rate:Currency", "Avg. Buying Rate:Currency", - "Selling Amount:Currency", "Buying Amount:Currency", - "Gross Profit:Currency", "Gross Profit %:Percent", "Project:Link/Project"] + columns = [__("Delivery Note/Sales Invoice") + "::120", _("Link") + "::30", _("Posting Date") + ":Date", _("Posting Time"), + _("Item Code") + ":Link/Item", _("Item Name"), _("Description"), _("Warehouse") + ":Link/Warehouse", + _("Qty") + ":Float", _("Selling Rate") + ":Currency", _("Avg. Buying Rate") + ":Currency", + _("Selling Amount") + ":Currency", _("Buying Amount") + ":Currency", + _("Gross Profit") + ":Currency", _("Gross Profit %") + ":Percent", _("Project") + ":Link/Project"] data = [] for row in source: selling_amount = flt(row.base_amount) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index 8e74873d47..127e9cb61f 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import msgprint, _ from frappe.utils import flt def execute(filters=None): @@ -33,12 +34,12 @@ def execute(filters=None): def get_columns(): - return ["Item Code:Link/Item:120", "Item Name::120", "Item Group:Link/Item Group:100", - "Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier:Link/Customer:120", - "Supplier Account:Link/Account:120", "Project:Link/Project:80", "Company:Link/Company:100", - "Purchase Order:Link/Purchase Order:100", "Purchase Receipt:Link/Purchase Receipt:100", - "Expense Account:Link/Account:140", "Qty:Float:120", "Rate:Currency:120", - "Amount:Currency:120"] + return [_("Item Code") + ":Link/Item:120", _("Item Name") + "::120", _("Item Group") + ":Link/Item Group:100", + _("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80", _("Supplier") + ":Link/Customer:120", + _("Supplier Account") + ":Link/Account:120", _("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100", + _("Purchase Order") + ":Link/Purchase Order:100", _("Purchase Receipt") + ":Link/Purchase Receipt:100", + _("Expense Account") + ":Link/Account:140", _("Qty") + ":Float:120", _("Rate") + ":Currency:120", + _("Amount") + ":Currency:120"] def get_conditions(filters): conditions = "" diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index 6a0d051c2c..2840291c70 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import msgprint, _ from frappe.utils import flt def execute(filters=None): @@ -32,12 +33,12 @@ def execute(filters=None): def get_columns(): return [ - "Item Code:Link/Item:120", "Item Name::120", "Item Group:Link/Item Group:100", - "Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer:Link/Customer:120", - "Customer Account:Link/Account:120", "Territory:Link/Territory:80", - "Project:Link/Project:80", "Company:Link/Company:100", "Sales Order:Link/Sales Order:100", - "Delivery Note:Link/Delivery Note:100", "Income Account:Link/Account:140", - "Qty:Float:120", "Rate:Currency:120", "Amount:Currency:120" + _("Item Code") + ":Link/Item:120", _("Item Name") + "::120", _("Item Group") + ":Link/Item Group:100", + _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer") + ":Link/Customer:120", + _("Customer Account") + ":Link/Account:120", _("Territory") + ":Link/Territory:80", + _("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100", _("Sales Order") + ":Link/Sales Order:100", + _("Delivery Note") + ":Link/Delivery Note:100", _("Income Account") + ":Link/Account:140", + _("Qty") + ":Float:120", _("Rate") + ":Currency:120", _("Amount") + ":Currency:120" ] def get_conditions(filters): diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py index b70c1dda8e..b1d74373fc 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py @@ -37,11 +37,11 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Journal Voucher:Link/Journal Voucher:140", "Account:Link/Account:140", - "Posting Date:Date:100", "Against Invoice:Link/Purchase Invoice:130", - "Against Invoice Posting Date:Date:130", "Debit:Currency:120", "Credit:Currency:120", - "Reference No::100", "Reference Date:Date:100", "Remarks::150", "Age:Int:40", - "0-30:Currency:100", "30-60:Currency:100", "60-90:Currency:100", "90-Above:Currency:100" + return [_("Journal Voucher") + ":Link/Journal Voucher:140", _("Account") + ":Link/Account:140", + _("Posting Date") + ":Date:100", _("Against Invoice") + ":Link/Purchase Invoice:130", + _("Against Invoice Posting Date") + ":Date:130", _("Debit") + ":Currency:120", _("Credit") + ":Currency:120", + _("Reference No") + "::100", _("Reference Date") + ":Date:100", _("Remarks") + "::150", _("Age") +":Int:40", + "0-30:Currency:100", "30-60:Currency:100", "60-90:Currency:100", _("90-Above") + ":Currency:100" ] def get_conditions(filters): diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index a82ec29935..40006575c4 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -63,11 +63,11 @@ def execute(filters=None): def get_columns(invoice_list): """return columns based on filters""" columns = [ - "Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier Id::120", - "Supplier Name::120", "Supplier Account:Link/Account:120", - "Account Group:LInk/Account:120", "Project:Link/Project:80", "Bill No::120", - "Bill Date:Date:80", "Remarks::150", - "Purchase Order:Link/Purchase Order:100", "Purchase Receipt:Link/Purchase Receipt:100" + _("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80", _("Supplier Id") + "::120", + _("Supplier Name") + "::120", _("Supplier Account") + ":Link/Account:120", + _("Account Group") + ":Link/Account:120", _("Project") + ":Link/Project:80", _("Bill No") + "::120", + _("Bill Date") + ":Date:80", _("Remarks") + "::150", + _("Purchase Order") + ":Link/Purchase Order:100", _("Purchase Receipt") + ":Link/Purchase Receipt:100" ] expense_accounts = tax_accounts = expense_columns = tax_columns = [] diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 4131ee2c0a..1bde11002d 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -63,10 +63,10 @@ def execute(filters=None): def get_columns(invoice_list): """return columns based on filters""" columns = [ - "Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer Id::120", - "Customer Name::120", "Customer Account:Link/Account:120", "Account Group:LInk/Account:120", - "Territory:Link/Territory:80", "Project:Link/Project:80", "Remarks::150", - "Sales Order:Link/Sales Order:100", "Delivery Note:Link/Delivery Note:100" + _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer Id") + "::120", + _("Customer Name") + "::120", _("Customer Account") + ":Link/Account:120", _("Account Group") + ":Link/Account:120", + _("Territory") + ":Link/Territory:80", _("Project") + ":Link/Project:80", _("Remarks") + "::150", + _("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100" ] income_accounts = tax_accounts = income_columns = tax_columns = [] diff --git a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json b/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json index c9fd7256cb..9ae1adce8f 100644 --- a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json +++ b/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json @@ -5,12 +5,12 @@ "doctype": "Report", "idx": 1, "is_standard": "Yes", - "modified": "2014-06-03 07:18:17.358554", - "modified_by": "Administrator", + "modified": "2014-09-11 08:53:17.358554", + "modified_by": "Administrator", "module": "Buying", "name": "Supplier Addresses and Contacts", "owner": "Administrator", - "query": "SELECT\n `tabSupplier`.name as \"Supplier:Link/Supplier:120\",\n\t`tabSupplier`.supplier_name as \"Supplier Name::120\",\n\t`tabSupplier`.supplier_type as \"Supplier Type:Link/Supplier Type:120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n concat_ws(', ', `tabContact`.first_name, `tabContact`.last_name) as 'Contact Name::180',\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Id::120\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact::120\"\nFROM\n\t`tabSupplier`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.supplier=`tabSupplier`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.supplier=`tabSupplier`.name\n\t)\nWHERE\n\t`tabSupplier`.docstatus<2\nORDER BY\n\t`tabSupplier`.name asc", + "query": "SELECT\n `tabSupplier`.name as \"Supplier:Link/Supplier:120\",\n\t`tabSupplier`.supplier_name as \"Supplier Name::120\",\n\t`tabSupplier`.supplier_type as \"Supplier Type:Link/Supplier Type:120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n concat_ws(', ', `tabContact`.first_name, `tabContact`.last_name) as \"Contact Name::180\",\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Id::120\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact::120\"\nFROM\n\t`tabSupplier`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.supplier=`tabSupplier`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.supplier=`tabSupplier`.name\n\t)\nWHERE\n\t`tabSupplier`.docstatus<2\nORDER BY\n\t`tabSupplier`.name asc", "ref_doctype": "Supplier", "report_name": "Supplier Addresses and Contacts", "report_type": "Query Report" diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index e62b661ce4..c2d5e0090c 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -16,10 +16,10 @@ def get_columns(filters, trans): # get conditions for grouping filter cond group_by_cols = group_wise_column(filters.get("group_by")) - columns = based_on_details["based_on_cols"] + period_cols + ["Total(Qty):Float:120", "Total(Amt):Currency:120"] + columns = based_on_details["based_on_cols"] + period_cols + [_("Total(Qty)") + ":Float:120", _("Total(Amt)") + ":Currency:120"] if group_by_cols: columns = based_on_details["based_on_cols"] + group_by_cols + period_cols + \ - ["Total(Qty):Float:120", "Total(Amt):Currency:120"] + [_("Total(Qty)") + ":Float:120", _("Total(Amt)") + ":Currency:120"] conditions = {"based_on_select": based_on_details["based_on_select"], "period_wise_select": period_select, "columns": columns, "group_by": based_on_details["based_on_group_by"], "grbc": group_by_cols, "trans": trans, @@ -130,8 +130,8 @@ def period_wise_columns_query(filters, trans): get_period_wise_columns(dt, filters.get("period"), pwc) query_details = get_period_wise_query(dt, trans_date, query_details) else: - pwc = [filters.get("fiscal_year") + " (Qty):Float:120", - filters.get("fiscal_year") + " (Amt):Currency:120"] + pwc = [_(filters.get("fiscal_year")) + " ("+_("Qty") + "):Float:120", + _(filters.get("fiscal_year")) + " ("+ _("Amt") + "):Currency:120"] query_details = " SUM(t2.qty), SUM(t2.base_amount)," query_details += 'SUM(t2.qty), SUM(t2.base_amount)' @@ -139,11 +139,11 @@ def period_wise_columns_query(filters, trans): def get_period_wise_columns(bet_dates, period, pwc): if period == 'Monthly': - pwc += [get_mon(bet_dates[0]) + " (Qty):Float:120", - get_mon(bet_dates[0]) + " (Amt):Currency:120"] + pwc += [_(get_mon(bet_dates[0])) + " (" + _("Qty") + "):Float:120", + _(get_mon(bet_dates[0])) + " (" + _("Amt") + "):Currency:120"] else: - pwc += [get_mon(bet_dates[0]) + "-" + get_mon(bet_dates[1]) + " (Qty):Float:120", - get_mon(bet_dates[0]) + "-" + get_mon(bet_dates[1]) + " (Amt):Currency:120"] + pwc += [_(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Qty") + "):Float:120", + _(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Amt") + "):Currency:120"] def get_period_wise_query(bet_dates, trans_date, query_details): query_details += """SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.qty, NULL)), diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.py b/erpnext/hr/report/employee_birthday/employee_birthday.py index dfa64996f9..4ca97ce1af 100644 --- a/erpnext/hr/report/employee_birthday/employee_birthday.py +++ b/erpnext/hr/report/employee_birthday/employee_birthday.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import flt def execute(filters=None): @@ -15,9 +16,9 @@ def execute(filters=None): def get_columns(): return [ - "Employee:Link/Employee:120", "Name:Data:200", "Date of Birth:Date:100", - "Branch:Link/Branch:120", "Department:Link/Department:120", - "Designation:Link/Designation:120", "Gender::60", "Company:Link/Company:120" + _("Employee") + ":Link/Employee:120", _("Name") + ":Data:200", _("Date of Birth")+ ":Date:100", + _("Branch") + ":Link/Branch:120", _("Department") + ":Link/Department:120", + _("Designation") + ":Link/Designation:120", _("Gender") + "::60", _("Company") + ":Link/Company:120" ] def get_employees(filters): diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py index 62d819a437..4b9284804b 100644 --- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py +++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py @@ -39,13 +39,13 @@ def execute(filters=None): ','.join(['%s']*len(employee_names)), employee_names, as_dict=True) columns = [ - "Fiscal Year", "Employee:Link/Employee:150", "Employee Name::200", "Department::150" + _("Fiscal Year"), _("Employee") + ":Link/Employee:150", _("Employee Name") + "::200", _("Department") +"::150" ] for leave_type in leave_types: - columns.append(leave_type + " Allocated:Float") - columns.append(leave_type + " Taken:Float") - columns.append(leave_type + " Balance:Float") + columns.append(_(leave_type) + " " + _("Allocated") + ":Float") + columns.append(_(leave_type) + " " + _("Taken") + ":Float") + columns.append(_(leave_type) + " " + _("Balance") + ":Float") data = {} for d in allocations: diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index bf15f884dd..ee113bf246 100644 --- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -45,15 +45,15 @@ def execute(filters=None): def get_columns(filters): columns = [ - "Employee:Link/Employee:120", "Employee Name::140", "Branch:Link/Branch:120", - "Department:Link/Department:120", "Designation:Link/Designation:120", - "Company:Link/Company:120" + _("Employee") + ":Link/Employee:120", _("Employee Name") + "::140", _("Branch")+ ":Link/Branch:120", + _("Department") + ":Link/Department:120", _("Designation") + ":Link/Designation:120", + _("Company") + ":Link/Company:120" ] for day in range(filters["total_days_in_month"]): columns.append(cstr(day+1) +"::20") - columns += ["Total Present:Float:80", "Total Absent:Float:80"] + columns += [_("Total Present") + ":Float:80", _("Total Absent") + ":Float:80"] return columns def get_attendance_list(conditions, filters): diff --git a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py index 4fc28e5a94..537c49894e 100644 --- a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py +++ b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py @@ -36,10 +36,10 @@ def execute(filters=None): def get_columns(salary_slips): columns = [ - "Employee:Link/Employee:120", "Employee Name::140", "Branch:Link/Branch:120", - "Department:Link/Department:120", "Designation:Link/Designation:120", - "Company:Link/Company:120", "Month::80", "Leave Without pay:Float:130", - "Payment Days:Float:120" + _("Employee") + ":Link/Employee:120", _("Employee Name") + "::140", _("Branch") + ":Link/Branch:120", + _("Department") + ":Link/Department:120", _("Designation") + ":Link/Designation:120", + _("Company") + ":Link/Company:120", _("Month") + "::80", _("Leave Without Pay") + ":Float:130", + _("Payment Days") + ":Float:120" ] earning_types = frappe.db.sql_list("""select distinct e_type from `tabSalary Slip Earning` diff --git a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py index 185bcd9a6c..b8f746b15d 100644 --- a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py +++ b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import flt def execute(filters=None): @@ -12,9 +13,9 @@ def execute(filters=None): filters["from_time"] = "00:00:00" filters["to_time"] = "24:00:00" - columns = ["Time Log:Link/Time Log:120", "Employee::150", "From Datetime::140", - "To Datetime::140", "Hours::70", "Activity Type::120", "Task:Link/Task:150", - "Task Subject::180", "Project:Link/Project:120", "Status::70"] + columns = [_("Time Log") + ":Link/Time Log:120", _("Employee") + "::150", _("From Datetime") + "::140", + _("To Datetime") + "::140", _("Hours") + "::70", _("Activity Type") + "::120", _("Task") + ":Link/Task:150", + _("Task Subject") + "::180", _("Project") + ":Link/Project:120", _("Status") + "::70"] user_map = get_user_map() task_map = get_task_map() diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py index daed4aba61..69c1bbb4b9 100644 --- a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py +++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py @@ -1,7 +1,8 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -import frappe +import frappe +from frappe import _ def execute(filters=None): columns = get_columns() @@ -21,11 +22,11 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Project Id:Link/Project:140", "Cost of Purchased Items:Currency:160", - "Cost of Issued Items:Currency:160", "Cost of Delivered Items:Currency:160", - "Project Name::120", "Project Status::120", "Company:Link/Company:100", - "Customer:Link/Customer:140", "Project Value:Currency:120", - "Project Start Date:Date:120", "Completion Date:Date:120"] + return [_("Project Id") + ":Link/Project:140", _("Cost of Purchased Items") + ":Currency:160", + _("Cost of Issued Items") + ":Currency:160", _("Cost of Delivered Items") + ":Currency:160", + _("Project Name") + "::120", _("Project Status") + "::120", _("Company") + ":Link/Company:100", + _("Customer") + ":Link/Customer:140", _("Project Value") + ":Currency:120", + _("Project Start Date") + ":Date:120", _("Completion Date") + ":Date:120"]+ def get_project_details(): return frappe.db.sql(""" select name, project_name, status, company, customer, project_value, diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py index 43c4e58ecd..1ec9871b77 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import getdate, cint import calendar @@ -52,13 +53,13 @@ def execute(filters=None): new[1], repeat[1], new[1] + repeat[1]]) return [ - "Year", "Month", - "New Customers:Int", - "Repeat Customers:Int", - "Total:Int", - "New Customer Revenue:Currency:150", - "Repeat Customer Revenue:Currency:150", - "Total Revenue:Currency:150" + _("Year"), _("Month"), + _("New Customers") + ":Int", + _("Repeat Customers") + ":Int", + _("Total") + ":Int", + _("New Customer Revenue") + ":Currency:150", + _("Repeat Customer Revenue") + ":Currency:150", + _("Total Revenue") + ":Currency:150" ], out diff --git a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py index 35cdf59c50..a87c4a119f 100644 --- a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py +++ b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py @@ -50,14 +50,14 @@ def get_last_so_amt(customer): def get_columns(): return [ - "Customer:Link/Customer:120", - "Customer Name:Data:120", - "Territory::120", - "Customer Group::120", - "Number of Order::120", - "Total Order Value:Currency:120", - "Total Order Considered:Currency:160", - "Last Order Amount:Currency:160", - "Last Sales Order Date:Date:160", - "Days Since Last Order::160" + _("Customer") + ":Link/Customer:120", + _("Customer Name") + ":Data:120", + _("Territory") + "::120", + _("Customer Group") + "::120", + _("Number of Order") + "::120", + _("Total Order Value") + ":Currency:120", + _("Total Order Considered") + ":Currency:160", + _("Last Order Amount") + ":Currency:160", + _("Last Sales Order Date") + ":Date:160", + _("Days Since Last Order") + "::160" ] diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py index b272a83d27..00b4cde0b6 100644 --- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py +++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py @@ -43,21 +43,21 @@ def get_columns(filters): msgprint(_("Please specify") + ": " + label, raise_exception=True) - columns = ["Sales Person:Link/Sales Person:120", "Item Group:Link/Item Group:120"] + columns = [_("Sales Person") + ":Link/Sales Person:120", _("Item Group") + ":Link/Item Group:120"] group_months = False if filters["period"] == "Monthly" else True for from_date, to_date in get_period_date_ranges(filters["period"], filters["fiscal_year"]): - for label in ["Target (%s)", "Achieved (%s)", "Variance (%s)"]: + for label in [_("Target") + " (%s)", _("Achieved") + " (%s)", _("Variance") + " (%s)"]: if group_months: - label = label % (from_date.strftime("%b") + " - " + to_date.strftime("%b")) + label = label % (_(from_date.strftime("%b")) + " - " + _(to_date.strftime("%b"))) else: - label = label % from_date.strftime("%b") + label = label % _(from_date.strftime("%b")) columns.append(label+":Float:120") - return columns + ["Total Target:Float:120", "Total Achieved:Float:120", - "Total Variance:Float:120"] + return columns + [_("Total Target") + ":Float:120", _("Total Achieved") + ":Float:120", + _("Total Variance") + ":Float:120"] #Get sales person & item group details def get_salesperson_details(filters): diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index c7ee35fa9c..f0bed767a7 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -18,10 +18,10 @@ def get_columns(filters): msgprint(_("Please select the document type first"), raise_exception=1) return [filters["doc_type"] + ":Link/" + filters["doc_type"] + ":140", - "Customer:Link/Customer:140", "Territory:Link/Territory:100", "Posting Date:Date:100", - "Item Code:Link/Item:120", "Qty:Float:100", "Amount:Currency:120", - "Sales Person:Link/Sales Person:140", "Contribution %:Float:110", - "Contribution Amount:Currency:140"] + _("Customer") + ":Link/Customer:140", _("Territory") + ":Link/Territory:100", _("Posting Date") + ":Date:100", + _("Item Code") + ":Link/Item:120", _("Qty") + ":Float:100", _("Amount") + ":Currency:120", + _("Sales Person") + ":Link/Sales Person:140", _("Contribution %") + ":Float:110", + _("Contribution Amount") + ":Currency:140"] def get_entries(filters): date_field = filters["doc_type"] == "Sales Order" and "transaction_date" or "posting_date" diff --git a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py index 831e6b7c5f..0ceb2d904d 100644 --- a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py +++ b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py @@ -43,20 +43,20 @@ def get_columns(filters): label = (" ".join(fieldname.split("_"))).title() msgprint(_("Please specify") + ": " + label, raise_exception=True) - columns = ["Territory:Link/Territory:120", "Item Group:Link/Item Group:120"] + columns = [_("Territory") + ":Link/Territory:120", _("Item Group") + ":Link/Item Group:120"] group_months = False if filters["period"] == "Monthly" else True for from_date, to_date in get_period_date_ranges(filters["period"], filters["fiscal_year"]): - for label in ["Target (%s)", "Achieved (%s)", "Variance (%s)"]: + for label in [_("Target") +" (%s)", _("Achieved") + " (%s)", _("Variance") + " (%s)"]: if group_months: - label = label % (from_date.strftime("%b") + " - " + to_date.strftime("%b")) + label = label % (_(from_date.strftime("%b")) + " - " + _(to_date.strftime("%b"))) else: - label = label % from_date.strftime("%b") + label = label % _(from_date.strftime("%b")) columns.append(label+":Float:120") - return columns + ["Total Target:Float:120", "Total Achieved:Float:120", - "Total Variance:Float:120"] + return columns + [_("Total Target") + ":Float:120", _("Total Achieved") + ":Float:120", + _("Total Variance") + ":Float:120"] #Get territory & item group details def get_territory_details(filters): diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py index 1de86be8e0..9b94ee61e1 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py @@ -29,9 +29,9 @@ def execute(filters=None): def get_columns(filters): """return columns based on filters""" - columns = ["Item:Link/Item:100"] + ["Item Name::150"] + ["Description::150"] + \ - ["Warehouse:Link/Warehouse:100"] + ["Batch:Link/Batch:100"] + ["Opening Qty::90"] + \ - ["In Qty::80"] + ["Out Qty::80"] + ["Balance Qty::90"] + columns = [_("Item") + ":Link/Item:100"] + [_("Item Name") + "::150"] + [_("Description") + "::150"] + \ + [_("Warehouse") + ":Link/Warehouse:100"] + [_("Batch") + ":Link/Batch:100"] + [_("Opening Qty") + "::90"] + \ + [_("In Qty") + "::80"] + [_("Out Qty") + "::80"] + [_("Balance Qty") + "::90"] return columns diff --git a/erpnext/stock/report/item_prices/item_prices.py b/erpnext/stock/report/item_prices/item_prices.py index 6d75069cf9..2b413fd29b 100644 --- a/erpnext/stock/report/item_prices/item_prices.py +++ b/erpnext/stock/report/item_prices/item_prices.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import msgprint, _ from frappe.utils import flt def execute(filters=None): @@ -33,9 +34,9 @@ def execute(filters=None): def get_columns(filters): """return columns based on filters""" - columns = ["Item:Link/Item:100", "Item Name::150", "Description::150", "UOM:Link/UOM:80", - "Last Purchase Rate:Currency:90", "Valuation Rate:Currency:80", "Sales Price List::80", - "Purchase Price List::80", "BOM Rate:Currency:90"] + columns = [_("Item") + ":Link/Item:100", _("Item Name") + "::150", _("Description") + "::150", _("UOM") + ":Link/UOM:80", + _("Last Purchase Rate") + ":Currency:90", _("Valuation Rate") + ":Currency:80", _("Sales Price List") + "::80", + _("Purchase Price List") + "::80", _("BOM Rate") + ":Currency:90"] return columns diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py index 9b4bb061a1..0ffe681b2f 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py @@ -36,10 +36,10 @@ def execute(filters=None): def get_columns(): return[ - "Item:Link/Item:120", "Item name:Data:120", "Description::160", - "Minimum Inventory Level:Float:160", "Lead Time Days:Float:120", "Consumed:Float:120", - "Delivered:Float:120", "Total Outgoing:Float:120", "Avg Daily Outgoing:Float:160", - "Reorder Level:Float:120" + _("Item") + ":Link/Item:120", _("Item Name") + ":Data:120", _("Description") + "::160", + _("Minimum Inventory Level") + ":Float:160", _("Lead Time Days") + ":Float:120", _("Consumed") + ":Float:120", + _("Delivered") + ":Float:120", _("Total Outgoing") + ":Float:120", _("Avg Daily Outgoing") + ":Float:160", + _("Reorder Level") + ":Float:120" ] def get_item_info(): diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index d8a8dc72ea..fc4786123e 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.utils import date_diff def execute(filters=None): @@ -35,9 +36,9 @@ def get_average_age(fifo_queue, to_date): return (age_qty / total_qty) if total_qty else 0.0 def get_columns(): - return ["Item Code:Link/Item:100", "Item Name::100", "Description::200", - "Item Group:Link/Item Group:100", "Brand:Link/Brand:100", "Average Age:Float:100", - "Earliest:Int:80", "Latest:Int:80", "UOM:Link/UOM:100"] + return [_("Item Code") + ":Link/Item:100", _("Item Name") + "::100", _("Description") + "::200", + _("Item Group") + ":Link/Item Group:100", _("Brand") + ":Link/Brand:100", _("Average Age") + ":Float:100", + _("Earliest") + ":Int:80", _("Latest") + ":Int:80", _("UOM") + ":Link/UOM:100"] def get_fifo_queue(filters): item_details = {} diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py index 73a2c2a278..4c5458dbb2 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.py +++ b/erpnext/stock/report/stock_ledger/stock_ledger.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ def execute(filters=None): columns = get_columns() @@ -26,12 +27,12 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Date:Datetime:95", "Item:Link/Item:130", "Item Name::100", "Item Group:Link/Item Group:100", - "Brand:Link/Brand:100", "Description::200", "Warehouse:Link/Warehouse:100", - "Stock UOM:Link/UOM:100", "Qty:Float:50", "Balance Qty:Float:100", - "Incoming Rate:Currency:110", "Valuation Rate:Currency:110", "Balance Value:Currency:110", - "Voucher Type::110", "Voucher #::100", "Link::30", "Batch:Link/Batch:100", - "Serial #:Link/Serial No:100", "Company:Link/Company:100"] + return [_("Date") + ":Datetime:95", _("Item") + ":Link/Item:130", _("Item Name") + "::100", _("Item Group") + ":Link/Item Group:100", + _("Brand") + ":Link/Brand:100", _("Description") + "::200", _("Warehouse") + ":Link/Warehouse:100", + _("Stock UOM") + ":Link/UOM:100", _("Qty") + ":Float:50", _("Balance Qty") + ":Float:100", + _("Incoming Rate") + ":Currency:110", _("Valuation Rate") + ":Currency:110", _("Balance Value") + ":Currency:110", + _("Voucher Type") + "::110", _("Voucher #") + "::100", _("Link") + "::30", _("Batch") + ":Link/Batch:100", + _("Serial #") + ":Link/Serial No:100", _("Company") + ":Link/Company:100"] def get_stock_ledger_entries(filters): return frappe.db.sql("""select concat_ws(" ", posting_date, posting_time) as date, diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py index 2a5eb5022a..ff431550ad 100644 --- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py +++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ def execute(filters=None): columns = get_columns() @@ -26,12 +27,12 @@ def execute(filters=None): return columns, data def get_columns(): - return ["Item Code:Link/Item:140", "Item Name::100", "Description::200", - "Item Group:Link/Item Group:100", "Brand:Link/Brand:100", "Warehouse:Link/Warehouse:120", - "UOM:Link/UOM:100", "Actual Qty:Float:100", "Planned Qty:Float:100", - "Requested Qty:Float:110", "Ordered Qty:Float:100", "Reserved Qty:Float:100", - "Projected Qty:Float:100", "Reorder Level:Float:100", "Reorder Qty:Float:100", - "Shortage Qty:Float:100"] + return [_("Item Code") + ":Link/Item:140", _("Item Name") + "::100", _("Description") + "::200", + _("Item Group") + ":Link/Item Group:100", _("Brand") + ":Link/Brand:100", _("Warehouse") + ":Link/Warehouse:120", + _("UOM") + ":Link/UOM:100", _("Actual Qty") + ":Float:100", _("Planned Qty") + ":Float:100", + _("Requested Qty") + ":Float:110", _("Ordered Qty") + ":Float:100", _("Reserved Qty") + ":Float:100", + _("Projected Qty") + ":Float:100", _("Reorder Level") + ":Float:100", _("Reorder Qty") + ":Float:100", + _("Shortage Qty") + ":Float:100"] def get_item_conditions(filters): conditions = [] diff --git a/erpnext/support/page/support_analytics/support_analytics.js b/erpnext/support/page/support_analytics/support_analytics.js index b9db1f881c..667602500a 100644 --- a/erpnext/support/page/support_analytics/support_analytics.js +++ b/erpnext/support/page/support_analytics/support_analytics.js @@ -28,7 +28,7 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ filters: [ {fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", - default_value: "Select Fiscal Year..."}, + default_value: __("Select Fiscal Year") + "..."}, {fieldtype:"Date", label: __("From Date")}, {fieldtype:"Label", label: __("To")}, {fieldtype:"Date", label: __("To Date")}, From c5a0ef8399c3f014278df73f8473f0b2d38d4853 Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Fri, 12 Sep 2014 10:03:30 +0800 Subject: [PATCH 4/7] fix according to the suggestion. --- .../report/budget_variance_report/budget_variance_report.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py index fba4aa2da8..d64c374822 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import flt +from frappe.utils import formatdate import time from erpnext.accounts.utils import get_fiscal_year from erpnext.controllers.trends import get_period_date_ranges, get_period_month_ranges @@ -51,9 +52,9 @@ def get_columns(filters): for from_date, to_date in get_period_date_ranges(filters["period"], filters["fiscal_year"]): for label in [_("Target") + " (%s)", _("Actual") + " (%s)", _("Variance") + " (%s)"]: if group_months: - label = label % (_(from_date.strftime("%b")) + " - " + _(to_date.strftime("%b"))) + label = label % (formatdate(from_date, format_string="MMM") + " - " + formatdate(from_date, format_string="MMM")) else: - label = label % _(from_date.strftime("%b")) + label = label % formatdate(from_date, format_string="MMM") columns.append(label+":Float:120") From 1c440b3b31ff89b6705ed65b143c7aae0de04b5e Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Fri, 12 Sep 2014 15:04:10 +0800 Subject: [PATCH 5/7] month options doesn't get translated. --- erpnext/hr/doctype/employee/employee.py | 2 +- erpnext/public/js/purchase_trends_filters.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 5d4beaf75d..fa2594b103 100644 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -200,7 +200,7 @@ def validate_employee_role(doc, method): # called via User hook if "Employee" in [d.role for d in doc.get("user_roles")]: if not frappe.db.get_value("Employee", {"user_id": doc.name}): - frappe.msgprint("Please set User ID field in an Employee record to set Employee Role") + frappe.msgprint(_("Please set User ID field in an Employee record to set Employee Role")) doc.get("user_roles").remove(doc.get("user_roles", {"role": "Employee"})[0]) def update_user_permissions(doc, method): diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js index d60b915f48..2870dcf8de 100644 --- a/erpnext/public/js/purchase_trends_filters.js +++ b/erpnext/public/js/purchase_trends_filters.js @@ -7,7 +7,12 @@ var get_filters = function(){ "fieldname":"period", "label": __("Period"), "fieldtype": "Select", - "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), + "options": [ + { "value": "Monthly", "label": __("Monthly") }, + { "value": "Quarterly", "label": __("Quarterly") }, + { "value": "Half-Yearly", "label": __("Half-Yearly") }, + { "value": "Yearly", "label": __("Yearly") } + ], "default": "Monthly" }, { From e3b63f2d9c4f72b5f485d538d83fa932e931e710 Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Fri, 12 Sep 2014 16:06:13 +0800 Subject: [PATCH 6/7] added __() for options that need label. --- erpnext/public/js/purchase_trends_filters.js | 14 +++++++++++-- erpnext/public/js/sales_trends_filters.js | 22 +++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js index 2870dcf8de..39c7bba60e 100644 --- a/erpnext/public/js/purchase_trends_filters.js +++ b/erpnext/public/js/purchase_trends_filters.js @@ -19,14 +19,24 @@ var get_filters = function(){ "fieldname":"based_on", "label": __("Based On"), "fieldtype": "Select", - "options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"), + "options": [ + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Supplier", "label": __("Supplier") }, + { "value": "Supplier Type", "label": __("Supplier Type") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { "fieldname":"group_by", "label": __("Group By"), "fieldtype": "Select", - "options": ["", "Item", "Supplier"].join("\n"), + "options": [ + { "value": "", "label": "" }, + { "value": "Item", "label": __("Item") }, + { "value": "Supplier", "label": __("Supplier") } + ], "default": "" }, { diff --git a/erpnext/public/js/sales_trends_filters.js b/erpnext/public/js/sales_trends_filters.js index 89c269e339..5598e59935 100644 --- a/erpnext/public/js/sales_trends_filters.js +++ b/erpnext/public/js/sales_trends_filters.js @@ -7,21 +7,37 @@ var get_filters = function(){ "fieldname":"period", "label": __("Period"), "fieldtype": "Select", - "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), + "options": [ + { "value": "Monthly", "label": __("Monthly") }, + { "value": "Quarterly", "label": __("Quarterly") }, + { "value": "Half-Yearly", "label": __("Half-Yearly") }, + { "value": "Yearly", "label": __("Yearly") } + ], "default": "Monthly" }, { "fieldname":"based_on", "label": __("Based On"), "fieldtype": "Select", - "options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"), + "options": [ + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Customer", "label": __("Customer") }, + { "value": "Customer Group", "label": __("Customer Group") }, + { "value": "Territory", "label": __("Territory") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { "fieldname":"group_by", "label": __("Group By"), "fieldtype": "Select", - "options": ["", "Item", "Customer"].join("\n"), + "options": [ + { "value": "", "label": "" }, + { "value": "Item", "label": __("Item") }, + { "value": "Customer", "label": __("Customer") } + ], "default": "" }, { From 6d029392566131e27cd6fd74a25ce38845dfea8a Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Fri, 12 Sep 2014 16:42:15 +0800 Subject: [PATCH 7/7] changed indent. as well use tab instead of space. --- erpnext/public/js/purchase_trends_filters.js | 30 +++++++++--------- erpnext/public/js/sales_trends_filters.js | 32 ++++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js index 39c7bba60e..cab8bbfc24 100644 --- a/erpnext/public/js/purchase_trends_filters.js +++ b/erpnext/public/js/purchase_trends_filters.js @@ -8,11 +8,11 @@ var get_filters = function(){ "label": __("Period"), "fieldtype": "Select", "options": [ - { "value": "Monthly", "label": __("Monthly") }, - { "value": "Quarterly", "label": __("Quarterly") }, - { "value": "Half-Yearly", "label": __("Half-Yearly") }, - { "value": "Yearly", "label": __("Yearly") } - ], + { "value": "Monthly", "label": __("Monthly") }, + { "value": "Quarterly", "label": __("Quarterly") }, + { "value": "Half-Yearly", "label": __("Half-Yearly") }, + { "value": "Yearly", "label": __("Yearly") } + ], "default": "Monthly" }, { @@ -20,12 +20,12 @@ var get_filters = function(){ "label": __("Based On"), "fieldtype": "Select", "options": [ - { "value": "Item", "label": __("Item") }, - { "value": "Item Group", "label": __("Item Group") }, - { "value": "Supplier", "label": __("Supplier") }, - { "value": "Supplier Type", "label": __("Supplier Type") }, - { "value": "Supplier Type", "label": __("Project") } - ], + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Supplier", "label": __("Supplier") }, + { "value": "Supplier Type", "label": __("Supplier Type") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { @@ -33,10 +33,10 @@ var get_filters = function(){ "label": __("Group By"), "fieldtype": "Select", "options": [ - { "value": "", "label": "" }, - { "value": "Item", "label": __("Item") }, - { "value": "Supplier", "label": __("Supplier") } - ], + "", + { "value": "Item", "label": __("Item") }, + { "value": "Supplier", "label": __("Supplier") } + ], "default": "" }, { diff --git a/erpnext/public/js/sales_trends_filters.js b/erpnext/public/js/sales_trends_filters.js index 5598e59935..46070b4768 100644 --- a/erpnext/public/js/sales_trends_filters.js +++ b/erpnext/public/js/sales_trends_filters.js @@ -8,11 +8,11 @@ var get_filters = function(){ "label": __("Period"), "fieldtype": "Select", "options": [ - { "value": "Monthly", "label": __("Monthly") }, - { "value": "Quarterly", "label": __("Quarterly") }, - { "value": "Half-Yearly", "label": __("Half-Yearly") }, - { "value": "Yearly", "label": __("Yearly") } - ], + { "value": "Monthly", "label": __("Monthly") }, + { "value": "Quarterly", "label": __("Quarterly") }, + { "value": "Half-Yearly", "label": __("Half-Yearly") }, + { "value": "Yearly", "label": __("Yearly") } + ], "default": "Monthly" }, { @@ -20,13 +20,13 @@ var get_filters = function(){ "label": __("Based On"), "fieldtype": "Select", "options": [ - { "value": "Item", "label": __("Item") }, - { "value": "Item Group", "label": __("Item Group") }, - { "value": "Customer", "label": __("Customer") }, - { "value": "Customer Group", "label": __("Customer Group") }, - { "value": "Territory", "label": __("Territory") }, - { "value": "Supplier Type", "label": __("Project") } - ], + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Customer", "label": __("Customer") }, + { "value": "Customer Group", "label": __("Customer Group") }, + { "value": "Territory", "label": __("Territory") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { @@ -34,10 +34,10 @@ var get_filters = function(){ "label": __("Group By"), "fieldtype": "Select", "options": [ - { "value": "", "label": "" }, - { "value": "Item", "label": __("Item") }, - { "value": "Customer", "label": __("Customer") } - ], + "", + { "value": "Item", "label": __("Item") }, + { "value": "Customer", "label": __("Customer") } + ], "default": "" }, {