Commit c9258290 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_trade: translate title and description in Order_printAsODSSummary

parent 1d45ec10
...@@ -85,10 +85,10 @@ line_list.sort(sortMovement)\n ...@@ -85,10 +85,10 @@ line_list.sort(sortMovement)\n
\n \n
order_type_list = context.getPortalOrderTypeList()\n order_type_list = context.getPortalOrderTypeList()\n
def getMovementTitle(movement):\n def getMovementTitle(movement):\n
title = movement.getTitle()\n title = movement.getTranslatedTitle()\n
parent_value = movement.getParentValue()\n parent_value = movement.getParentValue()\n
while parent_value.getPortalType() not in order_type_list:\n while parent_value.getPortalType() not in order_type_list:\n
title = parent_value.getTitle() + \' / \' + title\n title = parent_value.getTranslatedTitle() + \' / \' + title\n
log(\'parent_value\', parent_value)\n log(\'parent_value\', parent_value)\n
parent_value = parent_value.getParentValue()\n parent_value = parent_value.getParentValue()\n
return title\n return title\n
...@@ -100,8 +100,8 @@ else:\n ...@@ -100,8 +100,8 @@ else:\n
default_quantity_unit_title = context.portal_categories.\\\n default_quantity_unit_title = context.portal_categories.\\\n
restrictedTraverse(\'quantity_unit/\' + default_quantity_unit).getTitle()\n restrictedTraverse(\'quantity_unit/\' + default_quantity_unit).getTitle()\n
\n \n
column_list = [(\'reference\', \'Reference\'), (\'title\', \'Title\'), \\\n column_list = [(\'reference\', \'Reference\'), (\'translated_title\', \'Title\'), \\\n
(\'description\', \'Description\'), (\'start_date\', \'Shipping Date\'), \\\n (\'translated_description\', \'Description\'), (\'start_date\', \'Shipping Date\'), \\\n
(\'stop_date\', \'Delivery Date\'), (\'per_line_total_price\', \'Total Price\')]\n (\'stop_date\', \'Delivery Date\'), (\'per_line_total_price\', \'Total Price\')]\n
if error is None:\n if error is None:\n
for line in line_list:\n for line in line_list:\n
......
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