Commit 52a09871 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix check type selection field being kept as editable after initial page...

Fix check type selection field being kept as editable after initial page "refresh" which can lead to user confusion.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14581 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent daf8f75a
......@@ -71,8 +71,6 @@ from Products.ERP5Type.Message import Message\n
from Products.ERP5Type.Document import newTempBase\n
\n
request = context.REQUEST\n
resource = request.get(\'resource\',None)\n
previous_resource = request.get(\'previous_resource\',None)\n
item_model = context.getPortalObject().restrictedTraverse(resource)\n
\n
# We must make sure that the selection is not None\n
......@@ -228,7 +226,7 @@ else:\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=None,batch_mode=0,**kw</string> </value>
<value> <string>listbox=None,batch_mode=0,resource=None,previous_resource=None,**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -248,7 +246,7 @@ else:\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -256,6 +254,8 @@ else:\n
<tuple>
<string>listbox</string>
<string>batch_mode</string>
<string>resource</string>
<string>previous_resource</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
......@@ -264,13 +264,11 @@ else:\n
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>None</string>
<string>resource</string>
<string>previous_resource</string>
<string>item_model</string>
<string>Products.ERP5Form.Selection</string>
<string>Selection</string>
<string>selection</string>
<string>None</string>
<string>error_value</string>
<string>field_error_dict</string>
<string>generate_error</string>
......@@ -318,6 +316,8 @@ else:\n
<tuple>
<none/>
<int>0</int>
<none/>
<none/>
</tuple>
</value>
</item>
......
......@@ -111,6 +111,7 @@
<value>
<list>
<string>my_resource</string>
<string>your_resource</string>
<string>my_previous_resource</string>
</list>
</value>
......
......@@ -273,15 +273,18 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<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: request.get(\'resource\', \'dummy\')</string> </value>
<value> <string>python: here.getProperty(\'previous_resource\', \'\')</string> </value>
</item>
</dictionary>
</pickle>
......@@ -289,8 +292,11 @@
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
......
......@@ -137,9 +137,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -163,7 +161,9 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>items</string> </key>
......@@ -181,7 +181,9 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -301,7 +303,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not request.get(\'previous_resource\', False)</string> </value>
<value> <string>python: request.get(\'resource\', False)</string> </value>
</item>
</dictionary>
</pickle>
......@@ -322,4 +324,20 @@
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: ((request.get(\'resource\', False)) and (None, ) or (\'Type\', ))[0]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
248
\ No newline at end of file
252
\ 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