Commit 6c5e07ef authored by Aurel's avatar Aurel

retrieve the site category from the vault before trying to get the country

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27052 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 782bf8d3
...@@ -33,6 +33,25 @@ ...@@ -33,6 +33,25 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item> <item>
<key> <string>_roles</string> </key> <key> <string>_roles</string> </key>
<value> <value>
...@@ -132,4 +151,44 @@ ...@@ -132,4 +151,44 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -181,7 +181,7 @@ def split_head(CD_file_line_list):\n ...@@ -181,7 +181,7 @@ def split_head(CD_file_line_list):\n
head_start_date_string = CD_file_line_list[7][35:43]\n head_start_date_string = CD_file_line_list[7][35:43]\n
head_resource_string = CD_file_line_list[11][32:56]\n head_resource_string = CD_file_line_list[11][32:56]\n
head_emission_letter = CD_file_line_list[14][25:26]\n head_emission_letter = CD_file_line_list[14][25:26]\n
\n \n
# find letter in the emission_letter category\n # find letter in the emission_letter category\n
default_emissionLetter_list = [x[1] for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]\n default_emissionLetter_list = [x[1] for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]\n
head_emission_letter = string.lower(head_emission_letter)\n head_emission_letter = string.lower(head_emission_letter)\n
......
...@@ -122,7 +122,8 @@ elif "principale" not in vault: \n ...@@ -122,7 +122,8 @@ elif "principale" not in vault: \n
if site in (None, ""):\n if site in (None, ""):\n
msg = Message(domain="ui", message="You must select a foreign agency.")\n msg = Message(domain="ui", message="You must select a foreign agency.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
source_country = transaction.Baobab_getCountryForSite(transaction.getSource())\n source_country_site = transaction.Baobab_getVaultSite(vault)\n
source_country = transaction.Baobab_getCountryForSite(source_country_site)\n
site_country = transaction.Baobab_getCountryForSite(site)\n site_country = transaction.Baobab_getCountryForSite(site)\n
if \'encaisse_des_externes\' in vault and \\\n if \'encaisse_des_externes\' in vault and \\\n
site_country == source_country:\n site_country == source_country:\n
...@@ -210,6 +211,7 @@ elif resource <> 0 :\n ...@@ -210,6 +211,7 @@ elif resource <> 0 :\n
<string>_getiter_</string> <string>_getiter_</string>
<string>line</string> <string>line</string>
<string>site</string> <string>site</string>
<string>source_country_site</string>
<string>source_country</string> <string>source_country</string>
<string>site_country</string> <string>site_country</string>
<string>amount</string> <string>amount</string>
......
656 657
\ 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