Commit ad841f01 authored by Sebastien Robin's avatar Sebastien Robin

modify the stop payment module in order to allow the user to specify wich kind...

modify the stop payment module in order to allow the user to specify wich kind of check he want to stop

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14577 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6743224
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<item>check_type</item> <item>check_type</item>
</portal_type> </portal_type>
<portal_type id="Stop Payment"> <portal_type id="Stop Payment">
<item>aggregate_resource</item>
<item>currency_exchange_type</item> <item>currency_exchange_type</item>
</portal_type> </portal_type>
<portal_type id="Traveler Check Purchase"> <portal_type id="Traveler Check Purchase">
......
...@@ -137,7 +137,9 @@ ...@@ -137,7 +137,9 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -166,7 +168,7 @@ ...@@ -166,7 +168,7 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -275,11 +277,8 @@ ...@@ -275,11 +277,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -294,11 +293,24 @@ ...@@ -294,11 +293,24 @@
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple> </tuple>
<none/> </pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not request.get(\'resource\', False)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
<string>my_destination_payment_title</string> <string>my_destination_payment_title</string>
<string>my_reference_range_min</string> <string>my_reference_range_min</string>
<string>my_reference_range_max</string> <string>my_reference_range_max</string>
<string>my_aggregate_resource</string>
<string>my_description</string> <string>my_description</string>
</list> </list>
</value> </value>
......
...@@ -89,9 +89,11 @@ ref_max = transaction.getReferenceRangeMax()\n ...@@ -89,9 +89,11 @@ ref_max = transaction.getReferenceRangeMax()\n
# We will first retrieve all checks\n # We will first retrieve all checks\n
check_list = []\n check_list = []\n
if ref_min is not None or ref_max is not None:\n if ref_min is not None or ref_max is not None:\n
aggregate_resource = transaction.getAggregateResource()\n
check_list = transaction.Base_checkOrCreateCheck(\n check_list = transaction.Base_checkOrCreateCheck(\n
reference_range_min = ref_min,\n reference_range_min = ref_min,\n
reference_range_max = ref_max)\n reference_range_max = ref_max,\n
resource=aggregate_resource())\n
if len(check_list)>0:\n if len(check_list)>0:\n
# First make sure there is no delivery line\n # First make sure there is no delivery line\n
line_list = transaction.objectValues(portal_type=\'Cash Delivery Line\')\n line_list = transaction.objectValues(portal_type=\'Cash Delivery Line\')\n
...@@ -240,6 +242,7 @@ if debit_required:\n ...@@ -240,6 +242,7 @@ if debit_required:\n
<string>ref_min</string> <string>ref_min</string>
<string>ref_max</string> <string>ref_max</string>
<string>check_list</string> <string>check_list</string>
<string>aggregate_resource</string>
<string>len</string> <string>len</string>
<string>line_list</string> <string>line_list</string>
<string>append</string> <string>append</string>
......
242 246
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,7 @@ Checkbook Delivery Line | currency_exchange_type ...@@ -6,6 +6,7 @@ Checkbook Delivery Line | currency_exchange_type
Checkbook Delivery | currency_exchange_type Checkbook Delivery | currency_exchange_type
Checkbook Reception Line | check_amount Checkbook Reception Line | check_amount
Checkbook Reception Line | check_type Checkbook Reception Line | check_type
Stop Payment | aggregate_resource
Stop Payment | currency_exchange_type Stop Payment | currency_exchange_type
Traveler Check Purchase | currency_exchange_type Traveler Check Purchase | currency_exchange_type
Traveler Check Sale | currency_exchange_type Traveler Check Sale | currency_exchange_type
\ 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