Commit 669b54d5 authored by Sebastien Robin's avatar Sebastien Robin

fixed translation in Baobab_getUniqueReference

updated import cateogory script
xml format as changed a bit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11189 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca60f2bb
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -546,6 +546,9 @@ ...@@ -546,6 +546,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -533,6 +533,9 @@ ...@@ -533,6 +533,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -124,6 +124,14 @@ return domain_list\n ...@@ -124,6 +124,14 @@ return domain_list\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value> <value> <string>depth, parent, **kw</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
......
...@@ -124,6 +124,14 @@ return domain_list\n ...@@ -124,6 +124,14 @@ return domain_list\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value> <value> <string>depth, parent, **kw</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
......
...@@ -76,11 +76,14 @@ except AttributeError:\n ...@@ -76,11 +76,14 @@ except AttributeError:\n
\n \n
application_id = \'BA\'\n application_id = \'BA\'\n
\n \n
N_ = context.Base_translateString\n
\n
# if it\'s not defined, try to generate it\n # if it\'s not defined, try to generate it\n
if reference in (None, \'\') or not str(reference).startswith(application_id):\n if reference in (None, \'\') or not str(reference).startswith(application_id):\n
date = context.getStopDate()\n date = context.getStopDate()\n
if date in (None, \'\'):\n if date in (None, \'\'):\n
return \'No date defined\'\n message = N_("No date defined")\n
return message\n
year = date.strftime(\'%Y\')\n year = date.strftime(\'%Y\')\n
\n \n
# codification\n # codification\n
...@@ -171,9 +174,11 @@ return reference\n ...@@ -171,9 +174,11 @@ return reference\n
<string>reference</string> <string>reference</string>
<string>AttributeError</string> <string>AttributeError</string>
<string>application_id</string> <string>application_id</string>
<string>N_</string>
<string>None</string> <string>None</string>
<string>str</string> <string>str</string>
<string>date</string> <string>date</string>
<string>message</string>
<string>year</string> <string>year</string>
<string>source</string> <string>source</string>
<string>codification</string> <string>codification</string>
......
...@@ -260,13 +260,13 @@ for resource_id in per_resource_dict.keys():\n ...@@ -260,13 +260,13 @@ for resource_id in per_resource_dict.keys():\n
cell.setQuantity(variation_item["quantity"])\n cell.setQuantity(variation_item["quantity"])\n
\n \n
if variation_not_defined:\n if variation_not_defined:\n
old_line = [x.getObject() for x in context.Delivery_getMovementList(portal_type=[line_portal_type,])]\n old_line = [x.getObject() for x in context.objectValues(portal_type=[line_portal_type,])]\n
if len(old_line)>0:\n if len(old_line)>0:\n
for object_list in old_line:\n for object_list in old_line:\n
context.deleteContent(object_list.getId())\n context.deleteContent(object_list.getId())\n
request = context.REQUEST\n request = context.REQUEST\n
redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
, "portal_status_message=%s doesn\\\'t exist for %s" %(resource_object.getTitle(), variation)\n , "portal_status_message=%s doesn\\\'t exist for %s" %(resource_object.getTitle(), variation.lstrip(\'variation/\'))\n
)\n )\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n
else:\n else:\n
...@@ -277,7 +277,7 @@ else:\n ...@@ -277,7 +277,7 @@ else:\n
#return main_form(portal_status_message=\'Lines Created\')\n #return main_form(portal_status_message=\'Lines Created\')\n
request = context.REQUEST\n request = context.REQUEST\n
redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
, \'portal_status_message=Lines%20Created\'\n , \'portal_status_message=Lines Created\'\n
)\n )\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n
......
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<string>my_title</string> <string>my_title</string>
<string>my_destination_title</string> <string>my_destination_title</string>
<string>my_destination_payment_title</string> <string>my_destination_payment_title</string>
<string>my_price_string</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -116,7 +117,6 @@ ...@@ -116,7 +117,6 @@
<value> <value>
<list> <list>
<string>my_price</string> <string>my_price</string>
<string>my_price_string</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -449,6 +449,10 @@ ...@@ -449,6 +449,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -512,7 +516,7 @@ ...@@ -512,7 +516,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox</string> </value> <value> <string>Counter Date</string> </value>
</item> </item>
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
......
...@@ -134,14 +134,14 @@ if column_names == 1:\n ...@@ -134,14 +134,14 @@ if column_names == 1:\n
\n \n
#context.log(\'node_category\',vault)\n #context.log(\'node_category\',vault)\n
#context.log(\'inventory_kw\',inventory_kw)\n #context.log(\'inventory_kw\',inventory_kw)\n
vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node_category=vault\n vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node=vault\n
, ignore_variation=0\n , ignore_variation=0\n
,**inventory_kw\n ,**inventory_kw\n
)\n )\n
# context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node_category=vault\n #context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node=vault\n
# , ignore_variation=0,src__=1\n # , ignore_variation=0,src__=1\n
# ,**inventory_kw\n # ,**inventory_kw\n
# ))\n # ))\n
\n \n
#context.log(\'len(vault_inventory_list:\',len(vault_inventory_list))\n #context.log(\'len(vault_inventory_list:\',len(vault_inventory_list))\n
for vault_inventory in vault_inventory_list:\n for vault_inventory in vault_inventory_list:\n
...@@ -155,6 +155,7 @@ for vault_inventory in vault_inventory_list:\n ...@@ -155,6 +155,7 @@ for vault_inventory in vault_inventory_list:\n
if total_quantity is None:\n if total_quantity is None:\n
total_quantity = 0\n total_quantity = 0\n
total_price = vault_inventory.total_price\n total_price = vault_inventory.total_price\n
context.log(\'total_price from sql\',total_price)\n
if total_price is None:\n if total_price is None:\n
total_price = 0\n total_price = 0\n
if only_positive:\n if only_positive:\n
...@@ -221,8 +222,8 @@ for resource in resource_dict.keys():\n ...@@ -221,8 +222,8 @@ for resource in resource_dict.keys():\n
\'total_price\' : resource_in_vault[\'total_price\'],\n \'total_price\' : resource_in_vault[\'total_price\'],\n
\'date\':resource_in_vault[\'date\']})\n \'date\':resource_in_vault[\'date\']})\n
general_total_price += resource_in_vault[\'total_price\']\n general_total_price += resource_in_vault[\'total_price\']\n
#context.log(\'total_quantity\',tmp_dict[\'total_quantity\'])\n context.log(\'total_quantity\',tmp_dict[\'total_quantity\'])\n
#context.log(\'total_price\',tmp_dict[\'total_price\'])\n context.log(\'total_price\',tmp_dict[\'total_price\'])\n
tmp_dict[\'general_total_price\'] = general_total_price\n tmp_dict[\'general_total_price\'] = general_total_price\n
total_inventory_list.append(newTempBase(context, "new_%3i" % i, **tmp_dict))\n total_inventory_list.append(newTempBase(context, "new_%3i" % i, **tmp_dict))\n
i += 1\n i += 1\n
......
...@@ -223,7 +223,7 @@ elif import_type == \'create_subvaults\' :\n ...@@ -223,7 +223,7 @@ elif import_type == \'create_subvaults\' :\n
subvault = upperCase(e_list[1]) # ex : Encaisse des Devises\n subvault = upperCase(e_list[1]) # ex : Encaisse des Devises\n
subvault_code=None\n subvault_code=None\n
if len(e_list)==3:\n if len(e_list)==3:\n
subvault_code = upperCase(e_list[2]) # ex : D\n subvault_code = e_list[2] # ex : D\n
counter_string_list = [] # the list of counters, like [\'guichet_1,entrant\',...]\n counter_string_list = [] # the list of counters, like [\'guichet_1,entrant\',...]\n
#one_way_counter_list = (\'gros_paiement\',\'gros_versement\')\n #one_way_counter_list = (\'gros_paiement\',\'gros_versement\')\n
one_way_counter_list = ()\n one_way_counter_list = ()\n
...@@ -297,6 +297,9 @@ elif import_type == \'create_subvaults\' :\n ...@@ -297,6 +297,9 @@ elif import_type == \'create_subvaults\' :\n
#for c in context.portal_categories.site.agence.principale.lome.getCategoryChildValueList() :\n #for c in context.portal_categories.site.agence.principale.lome.getCategoryChildValueList() :\n
#for c in context.portal_categories.site.getCategoryChildValueList() :\n #for c in context.portal_categories.site.getCategoryChildValueList() :\n
#for c in context.portal_categories.site.agence.principale.cotonou.getCategoryChildValueList() :\n #for c in context.portal_categories.site.agence.principale.cotonou.getCategoryChildValueList() :\n
#for c in context.portal_categories.site.getCategoryChildValueList() :\n
#for c in context.portal_categories.site.agence.principale.abidjan.getCategoryChildValueList() :\n
#for c in context.portal_categories.site.agence.principale.bissau.getCategoryChildValueList() :\n
for c in context.portal_categories.site.getCategoryChildValueList() :\n for c in context.portal_categories.site.getCategoryChildValueList() :\n
context.log(\'c.getPath()\',c.getPath())\n context.log(\'c.getPath()\',c.getPath())\n
for vault_type in vault_type_list :\n for vault_type in vault_type_list :\n
...@@ -336,6 +339,8 @@ elif import_type == \'create_subvaults\' :\n ...@@ -336,6 +339,8 @@ elif import_type == \'create_subvaults\' :\n
subcat_vault_type = \'%s/encaisse_des_externes/transit\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n subcat_vault_type = \'%s/encaisse_des_externes/transit\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n
elif \'devises\' in subvault_path.lower():\n elif \'devises\' in subvault_path.lower():\n
subcat_vault_type = \'%s/encaisse_des_devises\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n subcat_vault_type = \'%s/encaisse_des_devises\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n
elif \'differences\' in subvault_path.lower():\n
subcat_vault_type = \'%s/encaisse_des_differences\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n
elif \'mutiles\' in subvault_path.lower():\n elif \'mutiles\' in subvault_path.lower():\n
subcat_vault_type = \'%s/billets_mutiles\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n subcat_vault_type = \'%s/billets_mutiles\' %(\'/\'.join(vault_type.split(\'/\')[1:]),)\n
elif \'macules\' in subvault_path.lower():\n elif \'macules\' in subvault_path.lower():\n
......
42 48
\ No newline at end of file \ 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