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 d73a53d16fe8c50e87e5a5f5427ddd41f31dc667..92395f44a7b5dcf615c83644a749042f02acc037 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 @@ -9,12 +9,6 @@ </pickle> <pickle> <dictionary> - <item> - <key> <string>__ac_local_roles__</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>_bind_names</string> </key> <value> @@ -99,17 +93,62 @@ </tal:block>\n <tal:block tal:condition="python: value is not None and not is_list">\n <tal:block tal:condition="is_float">\n - <table:table-cell tal:define="field python: editable_fields.get(column_id, None)"\n - tal:attributes="office:value value;\n - table:style-name string:${style_prefix}figure"\n - office:value-type="float"\n - table:style-name="figure">\n - <text:p tal:condition="python: field is None"\n - tal:content="python: value"/>\n - <text:p tal:condition="python: field is not None"\n - tal:content="python: field.render_pdf(value)">\n - </text:p>\n - </table:table-cell>\n + <tal:block tal:condition="python: isinstance(value, (int, long))">\n + <table:table-cell tal:define="field python: editable_fields.get(column_id, None)"\n + tal:attributes="office:value value;\n + table:style-name string:${style_prefix}figure"\n + office:value-type="float"\n + table:style-name="figure">\n + <text:p tal:condition="python: field is None"\n + tal:content="python: value"/>\n + <text:p tal:condition="python: field is not None"\n + tal:content="python: field.render_pdf(value)">\n + </text:p>\n + </table:table-cell>\n + </tal:block>\n + <tal:block tal:condition="python: isinstance(value, float)">\n + <tal:block tal:define="field python: editable_fields.get(column_id, None)">\n + <tal:block tal:condition="python: field is not None">\n + <tal:block tal:condition="python:field.meta_type==\'FloatField\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'FloatField\')">\n + <tal:block tal:condition="python:field.get_value(\'precision\')>0">\n + <table:table-cell tal:attributes="office:value value;\n + table:style-name python:style_prefix+str(field.get_value(\'precision\'))+\'_decimal\'"\n + office:value-type="float"\n + table:style-name="decimal">\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(\'precision\') is None">\n + <table:table-cell tal:attributes="office:value value;\n + table:style-name string:${style_prefix}decimal"\n + office:value-type="float"\n + table:style-name="decimal">\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!=\'FloatField\' 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 + <text:p>Error: field is not a FloatField</text:p>\n + </table:table-cell>\n + </tal:block>\n + </tal:block>\n + <tal:block tal:condition="python: field is None">\n + <table:table-cell tal:attributes="office:value value;\n + table:style-name string:${style_prefix}decimal"\n + office:value-type="float"\n + table:style-name="decimal">\n + <text:p tal:condition="python: field is None"\n + tal:content="python: value"/>\n + <text:p tal:condition="python: field is not None"\n + tal:content="python: field.render_pdf(value)">\n + </text:p>\n + </table:table-cell>\n + </tal:block>\n + </tal:block>\n + </tal:block>\n </tal:block>\n <tal:block tal:condition="not: is_float">\n <tal:block tal:condition="python: isinstance(value, DateTime)">\n diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/style_macros.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/style_macros.xml index 99f0be45ff9a18c8bf7eb7d3c4b4002d10b2ddd1..4daf2f2d9d6cc52ee7259ff4f9b69b722bf5c355 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/style_macros.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/style_macros.xml @@ -9,12 +9,6 @@ </pickle> <pickle> <dictionary> - <item> - <key> <string>__ac_local_roles__</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>_bind_names</string> </key> <value> @@ -146,6 +140,30 @@ <style:style style:name="date_with_time" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="date_style">\n <style:table-cell-properties style:vertical-align=\'middle\' style:repeat-content=\'false\' style:text-align-source=\'fix\' fo:border-right=\'0.002cm solid #000000\' />\n </style:style>\n + <number:number-style style:name="four_decimal">\n + <number:number number:decimal-places="4" number:min-integer-digits="1" number:grouping="true"/>\n + </number:number-style>\n + <number:number-style style:name="three_decimal">\n + <number:number number:decimal-places="3" number:min-integer-digits="1" number:grouping="true"/>\n + </number:number-style>\n + <number:number-style style:name="two_decimal">\n + <number:number number:decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>\n + </number:number-style>\n + <number:number-style style:name="one_decimal">\n + <number:number number:decimal-places="1" number:min-integer-digits="1" number:grouping="true"/>\n + </number:number-style>\n + <style:style style:name="4_decimal" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="four_decimal">\n + <style:table-cell-properties style:vertical-align=\'middle\' style:repeat-content=\'false\' style:text-align-source=\'fix\' fo:border-right=\'0.002cm solid #000000\' />\n + </style:style>\n + <style:style style:name="3_decimal" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="three_decimal">\n + <style:table-cell-properties style:vertical-align=\'middle\' style:repeat-content=\'false\' style:text-align-source=\'fix\' fo:border-right=\'0.002cm solid #000000\' />\n + </style:style>\n + <style:style style:name="2_decimal" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="two_decimal">\n + <style:table-cell-properties style:vertical-align=\'middle\' style:repeat-content=\'false\' style:text-align-source=\'fix\' fo:border-right=\'0.002cm solid #000000\' />\n + </style:style>\n + <style:style style:name="1_decimal" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="one_decimal">\n + <style:table-cell-properties style:vertical-align=\'middle\' style:repeat-content=\'false\' style:text-align-source=\'fix\' fo:border-right=\'0.002cm solid #000000\' />\n + </style:style>\n </office:automatic-styles>\n </tal:block>\n diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision index f79f5e337ea18102bf116113d489fb73bd210e37..dc9414b21fc0a9f0da06762d78acf2a2774d9b01 100644 --- a/bt5/erp5_ods_style/bt/revision +++ b/bt5/erp5_ods_style/bt/revision @@ -1 +1 @@ -153 \ No newline at end of file +154 \ No newline at end of file