Commit c72ca382 authored by Ivan Tyagov's avatar Ivan Tyagov

Fix a cache related bug. (All <Portal_Type>_getResourceItemList method shared...

Fix a cache related bug. (All <Portal_Type>_getResourceItemList method shared the same cache id. Use script id instead.)
Do no any longer call a statis script. Instead In Field library generate dynamicaly the respective getResourceItemList method id.
This prevented all CRM portal types based forms from getting the the same resource lists due to both cache and bad field library misconfiguration.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16477 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bbf1b827
......@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n
\n
getResourceItemList = CachingMethod(getResourceItemList, \n
id=(\'Event_getResourceItemList\', context.Localizer.get_selected_language()), \n
id=(script.id, context.Localizer.get_selected_language()), \n
cache_factory=\'erp5_ui_long\')\n
\n
return getResourceItemList()\n
......@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string>
<string>getResourceItemList</string>
<string>_getattr_</string>
<string>script</string>
<string>context</string>
</tuple>
</value>
......
......@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n
\n
getResourceItemList = CachingMethod(getResourceItemList, \n
id=(\'Event_getResourceItemList\', context.Localizer.get_selected_language()), \n
id=(script.id, context.Localizer.get_selected_language()), \n
cache_factory=\'erp5_ui_long\')\n
\n
return getResourceItemList()\n
......@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string>
<string>getResourceItemList</string>
<string>_getattr_</string>
<string>script</string>
<string>context</string>
</tuple>
</value>
......
......@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n
\n
getResourceItemList = CachingMethod(getResourceItemList, \n
id=(\'Event_getResourceItemList\', context.Localizer.get_selected_language()), \n
id=(script.id, context.Localizer.get_selected_language()), \n
cache_factory=\'erp5_ui_long\')\n
\n
return getResourceItemList()\n
......@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string>
<string>getResourceItemList</string>
<string>_getattr_</string>
<string>script</string>
<string>context</string>
</tuple>
</value>
......
......@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n
\n
getResourceItemList = CachingMethod(getResourceItemList, \n
id=(\'Event_getResourceItemList\', context.Localizer.get_selected_language()), \n
id=(script.id, context.Localizer.get_selected_language()), \n
cache_factory=\'erp5_ui_long\')\n
\n
return getResourceItemList()\n
......@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string>
<string>getResourceItemList</string>
<string>_getattr_</string>
<string>script</string>
<string>context</string>
</tuple>
</value>
......
......@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n
\n
getResourceItemList = CachingMethod(getResourceItemList, \n
id=(\'Event_getResourceItemList\', context.Localizer.get_selected_language()), \n
id=(script.id, context.Localizer.get_selected_language()), \n
cache_factory=\'erp5_ui_long\')\n
\n
return getResourceItemList()\n
......@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string>
<string>getResourceItemList</string>
<string>_getattr_</string>
<string>script</string>
<string>context</string>
</tuple>
</value>
......
......@@ -68,7 +68,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
......@@ -78,7 +78,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
......@@ -99,7 +99,7 @@
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<key> <string>items</string> </key>
<value>
<list>
<tuple>
......@@ -118,7 +118,7 @@
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string>Ticket Type</string> </value>
</item>
</dictionary>
......@@ -141,7 +141,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Campaign_getResourceItemList</string> </value>
<value> <string>python: getattr(here, \'%s_getResourceItemList\' %here.getPortalType().replace(\' \',\'\'))()</string> </value>
</item>
</dictionary>
</pickle>
......
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