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

If we have a listfield, use it's "item" value ( see r17255 )

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17256 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bab65752
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
<string>Products.ERP5Form.PDFTemplate</string> <tuple/>
<string>PDFTemplate</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -88,8 +85,17 @@ ...@@ -88,8 +85,17 @@
</td>\n </td>\n
<td tal:attributes="colwidth python: None" tal:define="value python: field.get_value(\'default\')">\n <td tal:attributes="colwidth python: None" tal:define="value python: field.get_value(\'default\')">\n
<tal:block tal:condition="python: same_type(value,[]) or same_type(value,())">\n <tal:block tal:condition="python: same_type(value,[]) or same_type(value,())">\n
<tal:block tal:repeat="item value">\n <tal:block tal:condition="python: field.has_value(\'items\')"\n
<para style="TableStandard" tal:content="python: str(item)" />\n tal:define="field_item_dict python:dict([(x[1], x[0]) for x in field.get_value(\'items\')]);">\n
<tal:block tal:repeat="item value">\n
<para style="TableStandard"\n
tal:content="python: field_item_dict.get(item, \'??? (%s)\' % item)"/>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: not field.has_value(\'items\')">\n
<tal:block tal:repeat="item value">\n
<para style="TableStandard" tal:content="python: str(item)" />\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: not (same_type(value, []) or same_type(value, ()) or same_type(value, None))">\n <tal:block tal:condition="python: not (same_type(value, []) or same_type(value, ()) or same_type(value, None))">\n
......
49 50
\ No newline at end of file \ No newline at end of file
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