Commit f3dd327d authored by Nicolas Delaby's avatar Nicolas Delaby

Enhance image handling for printouts

Factorize some code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21709 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8aaad501
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>T_ = context.Base_translateString\n
\n
def getFieldAsString(field):\n
field = field or \'\'\n
text = field.replace(\'\\r\', \'\')\n
text_list = text.split(\'\\n\')\n
text_list = [x for x in text_list if x]\n
return \', \'.join(text_list)\n
\n
def getProductAndLineDesc(prod_desc, line_desc):\n
if prod_desc:\n
if line_desc:\n
return \' - \'.join([getFieldAsString(prod_desc), getFieldAsString(line_desc)])\n
return getFieldAsString(prod_desc)\n
return getFieldAsString(line_desc)\n
\n
def getOneLineAddress(text, region):\n
text_list = [getFieldAsString(text)]\n
if region:\n
text_list.append(region)\n
return \', \'.join(text_list)\n
\n
def getPhoneAndFax(phone, fax):\n
s = \'\'\n
if phone:\n
s += \'%s: %s\' % (T_(\'tel.\'), phone)\n
if fax:\n
if s: s += \', \'\n
s += \'%s: %s\' % (T_(\'fax\'), fax)\n
return s\n
\n
def getEmail(email):\n
s = \'\'\n
if email:\n
s += \'%s: %s\' % (T_(\'email\'), email)\n
return s\n
\n
def getVatId(vat_id):\n
s = \'\'\n
if vat_id:\n
s += \'%s: %s\' % (T_(\'VAT ID\'), vat_id)\n
return s\n
\n
preferred_date_order = context.getPortalObject().portal_preferences.getPreferredDateOrder() or \'ymd\'\n
separator = \'/\'\n
def getOrderedDate(date):\n
if date is None:\n
return \'\'\n
pattern = separator.join([\'%%%s\' % s for s in list(preferred_date_order)])\n
pattern = pattern.replace(\'y\', \'Y\')\n
return date.strftime(pattern)\n
\n
def getPaymentConditionText(order):\n
if order.getPaymentConditionPaymentEndOfMonth():\n
return T_("End of Month")\n
days = order.getPaymentConditionPaymentTerm()\n
if days:\n
return \'%s %s\' % (days, T_(\'Days\'))\n
return \'\'\n
\n
line_list = []\n
total_price = 0.0\n
total_vat = 0.0\n
\n
def unicodeDict(d):\n
for k, v in d.items():\n
if isinstance(v, str):\n
d.update({k:unicode(v, \'utf8\')})\n
return d\n
\n
\n
for line in getSubLineList(context):\n
prod_desc = line.getResource() is not None and line.getResourceValue().getDescription() or \'\'\n
desc = getProductAndLineDesc(prod_desc, line.getDescription())\n
if getattr(line, \'hasLineContent\', None) is not None and line.hasLineContent()\\\n
or getattr(line, \'hasCellContent\', None) is not None and line.hasCellContent():\n
# summary\n
line_dict = {\n
\'style_name\': \'Item_20_Table_20_Title\',\n
\'left_style_name\': \'Item_20_Table_20_Title_20_Left\',\n
\'right_style_name\': \'Item_20_Table_20_Title_20_Right\',\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
\'total_quantity\': \'\',\n
\'quantity_unit\': \'\',\n
\'stop_date\': \'\',\n
\'base_price\': \'\',\n
\'total_price\': \'\',\n
}\n
else:\n
line_dict = {\n
\'style_name\': \'Table_20_Contents\',\n
\'left_style_name\': \'Table_20_Contents_20_Left\',\n
\'right_style_name\': \'Table_20_Contents_20_Right\',\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
\'total_quantity\': line.getTotalQuantity() or \'\',\n
\'quantity_unit\': line.getQuantityUnitTitle() or (line.getResource() and line.getResourceValue().getQuantityUnitTitle()) or \'\',\n
\'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n
\'base_price\': line.getPrice() or \'\',\n
\'total_price\': line.getTotalPrice() or \'\',\n
}\n
total_price += line.getTotalPrice() or 0.0\n
line_list.append(unicodeDict(line_dict.copy()))\n
inch_cm_ratio = 2.54 / 100.0\n
data_dict = {\n
\'source_section_title\': context.getSourceSectionTitle() or \'\',\n
\'source_section_image_path\': context.getSourceSectionValue() is not None and context.getSourceSectionValue().getDefaultImagePath() or \'\',\n
\'source_section_image_width\': context.getSourceSectionValue() is not None\\\n
and context.getSourceSectionValue().getDefaultImageWidth() is not None\\\n
and context.getSourceSectionValue().getDefaultImageWidth() * inch_cm_ratio or \'\',\n
\'source_section_image_height\': context.getSourceSectionValue() is not None\\\n
and context.getSourceSectionValue().getDefaultImageHeight() is not None\\\n
and context.getSourceSectionValue().getDefaultImageHeight() * inch_cm_ratio or \'\',\n
\'source_section_address\': getOneLineAddress(\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and context.getSourceSectionValue().getTelephoneText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getFaxText() or \'\'),\n
\'source_section_email\': getEmail(context.getSourceSection() and context.getSourceSectionValue().getEmailText() or \'\'),\n
\'source_section_vatid\': getVatId(context.getSourceSection() and\\\n
getattr(context.getSourceSectionValue(), \'getVatCode\', None)\\\n
is not None and\\\n
context.getSourceSectionValue().getVatCode() or \'\'),\n
\n
\'source_decision_title\': context.getSourceDecisionTitle() or \'\',\n
\'source_decision_image_path\': context.getSourceDecisionValue() is not None and context.getSourceDecisionValue().getDefaultImagePath() or \'\',\n
\'source_decision_image_width\': context.getSourceDecisionValue() is not None\\\n
and context.getSourceDecisionValue().getDefaultImageWidth() is not None\\\n
and context.getSourceDecisionValue().getDefaultImageWidth() * inch_cm_ratio or \'\',\n
\'source_decision_image_height\': context.getSourceDecisionValue() is not None\\\n
and context.getSourceDecisionValue().getDefaultImageHeight() is not None\\\n
and context.getSourceDecisionValue().getDefaultImageHeight() * inch_cm_ratio or \'\',\n
\'source_decision_address\':getOneLineAddress(\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_decision_telfax\': getPhoneAndFax(context.getSourceDecision() and context.getSourceDecisionValue().getTelephoneText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getFaxText() or \'\'),\n
\'source_decision_email\': getEmail(context.getSourceDecision() and context.getSourceDecisionValue().getEmailText() or \'\'),\n
\'source_decision_vatid\': getVatId(context.getSourceDecision() and\\\n
getattr(context.getSourceDecisionValue(), \'getVatCode\', None)\\\n
is not None and\\\n
context.getSourceDecisionValue().getVatCode() or \'\'),\n
\n
\'destination_title\': context.getDestinationTitle() or \'\',\n
\'destination_address\': getOneLineAddress(\n
context.getDestination() and context.getDestinationValue().getDefaultAddressText() or \'\',\n
context.getDestination() and context.getDestinationValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_telfax\': getPhoneAndFax(context.getDestination() and context.getDestinationValue().getTelephoneText() or \'\',\n
context.getDestination() and context.getDestinationValue().getFaxText() or \'\'),\n
\'destination_email\': getEmail(context.getDestination() and context.getDestinationValue().getEmailText() or \'\'),\n
\n
\'destination_section_title\': context.getDestinationSectionTitle() or \'\',\n
\'destination_section_image_path\': context.getDestinationSectionValue() is not None and context.getDestinationSectionValue().getDefaultImagePath() or \'\',\n
\'destination_section_image_width\': context.getDestinationSectionValue() is not None\\\n
and context.getDestinationSectionValue().getDefaultImageWidth() is not None\\\n
and context.getDestinationSectionValue().getDefaultImageWidth() * inch_cm_ratio or \'\',\n
\'destination_section_image_height\': context.getDestinationSectionValue() is not None\\\n
and context.getDestinationSectionValue().getDefaultImageHeight() is not None\\\n
and context.getDestinationSectionValue().getDefaultImageHeight() * inch_cm_ratio or \'\',\n
\'destination_section_address\': getOneLineAddress(\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_section_telfax\': getPhoneAndFax(\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\'),\n
\'destination_section_email\': getEmail(context.getDestinationSection() and context.getDestinationSectionValue().getEmailText() or \'\'),\n
\'destination_section_vatid\': getVatId(context.getDestinationSection() and context.getDestinationSectionValue().getVatCode() or \'\'),\n
\n
\'destination_decision_title\': context.getDestinationDecisionTitle() or \'\',\n
\'destination_decision_telfax\': getPhoneAndFax(context.getDestinationDecision() and context.getDestinationDecisionValue().getTelephoneText() or \'\',\n
context.getDestinationDecision() and context.getDestinationDecisionValue().getFaxText() or \'\'),\n
\'destination_decision_email\': getEmail(context.getDestinationDecision() and context.getDestinationDecisionValue().getEmailText() or \'\'),\n
\n
\'reference\': context.getReference() or \'\',\n
\'start_date\': getOrderedDate(context.getStartDate()) or \'\',\n
\'stop_date\': getOrderedDate(context.getStopDate()) or \'\',\n
\'currency\': context.getPriceCurrencyReference() or \'\',\n
\'payment_condition\': getPaymentConditionText(context),\n
\'delivery_mode\': context.getDeliveryModeTitle() or \'\',\n
\'incoterm\': context.getIncoterm() and context.getIncotermValue().getCodification() or \'\',\n
\n
\'total_price_novat\': total_price,\n
\'vat_list\': context.searchFolder(portal_type=context.getPortalTaxMovementTypeList(), order_by=\'title\'),\n
\'description\': getFieldAsString(context.getDescription()),\n
\n
\'line_list\': line_list,\n
}\n
\n
return unicodeDict(data_dict)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>getSourceReference, getSubLineList</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>getSourceReference</string>
<string>getSubLineList</string>
<string>_getattr_</string>
<string>context</string>
<string>T_</string>
<string>getFieldAsString</string>
<string>getProductAndLineDesc</string>
<string>getOneLineAddress</string>
<string>getPhoneAndFax</string>
<string>getEmail</string>
<string>getVatId</string>
<string>preferred_date_order</string>
<string>separator</string>
<string>getOrderedDate</string>
<string>getPaymentConditionText</string>
<string>line_list</string>
<string>total_price</string>
<string>total_vat</string>
<string>unicodeDict</string>
<string>_getiter_</string>
<string>line</string>
<string>None</string>
<string>prod_desc</string>
<string>desc</string>
<string>getattr</string>
<string>line_dict</string>
<string>_inplacevar_</string>
<string>inch_cm_ratio</string>
<string>data_dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_getODTDataDict</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -65,61 +65,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>T_ = context.Base_translateString\n
\n
def getFieldAsString(field):\n
field = field or \'\'\n
text = field.replace(\'\\r\', \'\')\n
text_list = text.split(\'\\n\')\n
text_list = [x for x in text_list if x]\n
return \', \'.join(text_list)\n
\n
def getProductAndLineDesc(prod_desc, line_desc):\n
if prod_desc:\n
if line_desc:\n
return \' - \'.join([getFieldAsString(prod_desc), getFieldAsString(line_desc)])\n
return getFieldAsString(prod_desc)\n
return getFieldAsString(line_desc)\n
\n
def getOneLineAddress(text, region):\n
text_list = [getFieldAsString(text)]\n
if region:\n
text_list.append(region)\n
return \', \'.join(text_list)\n
\n
def getPhoneAndFax(phone, fax):\n
s = \'\'\n
if phone:\n
s += \'%s: %s\' % (T_(\'tel.\'), phone)\n
if fax:\n
if s: s += \', \'\n
s += \'%s: %s\' % (T_(\'fax\'), fax)\n
return s\n
\n
def getEmail(email):\n
s = \'\'\n
if email:\n
s += \'%s: %s\' % (T_(\'email\'), email)\n
return s\n
\n
def getVatId(vat_id):\n
s = \'\'\n
if vat_id:\n
s += \'%s: %s\' % (T_(\'VAT ID\'), vat_id)\n
return s\n
\n
preferred_date_order = context.getPortalObject().portal_preferences.getPreferredDateOrder() or \'ymd\'\n
separator = \'/\'\n
def getOrderedDate(date):\n
if date is None:\n
return \'\'\n
pattern = separator.join(list(preferred_date_order))\n
pattern = pattern.replace(\'y\', \'%Y\')\n
pattern = pattern.replace(\'m\', \'%m\')\n
pattern = pattern.replace(\'d\', \'%d\')\n
return date.strftime(pattern)\n
\n
def getSourceReference(line):\n
<value> <string>def getSourceReference(line):\n
category_list = line.getAcquiredCategoryList()\n
portal_type_list = (\'Purchase Supply Line\',\n
\'Purchase Supply Cell\',\n
......@@ -133,18 +79,6 @@ def getSourceReference(line):\n
return source_reference\n
return \'\'\n
\n
def getPaymentConditionText(order):\n
if order.getPaymentConditionPaymentEndOfMonth():\n
return T_("End of Month")\n
days = order.getPaymentConditionPaymentTerm()\n
if days:\n
return \'%s %s\' % (days, T_(\'Days\'))\n
return \'\'\n
\n
line_list = []\n
total_price = 0.0\n
total_vat = 0.0\n
\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.searchFolder(portal_type=context.getPortalOrderMovementTypeList(),\n
......@@ -155,110 +89,7 @@ def getSubLineList(obj):\n
sub_list.extend(getSubLineList(x))\n
return sub_list\n
\n
def unicodeDict(d):\n
for k, v in d.items():\n
if isinstance(v, str):\n
d.update({k:unicode(v, \'utf8\')})\n
return d\n
\n
\n
for line in getSubLineList(context):\n
prod_desc = line.getResource() is not None and line.getResourceValue().getDescription() or \'\'\n
desc = getProductAndLineDesc(prod_desc, line.getDescription())\n
if line.hasLineContent() or line.hasCellContent():\n
# summary\n
line_dict = {\n
\'style_name\': \'Item_20_Table_20_Title\',\n
\'left_style_name\': \'Item_20_Table_20_Title_20_Left\',\n
\'right_style_name\': \'Item_20_Table_20_Title_20_Right\',\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
\'total_quantity\': \'\',\n
\'quantity_unit\': \'\',\n
\'stop_date\': \'\',\n
\'base_price\': \'\',\n
\'total_price\': \'\',\n
}\n
else:\n
line_dict = {\n
\'style_name\': \'Table_20_Contents\',\n
\'left_style_name\': \'Table_20_Contents_20_Left\',\n
\'right_style_name\': \'Table_20_Contents_20_Right\',\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
\'total_quantity\': line.getTotalQuantity() or \'\',\n
\'quantity_unit\': line.getQuantityUnitTitle() or (line.getResource() and line.getResourceValue().getQuantityUnitTitle()) or \'\',\n
\'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n
\'base_price\': line.getPrice() or \'\',\n
\'total_price\': line.getTotalPrice() or \'\',\n
}\n
total_price += line.getTotalPrice() or 0.0\n
line_list.append(unicodeDict(line_dict.copy()))\n
\n
data_dict = {\n
\'source_section_title\': context.getSourceSectionTitle() or \'\',\n
\'source_section_image_path\': context.getSourceSectionValue() is not None and context.getSourceSectionValue().getDefaultImagePath() or \'\',\n
\'source_section_address\': getOneLineAddress(\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and context.getSourceSectionValue().getTelephoneText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getFaxText() or \'\'),\n
\'source_section_email\': getEmail(context.getSourceSection() and context.getSourceSectionValue().getEmailText() or \'\'),\n
\n
\'source_decision_title\': context.getSourceDecisionTitle() or \'\',\n
\'source_decision_image_path\': context.getSourceDecisionValue() is not None and context.getSourceDecisionValue().getDefaultImagePath() or \'\',\n
\'source_decision_address\':getOneLineAddress(\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_decision_telfax\': getPhoneAndFax(context.getSourceDecision() and context.getSourceDecisionValue().getTelephoneText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getFaxText() or \'\'),\n
\'source_decision_email\': getEmail(context.getSourceDecision() and context.getSourceDecisionValue().getEmailText() or \'\'),\n
\'source_decision_vatid\': getVatId(context.getSourceDecision() and context.getSourceDecisionValue().getVatCode() or \'\'),\n
\n
\'destination_title\': context.getDestinationTitle() or \'\',\n
\'destination_address\': getOneLineAddress(\n
context.getDestination() and context.getDestinationValue().getDefaultAddressText() or \'\',\n
context.getDestination() and context.getDestinationValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_telfax\': getPhoneAndFax(context.getDestination() and context.getDestinationValue().getTelephoneText() or \'\',\n
context.getDestination() and context.getDestinationValue().getFaxText() or \'\'),\n
\'destination_email\': getEmail(context.getDestination() and context.getDestinationValue().getEmailText() or \'\'),\n
\n
\'destination_section_title\': context.getDestinationSectionTitle() or \'\',\n
\'destination_section_image_path\': context.getDestinationSectionValue() is not None and context.getDestinationSectionValue().getDefaultImagePath() or \'\',\n
\'destination_section_address\': getOneLineAddress(\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_section_telfax\': getPhoneAndFax(\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\'),\n
\'destination_section_email\': getEmail(context.getDestinationSection() and context.getDestinationSectionValue().getEmailText() or \'\'),\n
\'destination_section_vatid\': getVatId(context.getDestinationSection() and context.getDestinationSectionValue().getVatCode() or \'\'),\n
\n
\'destination_decision_title\': context.getDestinationDecisionTitle() or \'\',\n
\'destination_decision_telfax\': getPhoneAndFax(context.getDestinationDecision() and context.getDestinationDecisionValue().getTelephoneText() or \'\',\n
context.getDestinationDecision() and context.getDestinationDecisionValue().getFaxText() or \'\'),\n
\'destination_decision_email\': getEmail(context.getDestinationDecision() and context.getDestinationDecisionValue().getEmailText() or \'\'),\n
\n
\'reference\': context.getReference() or \'\',\n
\'start_date\': getOrderedDate(context.getStartDate()) or \'\',\n
\'stop_date\': getOrderedDate(context.getStopDate()) or \'\',\n
\'currency\': context.getPriceCurrencyReference() or \'\',\n
\'payment_condition\': getPaymentConditionText(context),\n
\'delivery_mode\': context.getDeliveryModeTitle() or \'\',\n
\'incoterm\': context.getIncoterm() and context.getIncotermValue().getCodification() or \'\',\n
\n
\'total_price_novat\': total_price,\n
\'vat_list\': context.searchFolder(portal_type=context.getPortalTaxMovementTypeList(), order_by=\'title\'),\n
\'description\': getFieldAsString(context.getDescription()),\n
\n
\'line_list\': line_list,\n
}\n
\n
return unicodeDict(data_dict)\n
return context.Delivery_getODTDataDict(getSourceReference, getSubLineList)\n
</string> </value>
</item>
<item>
......@@ -307,33 +138,10 @@ return unicodeDict(data_dict)\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>T_</string>
<string>getFieldAsString</string>
<string>getProductAndLineDesc</string>
<string>getOneLineAddress</string>
<string>getPhoneAndFax</string>
<string>getEmail</string>
<string>getVatId</string>
<string>preferred_date_order</string>
<string>separator</string>
<string>getOrderedDate</string>
<string>getSourceReference</string>
<string>getPaymentConditionText</string>
<string>line_list</string>
<string>total_price</string>
<string>total_vat</string>
<string>getSubLineList</string>
<string>unicodeDict</string>
<string>_getiter_</string>
<string>line</string>
<string>None</string>
<string>prod_desc</string>
<string>desc</string>
<string>line_dict</string>
<string>_inplacevar_</string>
<string>data_dict</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value>
</item>
......
......@@ -126,7 +126,7 @@ AAA=</string> </value>
</style:style>\n
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list"/>\n
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="extra" style:master-page-name="">\n
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:page-number="auto" fo:background-color="transparent" style:shadow="none" fo:keep-with-next="always">\n
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:text-align="end" style:justify-single-word="false" style:register-true="true" style:page-number="auto" fo:background-color="transparent" style:shadow="none" fo:keep-with-next="always" style:vertical-align="auto">\n
<style:tab-stops/>\n
<style:background-image/>\n
</style:paragraph-properties>\n
......@@ -215,6 +215,12 @@ AAA=</string> </value>
<style:style style:name="Graphics" style:family="graphic">\n
<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>\n
</style:style>\n
<style:style style:name="Header_20_Image" style:display-name="Header Image" style:family="graphic" style:parent-style-name="Graphics">\n
<style:graphic-properties svg:width="9.999cm" svg:height="0.049cm" text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0cm" fo:margin-right="0cm" style:run-through="foreground" style:wrap="right" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="left" style:horizontal-rel="paragraph" fo:background-color="transparent" style:background-transparency="100%" style:shadow="none">\n
<style:background-image/>\n
<style:columns fo:column-count="1" fo:column-gap="0cm"/>\n
</style:graphic-properties>\n
</style:style>\n
<text:outline-style>\n
<text:outline-level-style text:level="1" style:num-format="">\n
<style:list-level-properties text:min-label-distance="0.381cm"/>\n
......@@ -252,6 +258,9 @@ AAA=</string> </value>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>\n
</office:styles>\n
<office:automatic-styles>\n
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Header_20_Image">\n
<style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="left" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>\n
</style:style>\n
<style:page-layout style:name="pm1">\n
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1cm" fo:margin-bottom="1cm" fo:margin-left="1cm" fo:margin-right="1cm" fo:background-color="transparent" style:writing-mode="lr-tb" style:footnote-max-height="0cm">\n
<style:background-image/>\n
......@@ -271,9 +280,6 @@ AAA=</string> </value>
<style:header-style/>\n
<style:footer-style/>\n
</style:page-layout>\n
<number:number-style style:name="N0">\n
<number:number number:min-integer-digits="1"/>\n
</number:number-style>\n
</office:automatic-styles>\n
<office:master-styles>\n
<style:master-page style:name="Standard" style:page-layout-name="pm1">\n
......@@ -286,10 +292,17 @@ AAA=</string> </value>
orig_of string:of;\n
en_of python: unicode(here.Base_translateString(orig_of, lang=\'en\'), \'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_decision_image_path\']">\n
<text:p>\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
<text:p text:style-name="Header">\n
<office:include_img tal:condition="image_path"\n
tal:attributes="path image_path"/>\n
tal:attributes="path image_path;\n
draw:style-name string:fr1;\n
draw:z-index string:0;\n
text:anchor-type string:paragraph;\n
width image_width;\n
height image_height"/>\n
</text:p>\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_decision_title\']">\n
......
......@@ -65,61 +65,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>T_ = context.Base_translateString\n
\n
def getFieldAsString(field):\n
field = field or \'\'\n
text = field.replace(\'\\r\', \'\')\n
text_list = text.split(\'\\n\')\n
text_list = [x for x in text_list if x]\n
return \', \'.join(text_list)\n
\n
def getProductAndLineDesc(prod_desc, line_desc):\n
if prod_desc:\n
if line_desc:\n
return \' - \'.join([getFieldAsString(prod_desc), getFieldAsString(line_desc)])\n
return getFieldAsString(prod_desc)\n
return getFieldAsString(line_desc)\n
\n
def getOneLineAddress(text, region):\n
text_list = [getFieldAsString(text)]\n
if region:\n
text_list.append(region)\n
return \', \'.join(text_list)\n
\n
def getPhoneAndFax(phone, fax):\n
s = \'\'\n
if phone:\n
s += \'%s: %s\' % (T_(\'tel.\'), phone)\n
if fax:\n
if s: s += \', \'\n
s += \'%s: %s\' % (T_(\'fax\'), fax)\n
return s\n
\n
def getEmail(email):\n
s = \'\'\n
if email:\n
s += \'%s: %s\' % (T_(\'email\'), email)\n
return s\n
\n
def getVatId(vat_id):\n
s = \'\'\n
if vat_id:\n
s += \'%s: %s\' % (T_(\'VAT ID\'), vat_id)\n
return s\n
\n
preferred_date_order = context.getPortalObject().portal_preferences.getPreferredDateOrder() or \'ymd\'\n
separator = \'/\'\n
def getOrderedDate(date):\n
if date is None:\n
return \'\'\n
pattern = separator.join(list(preferred_date_order))\n
pattern = pattern.replace(\'y\', \'%Y\')\n
pattern = pattern.replace(\'m\', \'%m\')\n
pattern = pattern.replace(\'d\', \'%d\')\n
return date.strftime(pattern)\n
\n
def getSourceReference(line):\n
<value> <string>def getSourceReference(line):\n
category_list = line.getAcquiredCategoryList()\n
portal_type_list = (\'Purchase Packing List Line\',\n
\'Purchase Packing List Cell\',\n
......@@ -133,18 +79,6 @@ def getSourceReference(line):\n
return source_reference\n
return \'\'\n
\n
def getPaymentConditionText(order):\n
if order.getPaymentConditionPaymentEndOfMonth():\n
return T_("End of Month")\n
days = order.getPaymentConditionPaymentTerm()\n
if days:\n
return \'%s %s\' % (days, T_(\'Days\'))\n
return \'\'\n
\n
line_list = []\n
total_price = 0.0\n
total_vat = 0.0\n
\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.searchFolder(portal_type=context.getPortalDeliveryMovementTypeList(),\n
......@@ -155,93 +89,7 @@ def getSubLineList(obj):\n
sub_list.extend(getSubLineList(x))\n
return sub_list\n
\n
def unicodeDict(d):\n
for k, v in d.items():\n
if isinstance(v, str):\n
d.update({k:unicode(v, \'utf8\')})\n
return d\n
\n
for line in getSubLineList(context):\n
prod_desc = line.getResource() is not None and line.getResourceValue().getDescription() or \'\'\n
desc = getProductAndLineDesc(prod_desc, line.getDescription())\n
line_dict = {\n
\'style_name\': \'Table_20_Contents\',\n
\'left_style_name\': \'Table_20_Contents_20_Left\',\n
\'right_style_name\': \'Table_20_Contents_20_Right\',\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
\'total_quantity\': line.getTotalQuantity() or \'\',\n
\'quantity_unit\': line.getQuantityUnitTitle() or (line.getResource() and line.getResourceValue().getQuantityUnitTitle()) or \'\',\n
\'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n
\'base_price\': line.getPrice() or \'\',\n
\'total_price\': line.getTotalPrice() or \'\',\n
}\n
total_price += line.getTotalPrice() or 0.0\n
line_list.append(unicodeDict(line_dict.copy()))\n
\n
data_dict = {\n
\'source_section_title\': context.getSourceSectionTitle() or \'\',\n
\'source_section_image_path\': context.getSourceSectionValue() is not None and context.getSourceSectionValue().getDefaultImagePath() or \'\',\n
\'source_section_address\': getOneLineAddress(\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and context.getSourceSectionValue().getTelephoneText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getFaxText() or \'\'),\n
\'source_section_email\': getEmail(context.getSourceSection() and context.getSourceSectionValue().getEmailText() or \'\'),\n
\'source_section_vatid\': getVatId(context.getSourceSection() and context.getSourceSectionValue().getVatCode() or \'\'),\n
\n
\'source_decision_title\': context.getSourceDecisionTitle() or \'\',\n
\'source_decision_image_path\': context.getSourceDecisionValue() is not None and context.getSourceDecisionValue().getDefaultImagePath() or \'\',\n
\'source_decision_address\': getOneLineAddress(\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_decision_telfax\': getPhoneAndFax(context.getSourceDecision() and context.getSourceDecisionValue().getTelephoneText() or \'\',\n
context.getSourceDecision() and context.getSourceDecisionValue().getFaxText() or \'\'),\n
\'source_decision_email\': getEmail(context.getSourceDecision() and context.getSourceDecisionValue().getEmailText() or \'\'),\n
\'source_decision_vatid\': getVatId(context.getSourceDecision() and context.getSourceDecisionValue().getVatCode() or \'\'),\n
\n
\'destination_title\': context.getDestinationTitle() or \'\',\n
\'destination_address\': getOneLineAddress(\n
context.getDestination() and context.getDestinationValue().getDefaultAddressText() or \'\',\n
context.getDestination() and context.getDestinationValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_telfax\': getPhoneAndFax(context.getDestination() and context.getDestinationValue().getTelephoneText() or \'\',\n
context.getDestination() and context.getDestinationValue().getFaxText() or \'\'),\n
\'destination_email\': getEmail(context.getDestination() and context.getDestinationValue().getEmailText() or \'\'),\n
\n
\'destination_section_title\': context.getDestinationSectionTitle() or \'\',\n
\'destination_section_image_path\': context.getDestinationSectionValue() is not None and context.getDestinationSectionValue().getDefaultImagePath() or \'\',\n
\'destination_section_address\': getOneLineAddress(\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_section_telfax\': getPhoneAndFax(\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\'),\n
\'destination_section_email\': getEmail(context.getDestinationSection() and context.getDestinationSectionValue().getEmailText() or \'\'),\n
\'destination_section_vatid\': getVatId(context.getDestinationSection() and context.getDestinationSectionValue().getVatCode() or \'\'),\n
\n
\'destination_decision_title\': context.getDestinationDecisionTitle() or \'\',\n
\'destination_decision_telfax\': getPhoneAndFax(context.getDestinationDecision() and context.getDestinationDecisionValue().getTelephoneText() or \'\',\n
context.getDestinationDecision() and context.getDestinationDecisionValue().getFaxText() or \'\'),\n
\'destination_decision_email\': getEmail(context.getDestinationDecision() and context.getDestinationDecisionValue().getEmailText() or \'\'),\n
\n
\'reference\': context.getReference() or \'\',\n
\'start_date\': getOrderedDate(context.getStartDate()) or \'\',\n
\'stop_date\': getOrderedDate(context.getStopDate()) or \'\',\n
\'currency\': context.getPriceCurrencyReference() or \'\',\n
\'payment_condition\': getPaymentConditionText(context),\n
\'delivery_mode\': context.getDeliveryModeTitle() or \'\',\n
\'incoterm\': context.getIncoterm() and context.getIncotermValue().getCodification() or \'\',\n
\n
\'total_price_novat\': total_price,\n
\'vat_list\': context.searchFolder(portal_type=context.getPortalTaxMovementTypeList(), order_by=\'title\'),\n
\'description\': getFieldAsString(context.getDescription()),\n
\n
\'line_list\': line_list,\n
}\n
\n
return unicodeDict(data_dict)\n
return context.Delivery_getODTDataDict(getSourceReference, getSubLineList)\n
</string> </value>
</item>
<item>
......@@ -290,33 +138,10 @@ return unicodeDict(data_dict)\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>T_</string>
<string>getFieldAsString</string>
<string>getProductAndLineDesc</string>
<string>getOneLineAddress</string>
<string>getPhoneAndFax</string>
<string>getEmail</string>
<string>getVatId</string>
<string>preferred_date_order</string>
<string>separator</string>
<string>getOrderedDate</string>
<string>getSourceReference</string>
<string>getPaymentConditionText</string>
<string>line_list</string>
<string>total_price</string>
<string>total_vat</string>
<string>getSubLineList</string>
<string>unicodeDict</string>
<string>_getiter_</string>
<string>line</string>
<string>None</string>
<string>prod_desc</string>
<string>desc</string>
<string>line_dict</string>
<string>_inplacevar_</string>
<string>data_dict</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value>
</item>
......
......@@ -64,7 +64,7 @@ AAA=</string> </value>
<value> <string encoding="cdata"><![CDATA[
<office:document-content xmlns:office=\'urn:oasis:names:tc:opendocument:xmlns:office:1.0\' xmlns:text=\'urn:oasis:names:tc:opendocument:xmlns:text:1.0\' xmlns:number=\'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\' xmlns:meta=\'urn:oasis:names:tc:opendocument:xmlns:meta:1.0\' xmlns:tal=\'http://xml.zope.org/namespaces/tal\' xmlns:table=\'urn:oasis:names:tc:opendocument:xmlns:table:1.0\' xmlns:style=\'urn:oasis:names:tc:opendocument:xmlns:style:1.0\' xmlns:script=\'urn:oasis:names:tc:opendocument:xmlns:script:1.0\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' xmlns:math=\'http://www.w3.org/1998/Math/MathML\' xmlns:draw=\'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\' xmlns:form=\'urn:oasis:names:tc:opendocument:xmlns:form:1.0\' xmlns:ooo=\'http://openoffice.org/2004/office\' xmlns:dc=\'http://purl.org/dc/elements/1.1/\' xmlns:chart=\'urn:oasis:names:tc:opendocument:xmlns:chart:1.0\' xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\' xmlns:dr3d=\'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\' xmlns:fo=\'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\' xmlns:xforms=\'http://www.w3.org/2002/xforms\' xmlns:dom=\'http://www.w3.org/2001/xml-events\' xmlns:ooow=\'http://openoffice.org/2004/writer\' xmlns:svg=\'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\' xmlns:metal=\'http://xml.zope.org/namespaces/metal\' xmlns:xsd=\'http://www.w3.org/2001/XMLSchema\' xmlns:xsi=\'http://www.w3.org/2001/XMLSchema-instance\' xmlns:oooc=\'http://openoffice.org/2004/calc\' tal:attributes=\'dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")\' office:version=\'1.0\'\n
tal:define=\'data_dict here/Order_getODTDataDict\'>\n
tal:define=\'data_dict here/PackingList_getODTDataDict\'>\n
<office:scripts/>\n
<office:font-face-decls>\n
<style:font-face svg:font-family=\'StarSymbol\' style:name=\'StarSymbol\' style:font-charset=\'x-symbol\'/>\n
......
......@@ -126,7 +126,7 @@ AAA=</string> </value>
</style:style>\n
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list"/>\n
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="extra" style:master-page-name="">\n
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:page-number="auto" fo:background-color="transparent" style:shadow="none" fo:keep-with-next="always">\n
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:text-align="end" style:justify-single-word="false" style:register-true="true" style:page-number="auto" fo:background-color="transparent" style:shadow="none" fo:keep-with-next="always" style:vertical-align="auto">\n
<style:tab-stops/>\n
<style:background-image/>\n
</style:paragraph-properties>\n
......@@ -215,6 +215,12 @@ AAA=</string> </value>
<style:style style:name="Graphics" style:family="graphic">\n
<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>\n
</style:style>\n
<style:style style:name="Header_20_Image" style:display-name="Header Image" style:family="graphic" style:parent-style-name="Graphics">\n
<style:graphic-properties svg:width="9.999cm" svg:height="0.049cm" text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0cm" fo:margin-right="0cm" style:run-through="foreground" style:wrap="right" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="left" style:horizontal-rel="paragraph" fo:background-color="transparent" style:background-transparency="100%" style:shadow="none">\n
<style:background-image/>\n
<style:columns fo:column-count="1" fo:column-gap="0cm"/>\n
</style:graphic-properties>\n
</style:style>\n
<text:outline-style>\n
<text:outline-level-style text:level="1" style:num-format="">\n
<style:list-level-properties text:min-label-distance="0.381cm"/>\n
......@@ -252,6 +258,9 @@ AAA=</string> </value>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>\n
</office:styles>\n
<office:automatic-styles>\n
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Header_20_Image">\n
<style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="left" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>\n
</style:style>\n
<style:page-layout style:name="pm1">\n
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1cm" fo:margin-bottom="1cm" fo:margin-left="1cm" fo:margin-right="1cm" fo:background-color="transparent" style:writing-mode="lr-tb" style:footnote-max-height="0cm">\n
<style:background-image/>\n
......@@ -271,9 +280,6 @@ AAA=</string> </value>
<style:header-style/>\n
<style:footer-style/>\n
</style:page-layout>\n
<number:number-style style:name="N0">\n
<number:number number:min-integer-digits="1"/>\n
</number:number-style>\n
</office:automatic-styles>\n
<office:master-styles>\n
<style:master-page style:name="Standard" style:page-layout-name="pm1">\n
......@@ -286,10 +292,17 @@ AAA=</string> </value>
orig_of string:of;\n
en_of python: unicode(here.Base_translateString(orig_of, lang=\'en\'), \'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
<text:p>\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
<text:p text:style-name="Header">\n
<office:include_img tal:condition="image_path"\n
tal:attributes="path image_path"/>\n
tal:attributes="path image_path;\n
draw:style-name string:fr1;\n
draw:z-index string:0;\n
text:anchor-type string:paragraph;\n
width image_width;\n
height image_height"/>\n
</text:p>\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
......
388
\ No newline at end of file
389
\ 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