Commit 935df1df authored by Sebastien Robin's avatar Sebastien Robin

many small bug fixes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11438 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26e85c66
......@@ -62,6 +62,10 @@
<key> <string>id</string> </key>
<value> <string>cash_status</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
......
......@@ -90,7 +90,7 @@ if resource is None :\n
\n
# Next, check the balance of the account\n
# We must specify the resource !\n
account_balance = resource.getFutureInventory(payment=payment, resource=resource.getRelativeUrl(),src__=src__)\n
account_balance = resource.getAvailableInventory(payment=payment, resource=resource.getRelativeUrl(),src__=src__)\n
if src__ :\n
return account_balance \n
\n
......
<?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>d = {}\n
d[\'A\'] = d[\'J\'] = \'1\'\n
d[\'B\'] = d[\'K\'] = d[\'S\'] = \'2\'\n
d[\'C\'] = d[\'L\'] = d[\'T\'] = \'3\'\n
d[\'D\'] = d[\'M\'] = d[\'U\'] = \'4\'\n
d[\'E\'] = d[\'N\'] = d[\'V\'] = \'5\'\n
d[\'F\'] = d[\'O\'] = d[\'W\'] = \'6\'\n
d[\'G\'] = d[\'P\'] = d[\'X\'] = \'7\'\n
d[\'H\'] = d[\'Q\'] = d[\'Y\'] = \'8\'\n
d[\'I\'] = d[\'R\'] = d[\'Z\'] = \'9\'\n
\n
old_rib = account_nb[-2:]\n
\n
new_account_nb = ""\n
for nb in list(account_nb)[:-2]:\n
if d.has_key(nb):\n
new_account_nb += d[nb]\n
else:\n
new_account_nb += nb\n
\n
new_account_nb += "00"\n
new_account_nb = long(new_account_nb)\n
rib = 97 - new_account_nb % 97\n
\n
return (str(rib) == str(old_rib))\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>account_nb</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>account_nb</string>
<string>d</string>
<string>_write_</string>
<string>_getitem_</string>
<string>old_rib</string>
<string>new_account_nb</string>
<string>_getiter_</string>
<string>list</string>
<string>nb</string>
<string>_getattr_</string>
<string>long</string>
<string>rib</string>
<string>str</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>BankAccount_checkRIBKey</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -91,12 +91,7 @@ if site is None:\n
#context.log(\'Baobab_checkCounterDateOpen\', \'get site for vault %s\' %(site))\n
site = context.Baobab_getVaultSite(site)\n
\n
kw = {"portal_type" : \'Counter Date\', "start_date" : str(date), "site_id" : site.getId(), "simulation_state" : "open"}\n
#context.log(\'Baobab_checkCounterDateOpen\', \'kw = %s\' %(kw,))\n
counter_date_list = [x.getObject() for x in context.portal_catalog(**kw)]\n
#context.log(\'Baobab_checkCounterDateOpen\', \'counter_date_list = %s, requete = %s\' %(counter_date_list, context.portal_catalog(src__=1, **kw)))\n
\n
if len(counter_date_list) == 0:\n
if context.portal_catalog.countResults(portal_type=\'Counter Date\', start_date=str(date), site_id=site.getId(), simulation_state="open")[0][0] == 0:\n
return 0\n
else:\n
return 1\n
......@@ -172,13 +167,6 @@ else:\n
<string>len</string>
<string>_getitem_</string>
<string>str</string>
<string>kw</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_apply_</string>
<string>x</string>
<string>counter_date_list</string>
</tuple>
</value>
</item>
......
......@@ -80,10 +80,11 @@ for object in object_to_check_list:\n
\n
for node_url in (baobab_source,baobab_destination):\n
if node_url is not None:\n
context.log(\'node_url\', node_url)\n
#context.log(\'node_url\', node_url)\n
try:\n
node = context.portal_categories.restrictedTraverse(node_url)\n
except KeyError:\n
context.log(\'Error on \', (context.getRelativeUrl(),node_url))\n
msg = Message(domain=\'ui\',message=\'Sorry, wrong source or destination\')\n
raise ValidationFailed, (msg,)\n
</string> </value>
......
<?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>def sort_title(a,b):\n
return cmp(a[0],b[0])\n
\n
begin = []\n
if keep_first:\n
begin.append(my_list[0])\n
my_list = my_list[1:]\n
my_list.sort(sort_title)\n
return begin + my_list\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>my_list,keep_first=0,**kw</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>my_list</string>
<string>keep_first</string>
<string>kw</string>
<string>sort_title</string>
<string>begin</string>
<string>_getattr_</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_sortItemList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -307,6 +307,7 @@ if listbox is None:\n
\n
\n
else :\n
\n
# we want to update the listbox\n
cash_status_list = kw[\'cash_status_list\']\n
emission_letter_list = kw[\'emission_letter_list\']\n
......
<?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>def getResourceVariationCategory():\n
pass\n
\n
if variation != \'variation/not_defined\' and variation.lstrip(\'variation/\') not in resource_object.getVariationList():\n
variation_not_defined = 1\n
break\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>resource_object, variation, emission_letter</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple>
<string>\'break\' outside loop (/baobab/portal_skins/erp5_banking_core/CashDetail_checkResourceCategoryList, 6)</string>
</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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CashDetail_checkResourceCategoryList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -81,8 +81,8 @@
<value>
<list>
<string>my_translated_title</string>
<string>my_variation_list</string>
<string>my_base_price</string>
<string>my_variation_list</string>
</list>
</value>
</item>
......@@ -91,6 +91,7 @@
<value>
<list>
<string>my_price_currency</string>
<string>my_emission_letter_list</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>MultiCheckBoxField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_emission_letter_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>unknown_selection</string> </key>
<value> <string>You selected an item that was not in the list.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>orientation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>orientation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>orientation</string> </key>
<value> <string>vertical</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Emission Letters</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_categories.emission_letter.getCategoryChildTitleOrIdItemList()[1:]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -73,17 +73,7 @@
site = context.Baobab_getVaultSite(vault=context.getSiteValue())\n
counter_list = [x.getObject() for x in context.portal_catalog(portal_type="Counter", site_uid = site.getUid())]\n
\n
object_list = []\n
i = 0\n
for counter in counter_list:\n
line = newTempBase(context, \'tmp_open_%s\' %(str(i)))\n
line.edit(name=counter.getTitle(),\n
path = counter.getPath())\n
line.setUid(\'new_%s\' % counter.getPath())\n
object_list.append(line)\n
i += 1 \n
\n
return object_list\n
return counter_list\n
</string> </value>
</item>
<item>
......@@ -143,11 +133,6 @@ return object_list\n
<string>_getiter_</string>
<string>x</string>
<string>counter_list</string>
<string>object_list</string>
<string>i</string>
<string>counter</string>
<string>str</string>
<string>line</string>
</tuple>
</value>
</item>
......
......@@ -99,6 +99,7 @@
<value>
<list>
<string>listbox_choice</string>
<string>listbox_site</string>
</list>
</value>
</item>
......
......@@ -338,12 +338,12 @@
<value>
<list>
<tuple>
<string>name</string>
<string>title</string>
<string>Name</string>
</tuple>
<tuple>
<string>path</string>
<string>Path</string>
<string>site</string>
<string>Site</string>
</tuple>
<tuple>
<string>choice</string>
......@@ -506,11 +506,11 @@
<value>
<list>
<tuple>
<string>name</string>
<string>title</string>
<string></string>
</tuple>
<tuple>
<string>path</string>
<string>site</string>
<string></string>
</tuple>
</list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_site</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Site</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Baobab_getStrippedPath(object=cell, site=1)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -89,7 +89,7 @@
if result != 0:\n
return result\n
\n
result = cmp(a.date,b.date)\n
result = cmp(getattr(a,\'date\',None),getattr(b,\'date\',None))\n
return result\n
\n
currency_cash_list.sort(sortLines)\n
......
......@@ -114,6 +114,8 @@ if kw.has_key("explanation_portal_type"):\n
inventory_kw[\'explanation_portal_type\'] = kw[\'explanation_portal_type\']\n
\n
if at_date is not None:\n
# XXX this make sure we look at the end of the day\n
at_date = at_date + 0.99\n
inventory_kw[\'at_date\'] = at_date\n
\n
\n
......@@ -219,8 +221,9 @@ for resource in resource_dict.keys():\n
except KeyError:\n
resource_in_vault = {\'quantity\' : 0,\'total_price\' : 0}\n
tmp_dict.update({\'total_quantity\' : resource_in_vault[\'quantity\'],\n
\'total_price\' : resource_in_vault[\'total_price\'],\n
\'date\':resource_in_vault[\'date\']})\n
\'total_price\' : resource_in_vault[\'total_price\'],})\n
if vault_report_type==\'history\':\n
tmp_dict.update({\'date\':resource_in_vault[\'date\']})\n
general_total_price += resource_in_vault[\'total_price\']\n
context.log(\'total_quantity\',tmp_dict[\'total_quantity\'])\n
context.log(\'total_price\',tmp_dict[\'total_price\'])\n
......
......@@ -437,6 +437,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -469,7 +473,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
<value> <string>currency_exchange_line_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......@@ -523,7 +527,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>objectValues</string> </value>
<value> <string>contentValues</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -87,6 +87,12 @@ return getCurrencyList()\n
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -161,4 +167,25 @@ return getCurrencyList()\n
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -80,6 +80,7 @@ if len(portal_type) != 2:\n
return context.getMovementList(portal_type=portal_type)\n
\n
line_list = context.objectValues(portal_type=portal_type[0])\n
#context.log(\'line_list\', line_list)\n
invert = 0\n
if len(line_list) == 0:\n
# try with the second portal type\n
......
......@@ -24,10 +24,30 @@
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>archived</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Archived (Check)</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -68,7 +68,21 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>listbox = state_change.kwargs.get(\'listbox\')\n
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
\n
listbox = state_change.kwargs.get(\'listbox\')\n
\n
# First make sure we can open a counter date only\n
# if the date defined on the document is the current date\n
counter_date = state_change[\'object\']\n
start_date = counter_date.getStartDate()\n
from DateTime import DateTime\n
now = DateTime()\n
\n
if now.Date() != start_date.Date():\n
msg = Message(domain=\'ui\',message="Sorry, the date is not today")\n
raise ValidationFailed (msg,)\n
\n
for line in listbox:\n
if line["choice"] == "open":\n
......@@ -125,11 +139,20 @@ for line in listbox:\n
<string>state_change</string>
<string>args</string>
<string>kw</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getattr_</string>
<string>listbox</string>
<string>_getitem_</string>
<string>counter_date</string>
<string>start_date</string>
<string>DateTime</string>
<string>now</string>
<string>msg</string>
<string>_getiter_</string>
<string>line</string>
<string>_getitem_</string>
<string>context</string>
<string>counter</string>
</tuple>
......
51
\ No newline at end of file
61
\ 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