From 0e09866cdc8558d83be29a1ed9888f35e56fe00f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 30 Oct 2013 17:51:19 +0100
Subject: [PATCH] ods_style: support untranslatable_columns

---
 .../portal_skins/erp5_ods_style/listbox_ods_macro.xml        | 5 +++--
 bt5/erp5_ods_style/bt/revision                               | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml
index f19897257b..8c2e5d9d81 100644
--- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml
+++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml
@@ -53,6 +53,7 @@
                DateTime nocall: modules/DateTime/DateTime;\n
                selection_name python: listbox.get_value(\'selection_name\', REQUEST=request);\n
                editable_columns python: listbox.get_value(\'editable_columns\', REQUEST=request);\n
+               untranslatable_columns python: [x[0] for x in listbox.get_value(\'untranslatable_columns\', REQUEST=request)];\n
                editable_fields python: dict([(column[0], getattr(listbox.aq_parent, \'listbox_%s\' % column[0], None)) for column in editable_columns]);\n
                selection python: here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n
                is_report_tree_mode selection/report_tree_mode | python: 0;\n
@@ -118,8 +119,8 @@
                                         table:style-name=\'report-column-title\'\n
                                         table:number-columns-spanned=\'1\'\n
                                         office:value-type=\'string\'>\n
-                        <text:p i18n:translate="" i18n:domain="ui" tal:content="column_property">\n
-                        </text:p>\n
+                        <text:p i18n:translate="" i18n:domain="ui" tal:content="column_property" tal:condition="python: column_id in untranslatable_columns"/>\n
+                        <text:p i18n:translate="" i18n:domain="ui" tal:content="column_property" tal:condition="python: column_id not in untranslatable_columns"/>\n
                       </table:table-cell>\n
                     </tal:block>\n
                   </tal:block>\n
diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision
index ae4d10b425..a9d8b73e69 100644
--- a/bt5/erp5_ods_style/bt/revision
+++ b/bt5/erp5_ods_style/bt/revision
@@ -1 +1 @@
-256
\ No newline at end of file
+257
\ No newline at end of file
-- 
2.30.9