From 68bb4e8d361bdec871e70ee6f7c3b87817502492 Mon Sep 17 00:00:00 2001
From: Thibaut Deheunynck <thibaut@nexedi.com>
Date: Fri, 29 Aug 2008 14:17:19 +0000
Subject: [PATCH] 2008-08-29 thibaut when we have an editable field is a date
 in the listbox, now this field can be proxify.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23297 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_ods_style/field_ods_macro.xml        | 24 ++++++++++---------
 bt5/erp5_ods_style/bt/revision                |  2 +-
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml
index 6df208478a..d73a53d16f 100644
--- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml
+++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml
@@ -123,23 +123,25 @@
                   </table:table-cell>\n
                 </tal:block>\n
                 <tal:block tal:condition="python: field is not None">\n
-                  <tal:block tal:condition="python:field.meta_type==\'DateTimeField\' and field.get_value(\'date_only\')"> \n
-                    <table:table-cell tal:attributes="office:date-value python: value.strftime(\'%Y-%m-%dT%H:%M:%S\');\n
+                  <tal:block tal:condition="python:field.meta_type==\'DateTimeField\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'DateTimeField\')">\n
+                    <tal:block tal:condition="python:field.get_value(\'date_only\')">\n
+                      <table:table-cell tal:attributes="office:date-value python: value.strftime(\'%Y-%m-%dT%H:%M:%S\');\n
                                       table:style-name string:${style_prefix}date;"\n
                                       table:style-name="date"\n
                                       office:value-type="date">\n
-                      <text:p tal:content="python: field.render_pdf(value)"/>\n
-                    </table:table-cell>\n
-                  </tal:block>\n
-                  <tal:block tal:condition="python:field.meta_type==\'DateTimeField\' and field.get_value(\'date_only\')==0">\n
-                    <table:table-cell tal:attributes="office:date-value python: value.strftime(\'%Y-%m-%dT%H:%M:%S\');\n
+                        <text:p tal:content="python: field.render_pdf(value)"/>\n
+                      </table:table-cell>\n
+                    </tal:block>\n
+                    <tal:block tal:condition="python:field.get_value(\'date_only\')==0">\n
+                      <table:table-cell tal:attributes="office:date-value python: value.strftime(\'%Y-%m-%dT%H:%M:%S\');\n
                                       table:style-name string:${style_prefix}date_with_time;"\n
                                       table:style-name="date_with_time"\n
                                       office:value-type="date">\n
-                      <text:p tal:content="python: field.render_pdf(value)"/>\n
-                    </table:table-cell>\n
+                        <text:p tal:content="python: field.render_pdf(value)"/>\n
+                      </table:table-cell>\n
+                    </tal:block>\n
                   </tal:block>\n
-                  <tal:block tal:condition="python:field.meta_type!=\'DateTimeField\'">\n
+                  <tal:block tal:condition="python:field.meta_type!=\'DateTimeField\' and field.meta_type!=\'ProxyField\'">\n
                     <table:table-cell tal:attributes="table:style-name string:${style_prefix}string;"\n
                                       table:style-name="string"\n
                                       office:value-type="string">\n
@@ -148,7 +150,7 @@
                   </tal:block>\n
                 </tal:block>\n
               </tal:block>\n
-            </tal:block>            \n
+            </tal:block>\n
             <tal:block tal:condition="python:not isinstance(value, DateTime)">\n
              <table:table-cell tal:define="field python: editable_fields.get(column_id, None)"\n
                                tal:attributes="table:style-name string:${style_prefix}text"\n
diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision
index 5d1277e790..4701cc7931 100644
--- a/bt5/erp5_ods_style/bt/revision
+++ b/bt5/erp5_ods_style/bt/revision
@@ -1 +1 @@
-147
\ No newline at end of file
+150
\ No newline at end of file
-- 
2.30.9