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 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.PDFTemplate</string>
<string>PDFTemplate</string>
</tuple>
<none/>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -88,10 +85,19 @@
</td>\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: field.has_value(\'items\')"\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 tal:condition="python: not (same_type(value, []) or same_type(value, ()) or same_type(value, None))">\n
<para style="TableStandard" tal:content="python: field.render_pdf(value)" />\n
</tal:block>\n
......
49
\ No newline at end of file
50
\ 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