From 8153d050e3d934c5c041a38ca50ada9fbd6670a9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 6 May 2015 15:02:48 +0530 Subject: [PATCH] [fix] print format builer, don't include print_hide fields in initial format --- .../print/page/print_format_builder/print_format_builder.js | 6 ++++-- frappe/translate.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frappe/print/page/print_format_builder/print_format_builder.js b/frappe/print/page/print_format_builder/print_format_builder.js index ce4fff51a2..ce1c2c3a6c 100644 --- a/frappe/print/page/print_format_builder/print_format_builder.js +++ b/frappe/print/page/print_format_builder/print_format_builder.js @@ -251,8 +251,10 @@ frappe.PrintFormatBuilder = Class.extend({ me.add_table_properties(f); } - column.fields.push(f); - section.has_fields = true; + if(!f.print_hide) { + column.fields.push(f); + section.has_fields = true; + } } }); diff --git a/frappe/translate.py b/frappe/translate.py index 9f0393ed69..f2509a8a89 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -90,7 +90,7 @@ def get_dict(fortype, name=None): """ fortype = fortype.lower() cache = frappe.cache() - cache_key = "translation_assets:" + frappe.local.lang + cache_key = "translation_assets:" + (frappe.local.lang or "en") asset_key = fortype + ":" + (name or "-") translation_assets = cache.get_value(cache_key) or {}