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

improve Packing List printout:

* show order reference and order date
* apply most fixes applied to Order printout
* don't show prices

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 78775b8b
......@@ -89,7 +89,15 @@ def getSubLineList(obj):\n
sub_list.extend(getSubLineList(x))\n
return sub_list\n
\n
return context.Delivery_getODTDataDict(getSourceReference, getSubLineList)\n
data_dict = context.Delivery_getODTDataDict(getSourceReference, getSubLineList)\n
order = context.getCausalityValue(portal_type=(\'Sale Order\', \'Purchase Order\'))\n
if order is not None:\n
order_date = order.getStopDate()\n
if context.getPortalType().startswith(\'Sale\'):\n
order_date = order.getStartDate()\n
data_dict.update(order_reference=order.getReference(),\n
order_date=order_date)\n
return data_dict\n
</string> </value>
</item>
<item>
......@@ -142,6 +150,10 @@ return context.Delivery_getODTDataDict(getSourceReference, getSubLineList)\n
<string>getSubLineList</string>
<string>_getattr_</string>
<string>context</string>
<string>data_dict</string>
<string>order</string>
<string>None</string>
<string>order_date</string>
</tuple>
</value>
</item>
......
......@@ -191,6 +191,9 @@ AAA=</string> </value>
<style:style style:name="Big_20_Table_20_Content" style:display-name="Big Table Content" style:family="paragraph" style:parent-style-name="Table_20_Contents">\n
<style:text-properties fo:font-size="8pt" fo:font-weight="bold"/>\n
</style:style>\n
<style:style style:name="Big_20_Table_20_Content_20_Left" style:display-name="Big Table Content Left" style:family="paragraph" style:parent-style-name="Big_20_Table_20_Content">\n
<style:paragraph-properties fo:margin-left="0.049cm" fo:margin-right="0cm" fo:text-align="start" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>\n
</style:style>\n
<style:style style:name="Item_20_Table_20_Title" style:display-name="Item Table Title" style:family="paragraph" style:parent-style-name="Table_20_Heading" style:class="extra">\n
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>\n
<style:text-properties fo:font-size="7pt" style:font-weight-asian="normal" style:font-weight-complex="normal"/>\n
......@@ -273,6 +276,9 @@ AAA=</string> </value>
<style:style style:name="Tableau4.A1" style:family="table-cell">\n
<style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>\n
</style:style>\n
<style:style style:name="Tableau4.A2" style:family="table-cell">\n
<style:table-cell-properties fo:padding="0.097cm" fo:border="none" style:vertical-align="middle"/>\n
</style:style>\n
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">\n
<style:text-properties style:font-name-asian="DejaVu Sans1" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans1" style:font-size-complex="14pt"/>\n
</style:style>\n
......@@ -304,18 +310,19 @@ AAA=</string> </value>
</office:automatic-styles>\n
<office:master-styles>\n
<style:master-page style:name="Standard" style:page-layout-name="pm1">\n
<style:header tal:define="orig_title string:Packing List;\n
en_title python: unicode(here.Base_translateString(orig_title, lang=\'en\'), \'utf-8\');\n
<style:header tal:define="default_language python:test(request.get(\'international_form\'), \'en\', here.Localizer.get_selected_language());\n
orig_title string:Packing List;\n
en_title python: unicode(here.Base_translateString(orig_title, lang=default_language), \'utf-8\');\n
my_title python: unicode(here.Base_translateString(orig_title), \'utf-8\');\n
orig_page string:Page;\n
en_page python: unicode(here.Base_translateString(orig_page, lang=\'en\'), \'utf-8\');\n
en_page python: unicode(here.Base_translateString(orig_page, lang=default_language), \'utf-8\');\n
my_page python: unicode(here.Base_translateString(orig_page), \'utf-8\');\n
orig_of string:of;\n
en_of python: unicode(here.Base_translateString(orig_of, lang=\'en\'), \'utf-8\');\n
en_of python: unicode(here.Base_translateString(orig_of, lang=default_language), \'utf-8\');\n
my_of python: unicode(here.Base_translateString(orig_of), \'utf-8\');\n
image_path python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_path\'] or data_dict[\'source_section_image_path\'];\n
image_width python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_width\'] or data_dict[\'source_section_image_width\'];\n
image_height python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_height\'] or data_dict[\'source_section_image_height\']">\n
image_path python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_path\'] or data_dict[\'source_decision_image_path\'];\n
image_width python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_width\'] or data_dict[\'source_decision_image_width\'];\n
image_height python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_image_height\'] or data_dict[\'source_decision_image_height\']">\n
<table:table table:name="Tableau4" table:style-name="Tableau4">\n
<table:table-column table:style-name="Tableau4.A"/>\n
<table:table-column table:style-name="Tableau4.B"/>\n
......@@ -334,46 +341,35 @@ AAA=</string> </value>
height image_height"/>\n
</text:p>\n
</table:table-cell>\n
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">\n
<text:p text:style-name="Header"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_title\'] or data_dict[\'source_section_title\']">\n
<table:table-cell table:style-name="Tableau4.A2" office:value-type="string">\n
<text:p text:style-name="Big_20_Table_20_Content_20_Left"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_administration_title\'] or data_dict[\'source_administration_title\']">\n
</text:p>\n
<text:p text:style-name="Header"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_address\'] or data_dict[\'source_section_address\']">\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_administration_address\'] or data_dict[\'source_administration_address\']">\n
</text:p>\n
<text:p text:style-name="Header"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_telfax\'] or data_dict[\'source_section_telfax\']">\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_administration_telfax\'] or data_dict[\'source_administration_telfax\']">\n
</text:p>\n
<text:p text:style-name="Header"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_email\'] or data_dict[\'source_section_email\']">\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_administration_email\'] or data_dict[\'source_administration_email\']">\n
</text:p>\n
<text:p text:style-name="Header"\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_section_vatid\'] or data_dict[\'source_section_vatid\']">\n
tal:content="python: here.getPortalType().startswith(\'Purchase\') and data_dict[\'destination_administration_vatid\'] or data_dict[\'source_administration_vatid\']">\n
</text:p>\n
</table:table-cell>\n
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">\n
<text:p text:style-name="P1"/>\n
</table:table-cell>\n
</table:table-row>\n
<table:table-row>\n
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">\n
<text:p text:style-name="P1"/>\n
</table:table-cell>\n
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">\n
<text:p text:style-name="P1"/>\n
</table:table-cell>\n
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">\n
<text:p text:style-name="Header_20_Title"\n
tal:content="en_title">\n
</text:p>\n
<text:p text:style-name="Header_20_right"\n
tal:content="my_title">\n
tal:content="my_title" tal:condition="python: my_title != en_title">\n
</text:p>\n
<text:p text:style-name="Header_20_right">\n
<text:p tal:replace="my_page"/>\n
<text:page-number text:select-page="current">1</text:page-number>\n
<text:p tal:replace="my_of"/><text:page-count>1</text:page-count>\n
</text:p>\n
<text:p tal:replace="my_of"/>\n
<text:page-count>1</text:page-count></text:p>\n
</table:table-cell>\n
</table:table-row>\n
</table:table>\n
......
......@@ -88,6 +88,7 @@
<value>
<list>
<string>your_target_language</string>
<string>your_international_form</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_international_form</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Include english and translated version of all terms.</string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>International Form</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -9,12 +9,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>delegated_list</string> </key>
<value>
......
447
\ No newline at end of file
449
\ 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