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 ...@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n return result\n
\n \n
getResourceItemList = CachingMethod(getResourceItemList, \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 cache_factory=\'erp5_ui_long\')\n
\n \n
return getResourceItemList()\n return getResourceItemList()\n
...@@ -135,6 +135,7 @@ return getResourceItemList()\n ...@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string> <string>CachingMethod</string>
<string>getResourceItemList</string> <string>getResourceItemList</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>script</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -85,7 +85,7 @@ def getResourceItemList():\n ...@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n return result\n
\n \n
getResourceItemList = CachingMethod(getResourceItemList, \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 cache_factory=\'erp5_ui_long\')\n
\n \n
return getResourceItemList()\n return getResourceItemList()\n
...@@ -135,6 +135,7 @@ return getResourceItemList()\n ...@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string> <string>CachingMethod</string>
<string>getResourceItemList</string> <string>getResourceItemList</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>script</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -85,7 +85,7 @@ def getResourceItemList():\n ...@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n return result\n
\n \n
getResourceItemList = CachingMethod(getResourceItemList, \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 cache_factory=\'erp5_ui_long\')\n
\n \n
return getResourceItemList()\n return getResourceItemList()\n
...@@ -135,6 +135,7 @@ return getResourceItemList()\n ...@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string> <string>CachingMethod</string>
<string>getResourceItemList</string> <string>getResourceItemList</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>script</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -85,7 +85,7 @@ def getResourceItemList():\n ...@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n return result\n
\n \n
getResourceItemList = CachingMethod(getResourceItemList, \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 cache_factory=\'erp5_ui_long\')\n
\n \n
return getResourceItemList()\n return getResourceItemList()\n
...@@ -135,6 +135,7 @@ return getResourceItemList()\n ...@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string> <string>CachingMethod</string>
<string>getResourceItemList</string> <string>getResourceItemList</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>script</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -85,7 +85,7 @@ def getResourceItemList():\n ...@@ -85,7 +85,7 @@ def getResourceItemList():\n
return result\n return result\n
\n \n
getResourceItemList = CachingMethod(getResourceItemList, \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 cache_factory=\'erp5_ui_long\')\n
\n \n
return getResourceItemList()\n return getResourceItemList()\n
...@@ -135,6 +135,7 @@ return getResourceItemList()\n ...@@ -135,6 +135,7 @@ return getResourceItemList()\n
<string>CachingMethod</string> <string>CachingMethod</string>
<string>getResourceItemList</string> <string>getResourceItemList</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>script</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </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