Commit 11af6fc3 authored by Vincent Pelletier's avatar Vincent Pelletier

Split Baobab_getUserEmissionLetterList into Baobab_getUserEmissionLetterList...

Split Baobab_getUserEmissionLetterList into Baobab_getUserEmissionLetterList and Baobab_getEmissionLetterList, the new script allowing to list Emission Letters for a given list of sites.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e561c345
<?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>
<none/>
</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>emission_letter_dict = {}\n
\n
for a in site_list:\n
if not a.startswith(\'site\'):\n
a = \'site/\' + a\n
site_codification = context.portal_categories.getCategoryValue(a).getCodification()\n
if site_codification not in (\'\', None):\n
emission_letter_dict[site_codification[0].lower()] = 1\n
\n
return emission_letter_dict.keys()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>site_list</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>site_list</string>
<string>emission_letter_dict</string>
<string>_getiter_</string>
<string>a</string>
<string>_getattr_</string>
<string>context</string>
<string>site_codification</string>
<string>None</string>
<string>_write_</string>
<string>_getitem_</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>Baobab_getEmissionLetterList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -68,9 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
# XXX must use a cache for this method\n
<value> <string># XXX must use a cache for this method\n
\n
emission_letter_dict = {}\n
user_site_list = []\n
......@@ -82,19 +80,8 @@ if site == None :\n
else :\n
user_site_list.append(site)\n
\n
if len(user_site_list) > 0:\n
for a in user_site_list:\n
if not a.startswith(\'site\'):\n
a = \'site/\' + a\n
#context.log("a", a)\n
site_codification = context.portal_categories.getCategoryValue(a).getCodification()\n
if site_codification not in (\'\', None):\n
emission_letter_dict[site_codification[0].lower()] = 1\n
\n
return emission_letter_dict.keys()\n
]]></string> </value>
return context.Baobab_getEmissionLetterList(site_list=user_site_list)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -149,12 +136,6 @@ return emission_letter_dict.keys()\n
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>len</string>
<string>_getiter_</string>
<string>a</string>
<string>site_codification</string>
<string>_write_</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
......
137
\ No newline at end of file
139
\ 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