Commit 51e50197 authored by Łukasz Nowak's avatar Łukasz Nowak

- added optional support for specialised title for order and line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22357 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4499a29c
...@@ -157,6 +157,7 @@ for line in getSubLineList(context):\n ...@@ -157,6 +157,7 @@ for line in getSubLineList(context):\n
\'stop_date\': \'\',\n \'stop_date\': \'\',\n
\'base_price\': \'\',\n \'base_price\': \'\',\n
\'total_price\': \'\',\n \'total_price\': \'\',\n
\'specialise_title\': \'\',\n
}\n }\n
else:\n else:\n
if line.getPortalType().endswith(\'Cell\'):\n if line.getPortalType().endswith(\'Cell\'):\n
...@@ -178,6 +179,7 @@ for line in getSubLineList(context):\n ...@@ -178,6 +179,7 @@ for line in getSubLineList(context):\n
\'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n \'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n
\'base_price\': line.getPrice() or \'\',\n \'base_price\': line.getPrice() or \'\',\n
\'total_price\': line.getTotalPrice() or \'\',\n \'total_price\': line.getTotalPrice() or \'\',\n
\'specialise_title\' : getattr(line,\'getSpecialiseTitle\',None) is not None and (line.getSpecialiseTitle() or \'\') or \'\',\n
}\n }\n
total_price += line.getTotalPrice() or 0.0\n total_price += line.getTotalPrice() or 0.0\n
line_list.append(unicodeDict(line_dict.copy()))\n line_list.append(unicodeDict(line_dict.copy()))\n
...@@ -263,6 +265,7 @@ data_dict = {\n ...@@ -263,6 +265,7 @@ data_dict = {\n
\'total_price_novat\': total_price,\n \'total_price_novat\': total_price,\n
\'vat_list\': context.searchFolder(portal_type=context.getPortalTaxMovementTypeList(), order_by=\'title\'),\n \'vat_list\': context.searchFolder(portal_type=context.getPortalTaxMovementTypeList(), order_by=\'title\'),\n
\'description\': getFieldAsString(context.getDescription()),\n \'description\': getFieldAsString(context.getDescription()),\n
\'specialise_title\': context.getProperty(\'specialise_title\',\'\'),\n
\n \n
\'line_list\': line_list,\n \'line_list\': line_list,\n
}\n }\n
......
365 368
\ No newline at end of file \ 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