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

Fix bug for setting groupping reference.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5091 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d73fdfa
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </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>line = brain.getObject()\n
return "%s/view" % line.getParent().absolute_url()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/erp5_accounting/AccountingTransactionLine_getParentUrl</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain, selection</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>brain</string>
<string>selection</string>
<string>_getattr_</string>
<string>line</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>AccountingTransactionLine_getParentUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -110,7 +110,10 @@ for l in result:\n
source_balance=l.source_balance,\n
source_credit=l.source_credit,\n
source_debit=l.source_debit,\n
transaction_line_path = l.transaction_line_path )\n
date=l.date,\n
parent_reference=l.parent_reference,\n
parent_source_reference=l.parent_source_reference,\n
portal_type=l.portal_type )\n
new_result.append(c)\n
\n
return new_result\n
......
......@@ -66,9 +66,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>account = context.restrictedTraverse(brain.transaction_line_path).getSourceValue()\n
<value> <string>account = brain.getObject().getSourceValue()\n
if account is not None:\n
return account.getGapId()\n
return account.Account_getGapId()\n
</string> </value>
</item>
<item>
......@@ -112,7 +112,6 @@ if account is not None:\n
<string>brain</string>
<string>selection</string>
<string>_getattr_</string>
<string>context</string>
<string>account</string>
<string>None</string>
</tuple>
......
......@@ -345,7 +345,7 @@
<value>
<list>
<tuple>
<string>title</string>
<string>parent_title</string>
<string>Title</string>
</tuple>
<tuple>
......@@ -353,7 +353,7 @@
<string>Section</string>
</tuple>
<tuple>
<string>start_date</string>
<string>date</string>
<string>Date</string>
</tuple>
<tuple>
......@@ -365,11 +365,11 @@
<string>GAP</string>
</tuple>
<tuple>
<string>reference</string>
<string>parent_reference</string>
<string>Invoice Number</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>parent_source_reference</string>
<string>Source Reference</string>
</tuple>
<tuple>
......@@ -616,7 +616,60 @@
<item>
<key> <string>url_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>parent_title</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>default_source_section_title</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>date</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>Entity_getAccountingTransactionSourceGapId</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>parent_reference</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>parent_source_reference</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>source_debit</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>source_credit</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>grouping_reference</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>source_balance</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
<tuple>
<string>net_balance</string>
<string>AccountingTransactionLine_getParentUrl</string>
</tuple>
</list>
</value>
</item>
<item>
......
......@@ -250,10 +250,13 @@ SELECT\n
<dtml-if stat>\n
IFNULL(SUM(stock.quantity), 0.00) AS quantity\n
<dtml-else>\n
DISTINCT catalog.uid AS uid\n
, catalog.path AS path\n
, child.path AS transaction_line_path\n
DISTINCT child.uid AS uid\n
, child.path AS path\n
, stock.node_uid AS account_uid\n
, stock.date AS date\n
, catalog.reference AS parent_reference\n
, catalog.source_reference AS parent_source_reference -- FIXME\n
, catalog.portal_type AS portal_type\n
, IFNULL(SUM(IF(stock.quantity > 0, stock.quantity, 0)), 0.00) AS source_debit\n
, IFNULL(SUM(IF(stock.quantity < 0, - stock.quantity, 0)), 0.00) AS source_credit\n
, IFNULL(SUM(stock.quantity), 0.00) AS source_balance\n
......@@ -306,13 +309,13 @@ WHERE stock.mirror_section_uid = <dtml-var getUid>\n
)\n
</dtml-if>\n
<dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n
AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n
AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n
<dtml-if omit_input>\n
AND stock.quantity > 0\n
......@@ -341,7 +344,7 @@ AND <dtml-var query>\n
<dtml-unless stat>\n
GROUP BY catalog.uid, stock.node_uid\n
</dtml-unless>\n
ORDER BY movement.stop_date, child.uid\n
ORDER BY stock.date, child.uid\n
</dtml-if>\n
......@@ -386,10 +389,13 @@ SELECT\n
<dtml-if stat>\n
IFNULL(SUM(stock.quantity), 0.00) AS quantity\n
<dtml-else>\n
DISTINCT catalog.uid AS uid\n
, catalog.path AS path\n
, child.path AS transaction_line_path\n
DISTINCT child.uid AS uid\n
, child.path AS path\n
, stock.node_uid AS account_uid\n
, stock.date AS date\n
, catalog.reference AS parent_reference\n
, catalog.source_reference AS parent_source_reference -- FIXME\n
, catalog.portal_type AS portal_type\n
, IFNULL(SUM(IF(stock.quantity > 0, stock.quantity, 0)), 0.00) AS source_debit\n
, IFNULL(SUM(IF(stock.quantity < 0, - stock.quantity, 0)), 0.00) AS source_credit\n
, IFNULL(SUM(stock.quantity), 0.00) AS source_balance\n
......@@ -442,13 +448,13 @@ WHERE stock.mirror_section_uid = <dtml-var getUid>\n
)\n
</dtml-if>\n
<dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n
AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n
AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n
<dtml-if omit_input>\n
AND stock.quantity > 0\n
......@@ -477,7 +483,7 @@ AND <dtml-var query>\n
<dtml-unless stat>\n
GROUP BY catalog.uid, stock.node_uid\n
</dtml-unless>\n
ORDER BY movement.stop_date, child.uid\n
ORDER BY stock.date, child.uid\n
</dtml-if>\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