Commit ca2fd9c4 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Display "Own Section" along "Third Party" in...

Display "Own Section" along "Third Party" in AccountingTransactionModule_viewAccountingTransactionList.
parent 0f1198a4
No related merge requests found
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox</string>
<string>listbox_delivery_own_section_title</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -157,6 +157,10 @@ ...@@ -157,6 +157,10 @@
<key> <string>all_columns</string> </key> <key> <string>all_columns</string> </key>
<value> <value>
<list> <list>
<tuple>
<string>delivery_own_section_title</string>
<string>Own Section</string>
</tuple>
<tuple> <tuple>
<string>translated_portal_type</string> <string>translated_portal_type</string>
<string>Type</string> <string>Type</string>
...@@ -293,6 +297,10 @@ ...@@ -293,6 +297,10 @@
<string>operation_date</string> <string>operation_date</string>
<string>operation_date</string> <string>operation_date</string>
</tuple> </tuple>
<tuple>
<string>delivery_own_section_title</string>
<string>delivery_own_section_title</string>
</tuple>
<tuple> <tuple>
<string>delivery_mirror_section_title</string> <string>delivery_mirror_section_title</string>
<string>delivery_mirror_section_title</string> <string>delivery_mirror_section_title</string>
...@@ -381,6 +389,10 @@ ...@@ -381,6 +389,10 @@
<string>title</string> <string>title</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple>
<string>delivery_own_section_title</string>
<string>Own Section</string>
</tuple>
<tuple> <tuple>
<string>delivery_mirror_section_title</string> <string>delivery_mirror_section_title</string>
<string>Third Party</string> <string>Third Party</string>
......
...@@ -49,6 +49,7 @@ specific_reference\r\n ...@@ -49,6 +49,7 @@ specific_reference\r\n
group_by\r\n group_by\r\n
search_result_keys=\'\'\r\n search_result_keys=\'\'\r\n
delivery_mirror_section_title=""\r\n delivery_mirror_section_title=""\r\n
delivery_own_section_title=""\r\n
source_section_where_expression\r\n source_section_where_expression\r\n
destination_section_where_expression</string> </value> destination_section_where_expression</string> </value>
</item> </item>
...@@ -90,7 +91,7 @@ destination_section_where_expression</string> </value> ...@@ -90,7 +91,7 @@ destination_section_where_expression</string> </value>
<key> <string>src</string> </key> <key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<dtml-let query="portal_catalog.buildSQLQuery(query=portal_catalog.getSecurityQuery(**selection_params), select_expression_key=(\'operation_date\', \'specific_reference\', \'delivery_mirror_section_title\',), **selection_params)">\n <dtml-let query="portal_catalog.buildSQLQuery(query=portal_catalog.getSecurityQuery(**selection_params), select_expression_key=(\'operation_date\', \'specific_reference\', \'delivery_mirror_section_title\', \'delivery_own_section_title\'), **selection_params)">\n
<dtml-let search_result_keys="search_result_keys or portal_catalog.getCatalogSearchResultKeys()">\n <dtml-let search_result_keys="search_result_keys or portal_catalog.getCatalogSearchResultKeys()">\n
<dtml-let use_movement_table="from_date or to_date or at_date or resource or stat or amount or amount_range_min or amount_range_max">\n <dtml-let use_movement_table="from_date or to_date or at_date or resource or stat or amount or amount_range_min or amount_range_max">\n
<dtml-let accounting_movement_list="portal_url.getPortalObject().getPortalAccountingMovementTypeList()">\n <dtml-let accounting_movement_list="portal_url.getPortalObject().getPortalAccountingMovementTypeList()">\n
...@@ -299,6 +300,7 @@ destination_section_where_expression</string> </value> ...@@ -299,6 +300,7 @@ destination_section_where_expression</string> </value>
<dtml-else>\n <dtml-else>\n
catalog.*,\n catalog.*,\n
( SELECT title FROM catalog as mirror_catalog WHERE mirror_catalog.uid=catalog.delivery_mirror_section_uid ) AS delivery_mirror_section_title,\n ( SELECT title FROM catalog as mirror_catalog WHERE mirror_catalog.uid=catalog.delivery_mirror_section_uid ) AS delivery_mirror_section_title,\n
( SELECT title FROM catalog as own_catalog WHERE own_catalog.uid=catalog.delivery_own_section_uid ) AS delivery_own_section_title,\n
( SELECT IFNULL(SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = catalog.uid AND stock.section_uid=catalog.category_uid AND stock.total_price > 0 AND <dtml-sqltest accounting_movement_list type=string column=child.portal_type op=eq multiple>) AS debit,\n ( SELECT IFNULL(SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = catalog.uid AND stock.section_uid=catalog.category_uid AND stock.total_price > 0 AND <dtml-sqltest accounting_movement_list type=string column=child.portal_type op=eq multiple>) AS debit,\n
( SELECT IFNULL(-SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = catalog.uid AND stock.section_uid=catalog.category_uid AND stock.total_price < 0 AND <dtml-sqltest accounting_movement_list type=string column=child.portal_type op=eq multiple>) AS credit\n ( SELECT IFNULL(-SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = catalog.uid AND stock.section_uid=catalog.category_uid AND stock.total_price < 0 AND <dtml-sqltest accounting_movement_list type=string column=child.portal_type op=eq multiple>) AS credit\n
</dtml-if>\n </dtml-if>\n
...@@ -325,6 +327,7 @@ destination_section_where_expression</string> </value> ...@@ -325,6 +327,7 @@ destination_section_where_expression</string> </value>
DISTINCT\n DISTINCT\n
delivery.start_date as operation_date\n delivery.start_date as operation_date\n
, delivery.destination_section_uid as delivery_mirror_section_uid\n , delivery.destination_section_uid as delivery_mirror_section_uid\n
, delivery.source_section_uid as delivery_own_section_uid\n
, \'source\' as section_mark\n , \'source\' as section_mark\n
, catalog.source_reference as specific_reference\n , catalog.source_reference as specific_reference\n
, catalog.*\n , catalog.*\n
...@@ -355,6 +358,7 @@ destination_section_where_expression</string> </value> ...@@ -355,6 +358,7 @@ destination_section_where_expression</string> </value>
stock, catalog as child, </dtml-if>\n stock, catalog as child, </dtml-if>\n
<dtml-if "section_category">category, catalog as section, </dtml-if>\n <dtml-if "section_category">category, catalog as section, </dtml-if>\n
<dtml-if "delivery_mirror_section_title">delivery AS mirror_section_delivery, catalog AS mirror_section_catalog,</dtml-if>\n <dtml-if "delivery_mirror_section_title">delivery AS mirror_section_delivery, catalog AS mirror_section_catalog,</dtml-if>\n
<dtml-if "delivery_own_section_title">delivery AS own_section_delivery, catalog AS own_section_catalog,</dtml-if>\n
catalog,\n catalog,\n
delivery\n delivery\n
\n \n
...@@ -420,6 +424,11 @@ destination_section_where_expression</string> </value> ...@@ -420,6 +424,11 @@ destination_section_where_expression</string> </value>
AND mirror_section_delivery.uid = catalog.uid\n AND mirror_section_delivery.uid = catalog.uid\n
AND <dtml-sqltest delivery_mirror_section_title type=string op=like column=mirror_section_catalog.title>\n AND <dtml-sqltest delivery_mirror_section_title type=string op=like column=mirror_section_catalog.title>\n
</dtml-if>\n </dtml-if>\n
<dtml-if "delivery_own_section_title">\n
AND own_section_catalog.uid = own_section_delivery.source_section_uid\n
AND own_section_delivery.uid = catalog.uid\n
AND <dtml-sqltest delivery_own_section_title type=string op=like column=own_section_catalog.title>\n
</dtml-if>\n
\n \n
<dtml-if from_date>\n <dtml-if from_date>\n
AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n
...@@ -513,6 +522,7 @@ UNION\n ...@@ -513,6 +522,7 @@ UNION\n
DISTINCT\n DISTINCT\n
delivery.stop_date as operation_date\n delivery.stop_date as operation_date\n
, delivery.source_section_uid as delivery_mirror_section_uid\n , delivery.source_section_uid as delivery_mirror_section_uid\n
, delivery.destination_section_uid as delivery_own_section_uid\n
, \'destination\' as section_mark\n , \'destination\' as section_mark\n
, catalog.destination_reference as specific_reference\n , catalog.destination_reference as specific_reference\n
, catalog.*\n , catalog.*\n
...@@ -543,6 +553,7 @@ UNION\n ...@@ -543,6 +553,7 @@ UNION\n
stock, catalog as child, </dtml-if>\n stock, catalog as child, </dtml-if>\n
<dtml-if "section_category">category, catalog as section, </dtml-if>\n <dtml-if "section_category">category, catalog as section, </dtml-if>\n
<dtml-if "delivery_mirror_section_title">delivery AS mirror_section_delivery, catalog AS mirror_section_catalog,</dtml-if>\n <dtml-if "delivery_mirror_section_title">delivery AS mirror_section_delivery, catalog AS mirror_section_catalog,</dtml-if>\n
<dtml-if "delivery_own_section_title">delivery AS own_section_delivery, catalog AS own_section_catalog,</dtml-if>\n
catalog,\n catalog,\n
delivery\n delivery\n
\n \n
...@@ -608,6 +619,11 @@ UNION\n ...@@ -608,6 +619,11 @@ UNION\n
AND mirror_section_delivery.uid = catalog.uid\n AND mirror_section_delivery.uid = catalog.uid\n
AND <dtml-sqltest delivery_mirror_section_title type=string op=like column=mirror_section_catalog.title>\n AND <dtml-sqltest delivery_mirror_section_title type=string op=like column=mirror_section_catalog.title>\n
</dtml-if>\n </dtml-if>\n
<dtml-if "delivery_own_section_title">\n
AND own_section_catalog.uid = own_section_delivery.destination_section_uid\n
AND own_section_delivery.uid = catalog.uid\n
AND <dtml-sqltest delivery_own_section_title type=string op=like column=own_section_catalog.title>\n
</dtml-if>\n
\n \n
<dtml-if from_date>\n <dtml-if from_date>\n
AND delivery.stop_date >= <dtml-sqlvar from_date type="datetime">\n AND delivery.stop_date >= <dtml-sqlvar from_date type="datetime">\n
......
<?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>if brain is not None:\n
transaction = brain.getObject()\n
else:\n
transaction = context\n
\n
if transaction.AccountingTransaction_isSourceView():\n
own_section = transaction.getSourceSectionValue()\n
else:\n
own_section = transaction.getDestinationSectionValue()\n
\n
if own_section is not None:\n
return own_section.getTitle()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransaction_getOwnSectionTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2011-12-16 arnaud.fontaine
* Display "Own Section" along "Third Party" in AccountingTransactionModule_viewAccountingTransactionList.
2011-12-12 arnaud.fontaine 2011-12-12 arnaud.fontaine
* Display thousand separator of currency fields according to 'Money Quantity Style' user preference. * Display thousand separator of currency fields according to 'Money Quantity Style' user preference.
......
1473 1474
\ 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