Commit 26e713bb authored by Jérome Perrin's avatar Jérome Perrin

Optimisation to set delivery_mirror_section_url on the brain was not working...

Optimisation to set delivery_mirror_section_url on the brain was not working on virtual hosting environment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20152 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5411b77
No related merge requests found
......@@ -360,6 +360,12 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......@@ -636,11 +642,6 @@ destination_section_where_expression</string> </value>
SELECT COUNT(DISTINCT uid) AS count FROM (\n
<dtml-else>\n
SELECT main.*,\n
<dtml-let portal="portal_url.getPortalObject()"\n
substring_position="len(\'/\'.join(portal.getPhysicalPath()))+1"\n
portal_absolute_url="portal.absolute_url(relative=1)">\n
( SELECT CONCAT(<dtml-sqlvar portal_absolute_url type=string>, SUBSTRING(path, <dtml-var substring_position>)) FROM catalog as mirror_catalog WHERE mirror_catalog.uid=main.delivery_mirror_section_uid ) AS delivery_mirror_section_url,\n
</dtml-let>\n
( SELECT title FROM catalog as mirror_catalog WHERE mirror_catalog.uid=main.delivery_mirror_section_uid ) AS delivery_mirror_section_title,\n
( SELECT IFNULL(SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = main.uid AND stock.section_uid=main.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 = main.uid AND stock.section_uid=main.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
......@@ -1300,11 +1301,6 @@ UNION\n
SELECT COUNT(DISTINCT uid) AS count FROM (\n
<dtml-else>\n
SELECT main.*,\n
<dtml-let portal="portal_url.getPortalObject()"\n
substring_position="len(\'/\'.join(portal.getPhysicalPath()))+1"\n
portal_absolute_url="portal.absolute_url(relative=1)">\n
( SELECT CONCAT(<dtml-sqlvar portal_absolute_url type=string>, SUBSTRING(path, <dtml-var substring_position>)) FROM catalog as mirror_catalog WHERE mirror_catalog.uid=main.delivery_mirror_section_uid ) AS delivery_mirror_section_url,\n
</dtml-let>\n
( SELECT title FROM catalog as mirror_catalog WHERE mirror_catalog.uid=main.delivery_mirror_section_uid ) AS delivery_mirror_section_title,\n
( SELECT IFNULL(SUM(stock.total_price), 0) FROM stock, catalog AS child WHERE child.uid = stock.uid AND child.parent_uid = main.uid AND stock.section_uid=main.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 = main.uid AND stock.section_uid=main.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
......
......@@ -68,11 +68,6 @@
<value> <string># XXX bad name: AccountingTransaction_getMirrorSectionUrl sounds more consistent\n
view_name = \'Entity_viewAccountingTransactionList?reset:int=1\'\n
\n
try:\n
return \'/%s/%s\' % (context.delivery_mirror_section_url, view_name)\n
except AttributeError:\n
pass\n
\n
if brain is not None:\n
transaction = brain.getObject()\n
else:\n
......@@ -132,11 +127,10 @@ if mirror_section is not None:\n
<string>selection_name</string>
<string>kwd</string>
<string>view_name</string>
<string>_getattr_</string>
<string>context</string>
<string>AttributeError</string>
<string>None</string>
<string>_getattr_</string>
<string>transaction</string>
<string>context</string>
<string>mirror_section</string>
</tuple>
</value>
......
657
\ No newline at end of file
658
\ 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