Commit 101cf672 authored by Jérome Perrin's avatar Jérome Perrin

payment_mean: always show listbox in Select Dialog

Show an empty listbox at the beginning, that will be populated when user
start to search.
This is required if we want the ?reset=1 from the action URL to really
reset the selection.
parent 6d49c842
portal = context.getPortalObject() portal = context.getPortalObject()
if mode == 'stopped_or_delivered': if mode is None:
# To show an empty listbox the first time the dialog is open
return []
elif mode == 'stopped_or_delivered':
simulation_state = ('delivered', 'stopped') simulation_state = ('delivered', 'stopped')
else: else:
assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode
......
...@@ -262,9 +262,7 @@ ...@@ -262,9 +262,7 @@
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
...@@ -289,13 +287,13 @@ ...@@ -289,13 +287,13 @@
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>list_action</string> </key> <key> <string>list_action</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -345,7 +343,7 @@ ...@@ -345,7 +343,7 @@
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -543,7 +541,7 @@ ...@@ -543,7 +541,7 @@
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -624,7 +622,7 @@ ...@@ -624,7 +622,7 @@
<item> <item>
<key> <string>stat_method</string> </key> <key> <string>stat_method</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -656,19 +654,6 @@ ...@@ -656,19 +654,6 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:request.form.get(\'sign\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
...@@ -681,7 +666,7 @@ ...@@ -681,7 +666,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
...@@ -698,7 +683,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI ...@@ -698,7 +683,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="5" aka="AAAAAAAAAAU="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
...@@ -711,7 +696,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI ...@@ -711,7 +696,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="6" aka="AAAAAAAAAAY="> <record id="5" aka="AAAAAAAAAAU=">
<pickle> <pickle>
<global name="Method" module="Products.Formulator.MethodField"/> <global name="Method" module="Products.Formulator.MethodField"/>
</pickle> </pickle>
...@@ -724,7 +709,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI ...@@ -724,7 +709,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="7" aka="AAAAAAAAAAc="> <record id="6" aka="AAAAAAAAAAY=">
<pickle> <pickle>
<global name="Method" module="Products.Formulator.MethodField"/> <global name="Method" module="Products.Formulator.MethodField"/>
</pickle> </pickle>
......
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