Commit 550948c5 authored by Aurel's avatar Aurel

some forms improvement

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20708 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e08f4519
......@@ -131,7 +131,8 @@ for check_reference in reference_list:\n
raise ValidationFailed, (msg,)\n
result = context.portal_catalog(portal_type = \'Check\', reference = check_reference, \n
destination_payment_uid = bank_account.getUid(),\n
default_resource_relative_url = resource)\n
default_resource_relative_url = resource,\n
simulation_state=\'!=deleted\')\n
result_len = len(result)\n
if result_len == 0:\n
if not context.Base_isAutomaticCheckCreationAllowed():\n
......
......@@ -290,7 +290,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_categories.accounting_code.getCategoryChildTitleItemList(base=1,display_none_category=1)</string> </value>
<value> <string>python: here.portal_categories.accounting_code.getCategoryChildTitleItemList(base=1,display_none_category=1,sort_id=\'title\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site/surface/caisse_courante\',\'site/surface/banque_interne/guichet\',\'site/surface/operations_diverses/guichet\'),leaf_node=0,first_level=1,current_url=here.getSource())</string> </value>
<value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site/surface/caisse_courante\',),leaf_node=0,first_level=1,current_url=here.getSource())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -146,9 +146,10 @@ def checkReferenceListUniqueness(reference_list, model, destination_payment_uid)
Check each given reference not to already exist.\n
"""\n
if destination_payment_uid is None:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, resource_relative_url=model)\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, resource_relative_url=model, simulation_state=\'!=deleted\')\n
else:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, resource_relative_url=model)\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, resource_relative_url=model,\n
simulation_state=\'!=deleted\')\n
assertReferenceMatchListEmpty(match_list, destination_payment_uid)\n
for reference in reference_list:\n
tag = \'check_%s_%s_%s\' % (model, destination_payment_uid, reference)\n
......@@ -204,7 +205,7 @@ if resource.getAccountNumberEnabled():\n
destination_payment_value = line.getDestinationPaymentValue()\n
# Not required any more to serialize the bank account\n
#destination_payment_value.serialize()\n
# context.log(\'context.getRelativeUrl() before getUid of destination payment\', context.getRelativeUrl())\n
context.log(\'context.getRelativeUrl() before getUid of destination payment\', context.getRelativeUrl())\n
if destination_payment_value is None:\n
message = Message(domain=\'ui\', message=\'There is not destination payment on line with id: $id\', mapping={\'id\': context.getId()})\n
raise ValueError, (message,)\n
......@@ -218,6 +219,7 @@ aggregate_list = []\n
for i in xrange(quantity):\n
if create == 1:\n
item = module.newContent(activate_kw={\'tag\': tag, \'priority\':4})\n
context.log(\'New Item created with Id\', item.getId())\n
item.setDestination(destination)\n
if destination_payment_value is not None:\n
item.setDestinationPaymentValue(destination_payment_value)\n
......@@ -242,6 +244,7 @@ for i in xrange(quantity):\n
#tag = \'check_%s_%s_%s\' % (model, destination_payment_uid, j)\n
#encountered_check_identifiers_dict[tag] = None\n
check = item.newContent(portal_type=\'Check\', title=j, activate_kw={\'tag\': tag, \'priority\':4})\n
context.log(\'New Sub Item created with Id\', check.getId())\n
check.setDestination(destination_section)\n
check.setStartDate(start_date)\n
check.setReference(j)\n
......
......@@ -3,12 +3,22 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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>
......@@ -28,7 +38,24 @@
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
<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>
......@@ -37,96 +64,82 @@
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
<key> <string>_body</string> </key>
<value> <string>return None\n
</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_doSelect</string> </value>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<key> <string>errors</string> </key>
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>co_varnames</string> </key>
<value>
<list>
<string>listbox_start_date</string>
</list>
<tuple>
<string>args</string>
<string>kw</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CkeckbookReceptionModule_viewCheckbookReceptionList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>CheckbookReceptionModule_viewCheckbookReceptionList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Checkbook Receptions</string> </value>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
<key> <string>id</string> </key>
<value> <string>StopPayment_getBaobabSource</string> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
......
396
\ No newline at end of file
397
\ 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