Commit a094a992 authored by Jérome Perrin's avatar Jérome Perrin

ODS: update for libreoffice 7 compatibility with percentage

Now that default cloudooo is updated to LibreOffice 7, this revealed some
problems with percentage values in spreadsheet cells, it was apparently
working by chance on LibreOffice 5.

This improves erp5_ods_style to use `style:style` referencing a
`number:percentage-style` through their `style:data-style-name` attribute.

Because the same thing was missing for dates to follow the input order of
datetime fields, this is also handled at the same time.

We could do something similar to support all input styles of float fields,
so that we support `1 234.5`, `1.234,5` or `1,234.5`, but this is not done
this time.

See merge request nexedi/erp5!1861
parents 9e2642a7 d65dc312
Pipeline #32200 failed with stage
in 0 seconds
......@@ -86,6 +86,22 @@
<number:number number:decimal-places="2" number:min-integer-digits="1"/>
<number:text>%</number:text>
</number:percentage-style>
<style:style style:name="Level1Percent" style:family="table-cell" style:parent-style-name="Level1" style:data-style-name="N11"/>
<style:style style:name="Level2Percent" style:family="table-cell" style:parent-style-name="Level2" style:data-style-name="N11"/>
<style:style style:name="Level3Percent" style:family="table-cell" style:parent-style-name="Level3" style:data-style-name="N11"/>
<style:style style:name="Level4Percent" style:family="table-cell" style:parent-style-name="Level4" style:data-style-name="N11"/>
<style:style style:name="Level1Cell1Percent" style:family="table-cell" style:parent-style-name="Level1Cell1" style:data-style-name="N11"/>
<style:style style:name="Level2Cell1Percent" style:family="table-cell" style:parent-style-name="Level2Cell1" style:data-style-name="N11"/>
<style:style style:name="Level3Cell1Percent" style:family="table-cell" style:parent-style-name="Level3Cell1" style:data-style-name="N11"/>
<style:style style:name="Level4Cell1Percent" style:family="table-cell" style:parent-style-name="Level4Cell1" style:data-style-name="N11"/>
<style:style style:name="Level2.1Percent" style:family="table-cell" style:parent-style-name="Level2.1" style:data-style-name="N11"/>
<style:style style:name="Level2.2Percent" style:family="table-cell" style:parent-style-name="Level2.2" style:data-style-name="N11"/>
<style:style style:name="Level2.3Percent" style:family="table-cell" style:parent-style-name="Level2.3" style:data-style-name="N11"/>
<style:style style:name="Level2.4Percent" style:family="table-cell" style:parent-style-name="Level2.4" style:data-style-name="N11"/>
<style:style style:name="Level2.5Percent" style:family="table-cell" style:parent-style-name="Level2.5" style:data-style-name="N11"/>
<style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false" style:vertical-align="middle"/>
<style:paragraph-properties fo:text-align="center"/>
......@@ -285,7 +301,7 @@
<table:table-cell table:style-name="Level1" office:value-type="float" office:value="5" tal:attributes="office:value line/available_budget">
<text:p>5</text:p>
</table:table-cell>
<table:table-cell table:style-name="Level1" office:value-type="percentage" office:value="0.06" tal:attributes="office:value line/consumed_ratio">
<table:table-cell table:style-name="Level1Percent" office:value-type="percentage" office:value="0.06" tal:attributes="office:value line/consumed_ratio">
<text:p>6,00%</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="768"/>
......@@ -313,7 +329,7 @@
<table:table-cell table:style-name="ce18" office:value-type="float" office:value="5" tal:attributes="office:value line/available_budget; table:style-name style">
<text:p>5</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce23" office:value-type="percentage" office:value="0.06" tal:attributes="office:value line/consumed_ratio; table:style-name style">
<table:table-cell table:style-name="ce23" office:value-type="percentage" office:value="0.06" tal:attributes="office:value line/consumed_ratio; table:style-name string:${style}Percent">
<text:p>6,00%</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="768"/>
......@@ -345,7 +361,7 @@
<table:table-cell table:style-name="Level3" office:value-type="float" office:value="5" tal:attributes="office:value subline/available_budget">
<text:p>5</text:p>
</table:table-cell>
<table:table-cell table:style-name="Level3" office:value-type="percentage" office:value="0.06" tal:attributes="office:value subline/consumed_ratio">
<table:table-cell table:style-name="Level3Percent" office:value-type="percentage" office:value="0.06" tal:attributes="office:value subline/consumed_ratio">
<text:p>6,00%</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="1016"/>
......@@ -380,7 +396,7 @@
office:value="5" tal:attributes="office:value subsubline/available_budget">
<text:p>5</text:p>
</table:table-cell>
<table:table-cell table:style-name="Level4"
<table:table-cell table:style-name="Level4Percent"
office:value-type="percentage" office:value="0.06"
tal:attributes="office:value subsubline/consumed_ratio">
<text:p>6,00%</text:p>
......
......@@ -2,7 +2,7 @@
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>
<office:body>
<office:spreadsheet>
<table:table table:style-name='ta1' table:print='false' tal:attributes="table:name python: unicode(here.getTitle(), 'utf-8')" i18n:attributes="table:name">
<table:table table:style-name='ta1' table:print='false' tal:attributes="table:name here/getTitle" i18n:attributes="table:name">
<!-- at least one table-column element is required for ODF to validate -->
<table:table-column
......@@ -22,7 +22,7 @@
<table:table-row table:style-name='ro2'>
<table:table-cell table:style-name='report-column-title'
office:value-type='string'>
<text:p tal:content="python:here.Localizer.erp5_ui.gettext(field.get_value ('title')).encode('utf-8')">
<text:p tal:content="python: field.get_value('title')" i18n:translate="">
</text:p>
</table:table-cell>
<tal:block tal:define="display python: field.get_value('image_display') "
......
......@@ -42,7 +42,7 @@
<tal:block tal:condition="python: is_report_tree_mode">
<table:table-cell table:style-name='report-column-title' table:number-columns-spanned='1' office:value-type='string' >
<tal:block tal:condition="listboxline/getSectionName">
<text:p tal:content="python: here.Localizer.erp5_ui.gettext(listboxline.getSectionName()).encode('utf-8')"/>
<text:p tal:content="listboxline/getSectionName" i18n:translate=""/>
</tal:block>
</table:table-cell>
</tal:block>
......@@ -51,8 +51,8 @@
<tal:block tal:define="column_property python: column_item[1]; column_id python: column_item[0]">
<tal:block tal:condition="python: column_property is not None" >
<table:table-cell table:number-rows-spanned='1' table:style-name='report-column-title' table:number-columns-spanned='1' office:value-type='string' >
<text:p i18n:translate="" i18n:domain="ui" tal:content="column_property">
</text:p>
<text:p tal:content="column_property" tal:condition="python: column_id in untranslatable_columns"/>
<text:p i18n:translate="" i18n:domain="ui" tal:content="column_property" tal:condition="python: column_id not in untranslatable_columns"/>
</table:table-cell>
</tal:block>
<tal:block tal:condition="python: column_property is None">
......
......@@ -20,7 +20,7 @@
</tal:block>
<tal:block tal:define="portal_object here/getPortalObject">
<tal:block tal:condition="not: sheet_per_report_section">
<table:table tal:attributes="table:name python:unicode(form.getProperty('title'), 'utf8')" i18n:attributes="table:name">
<table:table tal:attributes="table:name python: form.getProperty('title')" i18n:attributes="table:name">
<!-- at least one table-column element is required for ODF to validate -->
<table:table-column
table:style-name='co2'
......@@ -32,7 +32,7 @@
office:value-type='string'
table:number-columns-spanned='5'
table:number-rows-spanned='1'>
<text:p i18n:translate="" tal:content="python: unicode(form.getProperty('title'), 'utf8')" ></text:p>
<text:p i18n:translate="" tal:content="python: form.getProperty('title')" ></text:p>
</table:table-cell>
</table:table-row>
......@@ -95,7 +95,7 @@
<tal:block tal:condition="rendered_report_item_list">
<tal:block tal:repeat="report_item report_item_list">
<!-- FIXME: in deferred mode + sheet_per_report_section we do not have title -->
<table:table tal:attributes="table:name python: unicode('Sheet%s' % repeat['report_item'].index, 'utf-8')">
<table:table tal:attributes="table:name python:'Sheet%s' % repeat['report_item'].index">
<table:table-column table:style-name="co4" table:default-cell-style-name="text"/>
<tal:block tal:replace="structure report_item"/>
</table:table>
......@@ -105,7 +105,7 @@
<tal:block tal:condition="not: rendered_report_item_list">
<tal:block tal:repeat="report_item python: report_item_list">
<tal:block tal:condition="python: report_item.getFormId()">
<table:table tal:attributes="table:name python: unicode(report_item.getTitle() or 'Sheet%s' % repeat['report_item'].index, 'utf-8')">
<table:table tal:attributes="table:name python: report_item.getTitle() or 'Sheet%s' % repeat['report_item'].index">
<table:table-column table:style-name="co4" table:default-cell-style-name="text"/>
<tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>
</table:table>
......@@ -116,7 +116,7 @@
<!-- include the report header as last page -->
<table:table tal:condition="python: [field for field in form.get_fields()
if field.getRecursiveTemplateField().meta_type != 'ReportBox']"
tal:attributes="table:name python:unicode(form.getProperty('title'), 'utf8')" i18n:attributes="table:name">
tal:attributes="table:name python:form.getProperty('title')" i18n:attributes="table:name">
<table:table-column
table:style-name='co2'
table:number-columns-repeated='100'
......@@ -126,7 +126,7 @@
office:value-type='string'
table:number-columns-spanned='5'
table:number-rows-spanned='1'>
<text:p i18n:translate="" tal:content="python: unicode(form.getProperty('title'), 'utf8')" ></text:p>
<text:p i18n:translate="" tal:content="python:form.getProperty('title')" ></text:p>
</table:table-cell>
</table:table-row>
<!-- fields from the report form itself -->
......
......@@ -94,22 +94,95 @@
<style:table-cell-properties style:vertical-align='middle' style:repeat-content='false' style:text-align-source='fix' fo:border='none'/>
<style:paragraph-properties fo:text-align='center' fo:margin-left='0cm'/>
</style:style>
<number:date-style style:name="date_style" number:automatic-order="true">
<style:style style:name="with_border_text" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties fo:border-left='none' fo:border-bottom='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' fo:border-top='0.002cm solid #000000'/>
</style:style>
<style:style style:name="with_border_figure" style:family="table-cell" style:parent-style-name="figure">
<style:table-cell-properties fo:border-left='none' fo:border-bottom='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' fo:border-top='0.002cm solid #000000'/>
</style:style>
<number:date-style style:name="date_style_ymd">
<number:year number:style="long"/>
<number:text>/</number:text>
<number:month number:style="long"/>
<number:text>/</number:text>
<number:day number:style="long"/>
</number:date-style>
<number:date-style style:name="date_style_dmy">
<number:day number:style="long"/>
<number:text>/</number:text>
<number:month number:style="long"/>
<number:text>/</number:text>
<number:year number:style="long"/>
</number:date-style>
<number:date-style style:name="date_style_mdy">
<number:month number:style="long"/>
<number:text>/</number:text>
<number:day number:style="long"/>
<number:text>/</number:text>
<number:year number:style="long"/>
</number:date-style>
<number:date-style style:name="date_with_time_style_ymd">
<number:year number:style="long"/>
<number:text>/</number:text>
<number:month number:style="long"/>
<number:text>/</number:text>
<number:day number:style="long"/>
<number:text> </number:text>
<number:hours number:style="long"/>
<number:text>:</number:text>
<number:minutes number:style="long"/>
</number:date-style>
<number:date-style style:name="date_with_time_style_mdy">
<number:month number:style="long"/>
<number:text>/</number:text>
<number:day number:style="long"/>
<number:text>/</number:text>
<number:year number:style="long"/>
<number:text> </number:text>
<number:hours number:style="long"/>
<number:text>:</number:text>
<number:minutes number:style="long"/>
</number:date-style>
<number:date-style style:name="date_with_time_style_dmy">
<number:day number:style="long"/>
<number:text>/</number:text>
<number:month number:style="long"/>
<number:text>/</number:text>
<number:year number:style="long"/>
<number:text> </number:text>
<number:hours number:style="long"/>
<number:text>:</number:text>
<number:seconds number:style="long"/>
<number:minutes number:style="long"/>
</number:date-style>
<style:style style:name="date_with_time" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="date_style">
<style:table-cell-properties style:vertical-align='middle' style:repeat-content='false' style:text-align-source='fix' fo:border-right='0.002cm solid #000000' />
<style:style style:name="stat-date_with_time" style:family="table-cell" style:parent-style-name="stat-date">
<style:table-cell-properties fo:border="0.002cm solid #000000"/>
</style:style>
<style:style style:name="date_with_time" style:family="table-cell" style:parent-style-name="date">
<style:table-cell-properties style:vertical-align='middle' style:repeat-content='false' style:text-align-source='fix' fo:border-left='0.002cm solid #000000' fo:border-right='0.002cm solid #000000'/>
</style:style>
<tal:block tal:repeat="with_time_suffix python: ('', '_with_time')">
<tal:block tal:repeat="style_prefix_name python: here.Base_getODSSupportedStylePrefixList() + ('with_border_', )">
<tal:block tal:repeat="input_order python: ('ymd', 'dmy', 'mdy')">
<style:style
tal:attributes="style:name string:${style_prefix_name}date${with_time_suffix}_${input_order};
style:data-style-name string:date${with_time_suffix}_style_${input_order};
style:parent-style-name string:${style_prefix_name}date${with_time_suffix}"
style:name="date_with_time"
style:family="table-cell"
style:parent-style-name="date_with_time"
style:data-style-name="date_with_time_style_ymd">
<style:table-cell-properties tal:condition="python: style_prefix_name == ''" style:vertical-align='middle' style:repeat-content='false' style:text-align-source='fix' fo:border-left='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' />
<style:table-cell-properties tal:condition="python: style_prefix_name == 'stat-'" fo:border='0.002cm solid #000000' />
<style:table-cell-properties tal:condition="python: style_prefix_name == 'with_border_'" fo:border-left='none' fo:border-bottom='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' fo:border-top='0.002cm solid #000000'/>
</style:style>
</tal:block>
</tal:block>
</tal:block>
<tal:block tal:repeat="precision python: range(0,here.Base_getODSMaximumSupportedPrecision())">
<tal:block tal:define="figure_data_precision_style_name string:figure_data_precision_${precision}">
<number:number-style style:name="figure_data_precision_X" tal:attributes="style:name figure_data_precision_style_name">
......@@ -118,6 +191,43 @@
<tal:block tal:repeat="style_prefix_name python: here.Base_getODSSupportedStylePrefixList()">
<style:style style:name="figure_X" style:family="table-cell" style:parent-style-name="figure" style:data-style-name="figure_data_precision_X" tal:attributes="style:name string:${style_prefix_name}figure_${precision}; style:data-style-name figure_data_precision_style_name ; style:parent-style-name string:${style_prefix_name}figure"/>
</tal:block>
<style:style
style:name="with_border_figure_X"
style:family="table-cell"
style:parent-style-name="figure_X"
style:data-style-name="figure_data_precision_style_name"
tal:attributes="style:name string:with_border_figure_${precision};
style:data-style-name figure_data_precision_style_name;
style:parent-style-name string:figure_${precision}">
<style:table-cell-properties fo:border-left='none' fo:border-bottom='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' fo:border-top='0.002cm solid #000000'/>
</style:style>
</tal:block>
<tal:block tal:define="percentage_data_precision_style_name string:percentage_data_precision_${precision}">
<number:percentage-style style:name="percentage_data_precision_X" tal:attributes="style:name percentage_data_precision_style_name">
<number:number number:decimal-places="X" number:min-integer-digits="1" tal:attributes="number:decimal-places precision"/>
<number:text>%</number:text>
</number:percentage-style>
<tal:block tal:repeat="style_prefix_name python: here.Base_getODSSupportedStylePrefixList()">
<style:style
style:name="percentage_X"
style:family="table-cell"
style:parent-style-name="figure"
style:data-style-name="percentage_data_precision_X"
tal:attributes="style:name string:${style_prefix_name}percentage_${precision};
style:data-style-name percentage_data_precision_style_name;
style:parent-style-name string:${style_prefix_name}figure"/>
</tal:block>
<style:style
style:name="with_border_percentage_X"
style:family="table-cell"
style:parent-style-name="percentage_X"
style:data-style-name="percentage_data_precision_style_name"
tal:attributes="style:name string:with_border_percentage_${precision};
style:data-style-name percentage_data_precision_style_name;
style:parent-style-name string:percentage_${precision}">
<style:table-cell-properties fo:border-left='none' fo:border-bottom='0.002cm solid #000000' fo:border-right='0.002cm solid #000000' fo:border-top='0.002cm solid #000000'/>
</style:style>
</tal:block>
</tal:block>
</office:automatic-styles>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>selection, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Foo_statStartDate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -78,7 +78,9 @@
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
......@@ -90,7 +92,9 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
<list>
<string>listbox_start_date</string>
</list>
</value>
</item>
<item>
......
......@@ -156,7 +156,9 @@
</item>
<item>
<key> <string>date_only</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>date_separator</string> </key>
......@@ -170,6 +172,10 @@
<key> <string>default_now</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_timezone</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
......@@ -204,7 +210,9 @@
</item>
<item>
<key> <string>input_order</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>input_style</string> </key>
......@@ -222,6 +230,10 @@
<key> <string>time_separator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>timezone_style</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......@@ -364,37 +376,37 @@
<item>
<key> <string>ampm</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>day</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>hour</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
<item>
<key> <string>minute</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value>
</item>
<item>
<key> <string>month</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value>
</item>
<item>
<key> <string>year</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAo=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -467,6 +479,32 @@
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/date_only | python: 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/input_order | string:ymd</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<tuple>
<tuple>
......@@ -729,7 +767,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<tuple>
<tuple>
......@@ -984,7 +1022,7 @@
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<tuple>
<tuple>
......@@ -1239,7 +1277,7 @@
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<record id="8" aka="AAAAAAAAAAg=">
<pickle>
<tuple>
<tuple>
......@@ -1494,7 +1532,7 @@
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<record id="9" aka="AAAAAAAAAAk=">
<pickle>
<tuple>
<tuple>
......@@ -1749,7 +1787,7 @@
</dictionary>
</pickle>
</record>
<record id="8" aka="AAAAAAAAAAg=">
<record id="10" aka="AAAAAAAAAAo=">
<pickle>
<tuple>
<tuple>
......
......@@ -82,7 +82,9 @@
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
......@@ -94,7 +96,10 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
<list>
<string>listbox_quantity</string>
<string>listbox_delivery_ratio</string>
</list>
</value>
</item>
<item>
......
......@@ -108,6 +108,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -158,7 +162,9 @@
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
......@@ -183,6 +189,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -253,4 +263,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python: 1</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -108,6 +108,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -153,9 +157,15 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
......@@ -221,7 +231,7 @@
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1.234,5</string> </value>
<value> <string>-1 234.5</string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
......@@ -249,4 +259,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python: 2</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
......@@ -60,7 +60,6 @@ from .interfaces import IMessageCatalog
from .LanguageManager import LanguageManager
from .LocalFiles import LocalDTMLFile
from .utils import charsets, lang_negotiator, _
from Products.ERP5Type.Utils import ensure_list
###########################################################################
......@@ -312,7 +311,7 @@ class MessageCatalog(LanguageManager, ObjectManager, SimpleItem):
if lang is None:
# Builds the list of available languages
# should the empty translations be filtered?
available_languages = ensure_list(self._languages)
available_languages = list(self._languages)
# Imagine that the default language is 'en'. There is no
# translation from 'en' to 'en' in the message catalog
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment