Commit 46a86d1e authored by Jean-Paul Smets's avatar Jean-Paul Smets

PDF style is superceded by ODT and ODS styles

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41612 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 240e8172
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_print</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>print</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Print</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewPrintDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_pdf_style</skin_folder>
<skin_selection>Print</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_pdf_style</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<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>_body</string> </key>
<value> <string>from DateTime import DateTime\n
\n
# if REQUEST.other contains ${form_id}/${listbox_id}/ListBox_getColumnWithDict\n
# magic key, this will be used as column width, instead of calculating.\n
if listbox is not None:\n
cache = context.REQUEST.other.get(\n
\'%s/%s/ListBox_getColumnWithDict\' % (\n
listbox.aq_parent.getId(), listbox.getId()), None)\n
if cache is not None:\n
return cache\n
\n
Base_translateString = context.Base_translateString\n
\n
# XXX this is just a copy / paste of the old implementation\n
# dirty code : if we are in domain or report tree, just use the old one, otherwise\n
# use the new one that gives better results in list mode.\n
if is_domain_tree_mode or is_report_tree_mode : \n
result = {}\n
\n
# 0.5 is too small and can crash pdf generation\n
min_column_width = 1\n
\n
for listboxline in listboxline_list:\n
if 1 : #not listboxline.isTitleLine():\n
line_width = 0\n
col_count = 0\n
if is_report_tree_mode:\n
col_count += 1\n
column_property = listboxline.getSectionName()\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
line_width += len(string_property) + section_width * (listboxline.getSectionDepth() - 1)\n
for column_id, column_property in listboxline.getColumnItemList(): \n
col_count += 1\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
line_width += len(string_property)\n
for column_id, column_property in listboxline.getColumnItemList():\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
result[column_id] = max(result.get(column_id, min_column_width),\n
min( frame_width * 2 / col_count, \n
frame_width * len(str(string_property)) / max(line_width, 1)))\n
if is_report_tree_mode:\n
column_property = listboxline.getSectionName()\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
column_id = \'section_name\'\n
result[column_id] = max(result.get(column_id,min_column_width), min(frame_width * 3 / col_count, frame_width * (len(str(string_property)) + section_width * (listboxline.getSectionDepth() - 1)) / max(line_width, 1)))\n
\n
total_col_width = 0.0\n
for column_id in result.keys():\n
if result[column_id] == 0.0:\n
result[column_id] = 1.0\n
for column_id in result.keys():\n
if column_id != \'section_name\' or is_report_tree_mode:\n
total_col_width += result[column_id]\n
for column_id in result.keys():\n
if column_id != \'section_name\' or is_report_tree_mode:\n
result[column_id] = result[column_id] * frame_width / total_col_width \n
\n
return result\n
\n
## End of dirty patch ###############################################\n
\n
\n
\n
# 0.5 is too small and can crash pdf generation\n
min_column_width = 1.2\n
\n
max_line_len = {}\n
number = (int, float, long)\n
col_count = 0\n
if listboxline_list:\n
col_count = len(listboxline_list[0].getColumnItemList())\n
max_column_property_len = 50 - (2 * col_count)\n
max_title_property_len = 35 - (2 * col_count)\n
for listboxline in listboxline_list:\n
for column_id, column_property in listboxline.getColumnItemList():\n
if isinstance(column_property, number):\n
string_property = "%0.2f+++++++" % (column_property)\n
elif isinstance(column_property, DateTime):\n
string_property = "%s++++++" % column_property.Date()\n
else:\n
string_property = str(column_property or \'\')[:max_column_property_len]\n
if listboxline.isStatLine():\n
string_property = "%s+++++" % string_property\n
elif listboxline.isTitleLine():\n
string_property = ("%s+++++" % str(Base_translateString(string_property)))[:max_title_property_len]\n
new_column_max_len = max(len(string_property),\n
max_line_len.get(column_id, 0))\n
\n
update_dict = {}\n
update_dict[column_id] = new_column_max_len\n
max_line_len.update(update_dict)\n
\n
total_max_len = float(sum(max_line_len.values()))\n
result = {}\n
for column_id, max_len in max_line_len.items() :\n
result[column_id] = min(\n
max((max(max_len, 1) / total_max_len) * frame_width,\n
min_column_width),\n
frame_width / col_count + 5)\n
return result\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listboxline_list, is_domain_tree_mode, is_report_tree_mode, frame_width=19.0, section_width=4.0, listbox=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ListBox_getColumnWithDict</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="utf-8" ?>\n
<template filename="default.pdf"\n
pagesize="A4"\n
landscape="1"\n
showboundary="1"\n
leftmargin="1cm"\n
rightmargin="1cm"\n
topmargin="1cm"\n
bottommargin="1cm"\n
allowsplitting="1">\n
\n
<stylesheet>\n
\n
<paragraphstyle name="Normal" fontname="Helvetica" fontsize="12" align="LEFT" firstLineIndent="0"/>\n
<paragraphstyle name="Bullet" fontname="Helvetica" fontsize="12" bulletFontName="Symbol" bulletFontSize="14" leftIndent="20" firstLineIndent="0" parent="Normal"/>\n
<paragraphstyle name="Heading1" parent="Normal" fontname="Helvetica-Bold" fontsize="16"/>\n
<paragraphstyle name="Heading2" parent="Normal" fontname="Helvetica-Bold" fontsize="15"/>\n
<paragraphstyle name="Heading3" parent="Normal" fontname="Helvetica-Bold" fontsize="14"/>\n
<paragraphstyle name="Heading4" parent="Normal" fontname="Helvetica-Bold" fontsize="13"/>\n
<paragraphstyle name="Heading5" parent="Normal" fontname="Helvetica-Bold" fontsize="12"/>\n
<paragraphstyle name="Heading6" parent="Normal" fontname="Helvetica-Bold" fontsize="11"/>\n
<paragraphstyle name="Heading7" parent="Normal" fontname="Helvetica-Bold" fontsize="10"/>\n
\n
<paragraphstyle name="Small" parent="Normal" fontname="Helvetica-Bold" fontsize="7"/>\n
<paragraphstyle name="Cell" parent="Normal" fontname="Helvetica-Bold" fontsize="12" alignment="center" />\n
<paragraphstyle name="CellHeading" parent="Normal" fontname="Helvetica-Bold" fontsize="13" alignment="center"/>\n
\n
<paragraphstyle name="Example" fontname="Courier-Oblique" fontsize="10" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine" fontname="Helvetica" fontsize="8" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine2" fontname="Helvetica" fontsize="6" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine3" align="RIGHT" fontname="Helvetica" fontsize="6"/>\n
\n
<paragraphstyle name="TableStandard" parent="Normal" fontname="Helvetica" fontsize="8" alignment="left" />\n
<paragraphstyle name="TableStandardLeftAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableStandardRightAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="right" />\n
<paragraphstyle name="TableHeader" parent="Normal" fontname="Helvetica-Oblique" fontsize="9" alignment="left" />\n
<paragraphstyle name="TableLastLine" parent="Normal" fontname="Helvetica-Oblique" fontsize="11" alignment="left" />\n
<paragraphstyle name="TableLastLineLeftAligned" parent="Normal"\n
fontname="Helvetica-Oblique" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableLastLineRightAligned" parent="Normal"\n
fontname="Helvetica-Oblique" fontsize="7" alignment="right" />\n
\n
<paragraphstyle name="Section1" parent="Normal" fontname="Helvetica-Bold" fontsize="10"/>\n
<paragraphstyle name="Section2" leftindent="0.4cm" parent="Normal" fontname="Helvetica-Bold" fontsize="7"/>\n
<paragraphstyle name="Section3" leftindent="0.8cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section4" leftindent="1.2cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section5" leftindent="1.6cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section6" leftindent="2.0cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section7" leftindent="2.4cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section8" leftindent="2.8cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section9" leftindent="3.2cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
\n
\n
<tablestyle name="StandardTable">\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
</tablestyle>\n
<tablestyle name="StandardTableWithGrid">\n
<stylecmd expr="(\'INNERGRID\', (0,1), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
</tablestyle>\n
<tablestyle name="MatrixBoxWithGrid">\n
<stylecmd expr="(\'INNERGRID\', (0,0), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (0,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (0,-1), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
</tablestyle>\n
<tablestyle name="AttributesTable">\n
<stylecmd expr="(\'INNERGRID\', (0,0), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (0,-1), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
</tablestyle>\n
\n
</stylesheet>\n
\n
\n
<pagetemplate id="FirstPage" nextid="FirstPage" startframe="content">\n
<static>\n
<infostring align="left" x="28cm" y= "1cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n
</static>\n
\n
<frame id="content"\n
nextid="content"\n
x="1.8cm"\n
y="0.6cm"\n
width="26cm"\n
height="19.5cm"\n
leftpadding="0.1cm"\n
rightpadding="0.1cm"\n
toppadding="0.2cm"\n
bottompadding="0.5cm"\n
showBoundary="1"/>\n
\n
</pagetemplate>\n
\n
</template>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>empty_pdf</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block tal:replace="nothing">\n
Users of this page template must define \'field\' name.\n
It will dispatch to the good macro, and supports proxy fields (in a quite ad-hoc way).\n
</tal:block><tal:block metal:define-macro="field">\n
\n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'MatrixBox\')">\n
<tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:condition="python: field.meta_type == \'ListBox\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'ListBox\')">\n
<tal:block tal:define="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>field_pdf_macro</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<document filename="erp5_list.pdf"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal" \n
tal:define="global frame_width python:25.8"\n
metal:define-macro="master">\n
<title>List Print</title>\n
<author>Nexedi</author>\n
<subject>Print Example</subject>\n
<content>\n
<tal:block metal:define-macro="form_layout"\n
tal:define="dummy python: request.set(\'here\',here);\n
listbox form/listbox | nothing;">\n
\n
<tal:block tal:condition="listbox">\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
\n
\n
</tal:block>\n
</content>\n
</document>\n
\n
\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>pdf_stylesheet</string> </key>
<value> <string>empty_pdf</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<document filename="erp5_list.pdf"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="global frame_width python:25.8"\n
metal:define-macro="master">\n
<title>List Print</title>\n
<author>Nexedi</author>\n
<subject>Print Example</subject>\n
<content>\n
<tal:block metal:define-macro="form_layout"\n
tal:define="dummy python: request.set(\'here\',here); ">\n
\n
\n
<tal:block tal:repeat="group python: [g for g in form.get_groups() if g not in (\'bottom\', \'hidden\')]">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n
<tal:block tal:condition="field_list">\n
<table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n
<tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<tr>\n
<td tal:attributes="colwidth python: \'5cm\'" >\n
<para style="TableHeader" tal:content="python: here.Localizer.erp5_ui.gettext(field.get_value(\'title\')).encode(\'utf-8\')"/>\n
</td>\n
<tal:block tal:define="item_list python:field.has_value(\'items\') and field.get_value(\'items\') or None">\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:repeat="item value">\n
<para style="TableStandard"\n
tal:content="python: str(item)"\n
tal:condition="not:item_list"/>\n
<para style="TableStandard"\n
tal:on-error="string: ${value} (???)"\n
tal:content="python: [i[0] for i in item_list if i[1] == item][0]"\n
tal:condition="item_list" />\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: (not (same_type(value,[]) or same_type(value,()) )) and (value != None)">\n
<para style="TableStandard"\n
tal:content="python: str(value)"\n
tal:condition="not:item_list" />\n
<para style="TableStandard"\n
tal:on-error="string: ${value} (???)"\n
tal:content="python: [i[0].replace(\'&amp;nbsp;\', \'\') for i in item_list if i[1] == value][0]"\n
tal:condition="item_list" />\n
</tal:block>\n
<tal:block tal:condition="python: value == None">\n
<para style="TableStandard" tal:content="python: \' \'" />\n
</tal:block>\n
</td>\n
</tal:block>\n
</tr>\n
</tal:block>\n
</tal:block>\n
</table>\n
\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:repeat="field field_list">\n
<tal:block metal:use-macro="here/field_pdf_macro/macros/field" />\n
</tal:block>\n
</tal:block>\n
\n
</tal:block>\n
</content>\n
</document>\n
\n
\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>pdf_stylesheet</string> </key>
<value> <string>empty_pdf</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<head>\n
<title tal:content="python: here.Localizer.erp5_ui.gettext(template.title).encode(\'utf8\')" >Listbox PDF Macro</title>\n
</head>\n
<body>\n
\n
\n
***** ########### listbox: must define the field listbox before calling this macro ! ########### *****\n
<tal:block metal:define-macro="listbox">\n
\n
<tal:block tal:define="listboxline_list python:listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n
selection_name python:listbox.get_value(\'selection_name\', REQUEST=request);\n
editable_columns python:listbox.get_value(\'editable_columns\', REQUEST=request);\n
editable_fields python:dict([(column[0], getattr(listbox.aq_parent, \'listbox_%s\' % column[0], None)) for column in editable_columns]);\n
selection python:here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n
is_domain_tree_mode selection/domain_tree_mode | nothing;\n
is_report_tree_mode selection/report_tree_mode | nothing;" >\n
\n
\n
<tal:block tal:condition="python: listboxline_list is not None and len(listboxline_list) > 1" >\n
\n
<tal:block tal:condition="python: is_domain_tree_mode">\n
<tal:block tal:define="domain_list python: selection.getDomainList()"\n
tal:condition="python: len(domain_list) > 0" >\n
<table style="StandardTableWithGrid">\n
<tr>\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(frame_width)">\n
<para style="TableHeader" tal:content="python: domain_list[-1]" />\n
</td>\n
</tr>\n
</table>\n
</tal:block>\n
</tal:block>\n
\n
\n
<tal:block tal:define="global column_width python:here.ListBox_getColumnWithDict(listboxline_list, is_domain_tree_mode, is_report_tree_mode, frame_width=frame_width, listbox=listbox)"/>\n
<table splitbyrow="1" repeatrows="1" repeatcols="0" style="StandardTableWithGrid">\n
\n
<tal:block tal:repeat="listboxline python: listboxline_list">\n
<tr>\n
\n
<tal:block tal:condition="python: is_report_tree_mode">\n
\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[\'section_name\'])">\n
<tal:block tal:condition="listboxline/getSectionName">\n
<para style="TableHeader" tal:content="listboxline/getSectionName"\n
tal:attributes="style python:\'Section%s\' % listboxline.getSectionDepth()" />\n
</tal:block>\n
</td>\n
</tal:block>\n
\n
<tal:block tal:condition="python: listboxline.isTitleLine()">\n
<tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n
<tal:block tal:define="column_property python: column_item[1];\n
column_id python: column_item[0]">\n
<tal:block tal:condition="python: column_property is not None">\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])">\n
<para style="TableHeader" tal:content="python: here.Localizer.erp5_ui.gettext(str(column_property)).encode(\'utf8\')"/>\n
</td>\n
</tal:block>\n
<tal:block tal:condition="python: column_property is None">\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])">\n
<para style="TableHeader" tal:content="python: \'\'" />\n
</td>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
\n
<tal:block tal:condition="python: listboxline.isDataLine() ">\n
<tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n
<tal:block tal:define="column_property python: column_item[1];\n
column_id python: column_item[0];\n
is_list python:same_type(column_property, []) or same_type(column_property, ())">\n
<tal:block tal:condition="python: is_list">\n
<td>\n
<tal:block tal:repeat="item column_property">\n
<para style="TableStandard"\n
tal:attributes="style python:isinstance(item, (int, long, float)) and \'TableStandardRightAligned\' or \'TableStandardLeftAligned\'"\n
tal:content="item"/>\n
</tal:block>\n
</td>\n
</tal:block>\n
<tal:block tal:condition="python: column_property is not None and not is_list">\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])"\n
tal:define="field python: editable_fields.get(column_id, None)" >\n
<para tal:condition="python: field is None"\n
style="TableStandard" tal:content="column_property"\n
tal:attributes="style python:isinstance(column_property, (int, long, float)) and \'TableStandardRightAligned\' or \'TableStandardLeftAligned\'" />\n
<para tal:condition="python: field is not None"\n
style="TableStandard" tal:content="python:field.render_pdf(column_property)"\n
tal:attributes="style python:isinstance(column_property, (int, long, float)) and \'TableStandardRightAligned\' or \'TableStandardLeftAligned\'" />\n
</td>\n
</tal:block>\n
<tal:block tal:condition="python: column_property is None">\n
<td>\n
<para style="TableStandard" tal:content="string:" />\n
</td>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:condition="python: listboxline.isStatLine() or listboxline.isSummaryLine()">\n
<tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n
<tal:block tal:define="column_property python: column_item[1];\n
column_id python: column_item[0]">\n
<tal:block tal:condition="python: column_property is not None">\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])"\n
tal:define="field python: editable_fields.get(column_id, None)">\n
<para tal:condition="python: field is None"\n
style="TableLastLine" tal:content="column_property"\n
tal:attributes="style python:isinstance(column_property, (int, long, float)) and \'TableLastLineRightAligned\' or \'TableLastLineLeftAligned\'" />\n
<para tal:condition="python: field is not None"\n
style="TableLastLine" tal:content="python: field.render_pdf(column_property)"\n
tal:attributes="style python:isinstance(column_property, (int, long, float)) and \'TableLastLineRightAligned\' or \'TableLastLineLeftAligned\'" />\n
</td>\n
</tal:block>\n
<tal:block tal:condition="python: column_property is None">\n
<td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])">\n
<para style="TableLastLine"> </para>\n
</td>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
</tr>\n
</tal:block>\n
\n
\n
</table>\n
</tal:block>\n
\n
\n
\n
</tal:block>\n
</tal:block>\n
\n
\n
</body>\n
</html>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_pdf_macro</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<head>\n
<title tal:content="template/title">Matrixbox PDF Macro</title>\n
</head>\n
<body> \n
\n
\n
***** ########### matrixbox: must define the field matrixbox before calling this macro ! ########### *****\n
<tal:block metal:define-macro="matrixbox"> \n
\n
<tal:block tal:define="list python:matrixbox.get_value(\'default\', render_format=\'list\', REQUEST=request);" >\n
\n
<tal:block tal:repeat="tab list">\n
<table splitbyrow="1" repeatrows="1" repeatcols="0" style="MatrixBoxWithGrid">\n
<tal:block tal:repeat="row tab">\n
<tr>\n
<tal:block tal:repeat="column row">\n
<td>\n
\n
<para style="TableStandard" tal:content="python: column" />\n
\n
</td>\n
</tal:block>\n
</tr>\n
</tal:block>\n
</table>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
</tal:block>\n
\n
</tal:block>\n
\n
\n
\n
</tal:block> \n
\n
\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox_pdf_macro</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="utf-8" ?>\n
<template filename="default.pdf"\n
pagesize="A4"\n
landscape="1"\n
showboundary="1"\n
leftmargin="1cm"\n
rightmargin="1cm"\n
topmargin="1cm"\n
bottommargin="1cm"\n
allowsplitting="1"\n
tal:define="landscape python: int(request.get(\'landscape\', 0) or 0);\n
header python: not int(request.get(\'no_header\', 0) or 0)"\n
tal:attributes="landscape landscape">\n
\n
<stylesheet>\n
\n
<paragraphstyle name="Normal" fontname="Helvetica" fontsize="9" align="LEFT" firstLineIndent="0"/>\n
<paragraphstyle name="Bullet" fontname="Helvetica" fontsize="9" bulletFontName="Symbol" bulletFontSize="8" leftIndent="20" firstLineIndent="0" parent="Normal"/>\n
<paragraphstyle name="Title" parent="Normal" fontname="Helvetica-Bold" fontsize="32" leading="30"/>\n
<paragraphstyle name="Heading1" parent="Normal" fontname="Helvetica-Bold" fontsize="16" spacebefore="20"/>\n
<paragraphstyle name="Heading2" parent="Normal" fontname="Helvetica-Bold" fontsize="15" spacebefore="15"/>\n
<paragraphstyle name="Heading3" parent="Normal" fontname="Helvetica-Bold" fontsize="14" spacebefore="10"/>\n
<paragraphstyle name="Heading4" parent="Normal" fontname="Helvetica-Bold" fontsize="13" spacebefore="15"/>\n
<paragraphstyle name="Heading5" parent="Normal" fontname="Helvetica-Bold" fontsize="12" spacebefore="5"/>\n
<paragraphstyle name="Heading6" parent="Normal" fontname="Helvetica-Bold" fontsize="11" spacebefore="5"/>\n
<paragraphstyle name="Heading7" parent="Normal" fontname="Helvetica-Bold" fontsize="10" spacebefore="5"/>\n
<paragraphstyle name="Heading8" parent="Normal" fontname="Helvetica-Bold" fontsize="10" spacebefore="5"/>\n
<paragraphstyle name="Heading9" parent="Normal" fontname="Helvetica-Bold" fontsize="10" spacebefore="5"/>\n
\n
<paragraphstyle name="Small" parent="Normal" fontname="Helvetica-Bold" fontsize="6"/>\n
<paragraphstyle name="Cell" parent="Normal" fontname="Helvetica-Bold" fontsize="9" alignment="center" />\n
<paragraphstyle name="CellHeading" parent="Normal" fontname="Helvetica-Bold" fontsize="9" alignment="center"/>\n
\n
<paragraphstyle name="Example" fontname="Courier-Oblique" fontsize="10" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine" fontname="Helvetica" fontsize="8" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine2" fontname="Helvetica" fontsize="6" parent="Normal"/>\n
<paragraphstyle name="ParaHeadLine3" align="RIGHT" fontname="Helvetica" fontsize="6"/>\n
\n
<paragraphstyle name="TableStandard" parent="Normal" fontname="Helvetica" fontsize="7" alignment="right" />\n
<paragraphstyle name="TableStandardLeftAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableStandardRightAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="right" />\n
<paragraphstyle name="TableHeader" parent="Normal" fontname="Helvetica-Oblique" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableLastLine" parent="Normal" fontname="Helvetica-Oblique" fontsize="7" alignment="right" />\n
<paragraphstyle name="TableLastLineLeftAligned" parent="Normal"\n
fontname="Helvetica-Oblique" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableLastLineRightAligned" parent="Normal"\n
fontname="Helvetica-Oblique" fontsize="7" alignment="right" />\n
\n
<paragraphstyle name="Section1" parent="Normal" fontname="Helvetica-Bold" fontsize="10"/>\n
<paragraphstyle name="Section2" leftindent="0.4cm" parent="Normal" fontname="Helvetica-Bold" fontsize="7"/>\n
<paragraphstyle name="Section3" leftindent="0.8cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section4" leftindent="1.2cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section5" leftindent="1.6cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section6" leftindent="2.0cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section7" leftindent="2.4cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section8" leftindent="2.8cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
<paragraphstyle name="Section9" leftindent="3.2cm" parent="Normal" fontname="Helvetica" fontsize="7"/>\n
\n
<tablestyle name="StandardTable">\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\n
<tablestyle name="StandardTableWithGrid">\n
<stylecmd expr="(\'INNERGRID\', (0,1), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\n
<tablestyle name="MatrixBoxWithGrid">\n
<stylecmd expr="(\'INNERGRID\', (0,0), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (0,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (0,-1), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\n
<tablestyle name="AttributesTable">\n
<stylecmd expr="(\'INNERGRID\', (0,0), (-1,-1), 1, (0.1,0.1,0.1))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (0,-1), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\n
\n
</stylesheet>\n
\n
<pagetemplate tal:condition="landscape" id="FirstPage" nextid="FirstPage" startframe="content">\n
<static>\n
<infostring tal:condition="header" align="left" x="1cm" y= "20cm" size="8" font="Helvetica" color="(0,0,0)"\n
tal:content="python: here.Localizer.erp5_ui.gettext(\'Printed by %(user)s at %(date)s\') % {\'user\':user.getUserName(), \'date\':DateTime()}" >Printed by</infostring>\n
<infostring align="left" x="26.5cm" y= "0.5cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n
</static>\n
<frame id="content"\n
nextid="content"\n
x="1.8cm"\n
y="0.6cm"\n
width="26cm"\n
height="19.5cm"\n
leftpadding="0.1cm"\n
rightpadding="0.1cm"\n
toppadding="0.2cm"\n
bottompadding="0.5cm"\n
showBoundary="1"/>\n
</pagetemplate>\n
\n
<pagetemplate tal:condition="not: landscape" id="FirstPage" nextid="FirstPage" startframe="content">\n
<static>\n
<infostring tal:condition="header" align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n
tal:content="python: here.Localizer.erp5_ui.gettext(\'Printed by %(user)s at %(date)s\') % {\'user\':user.getUserName(), \'date\':DateTime()}" >Printed by</infostring>\n
<infostring align="left" x="18cm" y= "0.5cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n
</static>\n
<frame id="content"\n
nextid="content"\n
x="1cm"\n
y="1cm"\n
width="19cm"\n
height="27.7cm"\n
leftpadding="0cm"\n
rightpadding="0cm"\n
toppadding="0cm"\n
bottompadding="0cm"\n
showBoundary="0"/>\n
</pagetemplate>\n
\n
</template>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_pdf</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1" ?>\n
<document filename="erp5_list.pdf"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="landscape python: int(request.get(\'landscape\', 0) or 0);\n
global frame_width python:landscape and 25.8 or 19"\n
metal:define-macro="master">\n
<title>List Print</title>\n
<author>ERP5</author>\n
<subject>Print Example</subject>\n
<!-- This template can be used to aggregate together some already rendered report sections.\n
In this case, "rendered_report_item_list" must be in the page template context. -->\n
<tal:block tal:define="rendered_report_item_list rendered_report_item_list | python: [];\n
report_item_list python: rendered_report_item_list or []">\n
<tal:block tal:condition="not: report_item_list">\n
<tal:block tal:condition="python: form.meta_type == \'ERP5 Report\'">\n
<tal:block tal:define="dummy python: report_item_list.extend(report_method())" />\n
</tal:block>\n
<tal:block tal:condition="python: form.meta_type == \'ERP5 Form\'">\n
<tal:block tal:repeat="reportbox python: [field for field in form.get_fields()\n
if field.getRecursiveTemplateField().meta_type == \'ReportBox\']">\n
<tal:block tal:define="dummy python: report_item_list.extend(reportbox.render())" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<content tal:define="dummy python: request.set(\'here\',here); ">\n
\n
<action name="nextPageTemplate">\n
<parameter>FirstPage</parameter>\n
</action>\n
\n
<para tal:content="python: here.Localizer.erp5_ui.gettext(form.getProperty(\'title\', \'\')).encode(\'utf-8\')" style=\'Title\'> report title </para>\n
\n
<spacer height="100" tal:condition="form/get_fields"/>\n
\n
<tal:block tal:repeat="group python: [g for g in form.get_groups() if g not in (\'bottom\', \'hidden\')]">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n
<tal:block tal:condition="field_list">\n
\n
<table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n
<tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<tr>\n
<td tal:attributes="colwidth python: \'5cm\'" >\n
<para style="TableHeader" tal:content="python: here.Localizer.erp5_ui.gettext(field.get_value(\'title\')).encode(\'utf-8\')" />\n
</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:block 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>\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
<tal:block tal:condition="python: field.has_value(\'items\')">\n
<tal:block tal:define="field_item_dict python:dict([(x[1], x[0]) for x in field.get_value(\'items\')]);">\n
<!-- field.render_pdf should do this. Also the check field.has_value is wrong with RelationFields.\n
Fortunatly we don\'t use them in reports for now --> \n
<para style="TableStandard"\n
tal:content="python: field_item_dict.get(value, \'??? (%s)\' % value)"/>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: not field.has_value(\'items\')">\n
<para style="TableStandard" tal:content="python: field.render_pdf(value)" />\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: value is None">\n
<para style="TableStandard" tal:content="python: \' \'" />\n
</tal:block>\n
</td>\n
</tr>\n
</tal:block>\n
</tal:block>\n
</table>\n
\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:condition="field_list">\n
<tal:block tal:repeat="field field_list">\n
<tal:block metal:use-macro="here/field_pdf_macro/macros/field" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
\n
<spacer height="100"/>\n
\n
<!-- if we are called with a rendered_report_item_list, just insert the rendered text here. -->\n
<tal:block tal:condition="rendered_report_item_list">\n
<tal:block tal:repeat="report_item report_item_list">\n
<tal:block tal:replace="structure report_item"/>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="portal_object here/portal_url/getPortalObject"\n
tal:condition="not: rendered_report_item_list">\n
<tal:block tal:repeat="report_item report_item_list">\n
<tal:block tal:define="here python:report_item.getObject(portal_object);\n
dummy python:report_item.pushReport(portal_object)">\n
<tal:block metal:define-macro="render_report_section"\n
tal:define="comment string:this is required for the macro;\n
landscape python: int(request.get(\'landscape\', 0) or 0);\n
global frame_width python:landscape and 25.8 or 19">\n
<tal:block tal:condition="report_item/getTitle">\n
<para style="Heading1" tal:content="report_item/getTitle"\n
tal:attributes="style python:\'Heading%s\' % report_item.getLevel()">toto</para><para/></tal:block>\n
<tal:block tal:condition="report_item/getFormId">\n
<tal:block tal:define="form python:getattr(here,report_item.getFormId())" >\n
<tal:block tal:condition="python:form.pt == \'form_view\'">\n
<tal:block metal:use-macro="form/form_view/macros/form_layout"/></tal:block>\n
<tal:block tal:condition="python:form.pt == \'form_list\'">\n
<tal:block metal:use-macro="form/form_list/macros/form_layout"/></tal:block></tal:block></tal:block></tal:block></tal:block>\n
<tal:block tal:define="dummy python:report_item.popReport(portal_object)"/>\n
</tal:block>\n
</tal:block>\n
\n
</content>\n
</tal:block>\n
</document>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_view</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>pdf_stylesheet</string> </key>
<value> <string>report_pdf</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2008-08-28 yusei
* Use Base_translateString or translateString instead of N_ for translation message.
2007-10-30 jerome
* Support for list fields in report_view
* define macros for deferred rendering
2007-08-17 jerome
* Add support for cases where matrixbox or listbox is a proxyfield
2007-08-13 jerome
* Add a global print action
2006-05-12 jerome
* remove debug info in generated XML by listbox macro
2006-03-08 jerome
* Display the listfields value from items
2006-02-24 Seb
* Created this business template in order to split erp5_core
\ No newline at end of file
Copyright (c) 2005-2006 Nexedi SARL
\ No newline at end of file
erp5_pdf_style is deprecated. Use erp5_odt_style instead.
GPL
\ No newline at end of file
jerome
jp
\ No newline at end of file
78
\ No newline at end of file
portal_properties | print
\ No newline at end of file
erp5_pdf_style | Print
\ No newline at end of file
erp5_pdf_style
\ No newline at end of file
erp5_pdf_style
\ No newline at end of file
5.4.7
\ 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