[Erp5-report] r32387 kazuhiko - in /erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 10 06:09:33 CET 2010
Author: kazuhiko
Date: Wed Feb 10 06:09:33 2010
New Revision: 32387
URL: http://svn.erp5.org?rev=32387&view=rev
Log:
update divergence solving dialog.
Added:
erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getDeliverySolverList.xml
Modified:
erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_getSolverDecisionList.xml
erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_updateSolveDivergenceDialog.xml
erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_delivery_solver.xml
erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_solver_configuration.xml
Modified: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_getSolverDecisionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_getSolverDecisionList.xml?rev=32387&r1=32386&r2=32387&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_getSolverDecisionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_getSolverDecisionList.xml [utf8] Wed Feb 10 06:09:33 2010
@@ -53,10 +53,24 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string># XXX currently we create a temporary Solver Process and build temporary Solver Decision in it.\n
-# But for better performance, Solver Process and Solver Decision should be created by causality\n
-# workflow when a delivery becomes divergent.\n
-solver_process = context.getPortalObject().portal_solvers.newSolverProcess(context, temp_object=True)\n
+ <value> <string># XXX currently we create a Solver Process and build Solver Decision in it if missing.\n
+# But for better performance, Solver Process and Solver Decision should be created beforehand\n
+# by causality workflow when a delivery becomes divergent.\n
+solver_process = None\n
+solver_list = context.getSolverValueList()\n
+for i in solver_list:\n
+ # XXX if \'solving\' decision exists, what should we do?\n
+ if i.getSolverState() != \'solved\':\n
+ solver_process = i\n
+ break\n
+context.log(solver_process)\n
+if solver_process is None:\n
+ context.log(solver_process)\n
+ solver_process = context.getPortalObject().portal_solvers.newSolverProcess(context)\n
+ context.log(solver_process)\n
+ solver_list.append(solver_process.getRelativeUrl())\n
+ context.setSolverList(solver_list)\n
+# XXX should omit \'solved\' decision?\n
return solver_process.objectValues(portal_type=\'Solver Decision\')\n
</string> </value>
</item>
@@ -95,10 +109,13 @@
<value>
<tuple>
<string>kw</string>
+ <string>None</string>
+ <string>solver_process</string>
<string>_getattr_</string>
<string>context</string>
- <string>True</string>
- <string>solver_process</string>
+ <string>solver_list</string>
+ <string>_getiter_</string>
+ <string>i</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_updateSolveDivergenceDialog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_updateSolveDivergenceDialog.xml?rev=32387&r1=32386&r2=32387&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_updateSolveDivergenceDialog.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_updateSolveDivergenceDialog.xml [utf8] Wed Feb 10 06:09:33 2010
@@ -58,12 +58,17 @@
line_list = context.Delivery_getSolverDecisionList(listbox=listbox)\n
for listbox_key in listbox:\n
listbox_dict = listbox[listbox_key]\n
- line = [x for x in line_list if x.getId() == listbox_key][0]\n
+ line = [x for x in line_list if x.getPath() == listbox_key][0]\n
uid = line.getUid()\n
- for property in (\'solver\', \'solver_parameter\', \'target_solver\', \'comment\',):\n
- value = listbox_dict.get(property, \'\')\n
+ for property in (\'solver\', \'solver_configuration\', \'delivery_solver\', \'comment\',):\n
+ value = listbox_dict.get(property, None)\n
key = \'field_listbox_%s_%s\' % (property, uid)\n
request.form[key] = request.other[key] = value\n
+ if property == \'solver_configuration\':\n
+ if value is not None:\n
+ line.updateConfiguration(**value.as_dict())\n
+ else:\n
+ line.setProperty(property, value)\n
\n
return context.Delivery_viewSolveDivergenceDialog(listbox=listbox)\n
</string> </value>
@@ -118,9 +123,11 @@
<string>line</string>
<string>uid</string>
<string>property</string>
+ <string>None</string>
<string>value</string>
<string>key</string>
<string>_write_</string>
+ <string>_apply_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_delivery_solver.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_delivery_solver.xml?rev=32387&r1=32386&r2=32387&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_delivery_solver.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_delivery_solver.xml [utf8] Wed Feb 10 06:09:33 2010
@@ -277,7 +277,11 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:request.get(\'listbox\', {}).get(cell.getId(), {}).get(\'solver\', \'\')</string> </value>
+ <value> <string encoding="cdata"><![CDATA[
+
+python:request.get(\'listbox\', {}).get(cell.getPath(), {}).get(\'solver\', \'\') and len(cell.SolverDecision_getDeliverySolverList()) > 1
+
+]]></string> </value>
</item>
</dictionary>
</pickle>
@@ -293,7 +297,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.Delivery_getDeliverySolverList(cell.getId())</string> </value>
+ <value> <string>python:cell.SolverDecision_getDeliverySolverList()</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_solver_configuration.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_solver_configuration.xml?rev=32387&r1=32386&r2=32387&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_solver_configuration.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/listbox_solver_configuration.xml [utf8] Wed Feb 10 06:09:33 2010
@@ -187,7 +187,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:request.get(\'listbox\', {}).get(cell.getId(), {}).get(\'solver\', \'\')</string> </value>
+ <value> <string>cell/getSolver</string> </value>
</item>
</dictionary>
</pickle>
@@ -203,7 +203,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.Delivery_getSolverConfigurationFormId(cell.getId())</string> </value>
+ <value> <string>python:cell.getSolverValue().getConfigurationFormId()</string> </value>
</item>
</dictionary>
</pickle>
Added: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getDeliverySolverList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getDeliverySolverList.xml?rev=32387&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getDeliverySolverList.xml (added)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getDeliverySolverList.xml [utf8] Wed Feb 10 06:09:33 2010
@@ -1,0 +1,132 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <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>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>try:\n
+ return [(\'\', \'\')] + [x for x in context.getPortalObject().portal_solvers.getDeliverySolverTranslatedItemList() \\\n
+ if x[1] in context.getSolverValue().getDeliverySolverList()]\n
+except AttributeError:\n
+ return [(\'\', \'\')]\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>x</string>
+ <string>_getitem_</string>
+ <string>AttributeError</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>SolverDecision_getDeliverySolverList</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
More information about the Erp5-report
mailing list