Commit 9442812b authored by Sebastien Robin's avatar Sebastien Robin

cleanup of many listboxes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14498 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c67da87
......@@ -315,7 +315,32 @@
<item>
<key> <string>all_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>destination_payment_internal_bank_account_number</string>
<string>Account Number</string>
</tuple>
<tuple>
<string>destination_payment_title</string>
<string>Holder</string>
</tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Amount</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
......@@ -341,7 +366,7 @@
<string>Date</string>
</tuple>
<tuple>
<string>destination_payment_reference</string>
<string>destination_payment_internal_bank_account_number</string>
<string>Account Number</string>
</tuple>
<tuple>
......@@ -361,9 +386,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -400,7 +423,12 @@
<item>
<key> <string>editable_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>start_date</string>
<string>start_date</string>
</tuple>
</list>
</value>
</item>
<item>
......@@ -432,7 +460,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -489,7 +517,7 @@
<value>
<list>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
</list>
......@@ -541,22 +569,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -316,16 +316,12 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
......@@ -333,7 +329,7 @@
<string>Counter</string>
</tuple>
<tuple>
<string>destination_payment_reference</string>
<string>destination_payment_internal_bank_account_number</string>
<string>Account Number</string>
</tuple>
<tuple>
......@@ -344,6 +340,10 @@
<string>aggregate_free_text</string>
<string>Check Number</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Total</string>
......@@ -382,7 +382,7 @@
<string>Counter</string>
</tuple>
<tuple>
<string>destination_payment_reference</string>
<string>destination_payment_internal_bank_account_number</string>
<string>Account Number</string>
</tuple>
<tuple>
......@@ -410,9 +410,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -507,7 +505,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -621,23 +619,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>portal_catalog</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>portal_catalog</string> </value>
<value> <string>searchFolder</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -316,21 +316,17 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>source_logical_path</string>
<string>Source Vault</string>
<string>Counter</string>
</tuple>
<tuple>
<string>description</string>
......
......@@ -316,16 +316,12 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
......@@ -336,10 +332,6 @@
<string>destination_logical_path</string>
<string>Destination Vault</string>
</tuple>
<tuple>
<string>resource_reference</string>
<string>Currency</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
......@@ -394,9 +386,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -479,7 +469,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -583,22 +573,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -316,16 +316,12 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
......@@ -336,10 +332,6 @@
<string>destination_logical_path</string>
<string>Destination Vault</string>
</tuple>
<tuple>
<string>resource_reference</string>
<string>Currency</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
......@@ -394,9 +386,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -479,7 +469,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -583,22 +573,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -316,16 +316,12 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
......@@ -336,10 +332,6 @@
<string>destination_logical_path</string>
<string>Destination Vault</string>
</tuple>
<tuple>
<string>resource_reference</string>
<string>Currency</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
......@@ -394,9 +386,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -479,7 +469,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -583,22 +573,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -308,16 +308,12 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>Id</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
......
......@@ -316,21 +316,17 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>source_logical_path</string>
<string>Source Vault</string>
<string>Counter</string>
</tuple>
<tuple>
<string>description</string>
......
......@@ -316,21 +316,17 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>source_logical_path</string>
<string>Source Vault</string>
<string>Counter</string>
</tuple>
<tuple>
<string>description</string>
......
......@@ -316,21 +316,17 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>source_logical_path</string>
<string>Source Vault</string>
<string>Counter</string>
</tuple>
<tuple>
<string>description</string>
......
......@@ -129,22 +129,22 @@ def assertReferenceMatchListEmpty(match_list):\n
matched_reference_list.append(match.getReference())\n
raise ValidationFailed, \'The following references are already allocated : %s\' % (matched_reference_list, )\n
\n
def checkReferenceListUniqueness(reference_list, model):\n
def checkReferenceListUniqueness(reference_list, model, destination_payment):\n
"""\n
Check each given reference not to already exist.\n
"""\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list)\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment.getUid())\n
assertReferenceMatchListEmpty(match_list)\n
for reference in reference_list:\n
if portal_activities.countMessageWithTag(\'check_%s_%s\' % (model, reference)) != 0:\n
raise ValidationFailed, \'This reference is alredy scheduled for indexing, and so is already allocated : %s\' % (reference, )\n
\n
portal_activities = context.getPortalObject().portal_activities\n
def checkReferenceUniqueness(reference, model):\n
def checkReferenceUniqueness(reference, model, destination_payment):\n
"""\n
Check the given reference not to already exist.\n
"""\n
checkReferenceListUniqueness([reference, ], model)\n
checkReferenceListUniqueness([reference, ], model, destination_payment)\n
\n
# Check getBaobabSource and getBaobabDestination\n
transaction.Base_checkBaobabSourceAndDestination()\n
......@@ -207,7 +207,7 @@ for line in line_list:\n
destination_section = item.getDestinationSection()\n
item.setStartDate(start_date)\n
reference_list = range(reference_to_int(reference_range_min), last_reference_value + 1)\n
checkReferenceListUniqueness(reference_list, model)\n
checkReferenceListUniqueness(reference_list, model, item.getDestinationPaymentValue())\n
for j in reference_list:\n
reference = int_to_reference(j, reference_range_min)\n
check = item.newContent(portal_type=\'Check\', title=str(reference), activate_kw={\'tag\': \'check_%s_%s\' % (model, reference)})\n
......@@ -215,7 +215,7 @@ for line in line_list:\n
check.setStartDate(start_date)\n
check.setReference(reference)\n
else:\n
checkReferenceUniqueness(reference_range_min, model)\n
checkReferenceUniqueness(reference_range_min, model, line.getDestinationPaymentValue())\n
item.setReference(reference_range_min)\n
item.setTitle(reference_range_min)\n
if len(resource.objectValues()) > 0:\n
......
195
\ No newline at end of file
199
\ 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