[Erp5-report] r30044 - in /erp5/trunk/bt5/erp5_project: SkinTemplateItem/portal_skins/erp5_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 27 17:16:50 CET 2009
Author: seb
Date: Tue Oct 27 17:16:47 2009
New Revision: 30044
URL: http://svn.erp5.org?rev=30044&view=rev
Log:
2009-10-27 Seb
* Allows to select the state of project when call the milestone report
Added:
erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog/my_project_validation_state_list.xml
Modified:
erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReport.xml
erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog.xml
erp5/trunk/bt5/erp5_project/bt/revision
Modified: erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReport.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReport.xml?rev=30044&r1=30043&r2=30044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReport.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReport.xml [utf8] Tue Oct 27 17:16:47 2009
@@ -62,12 +62,14 @@
translateString = context.Base_translateString\n
portal = context.getPortalObject()\n
\n
-from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery\n
query_kw = {}\n
-query_kw[\'simulation_state\'] = [\'draft\', \'cancelled\']\n
-\n
-project_list = portal.portal_catalog(portal_type=\'Project\',\n
- validation_state = NegatedQuery(Query(**query_kw)))\n
+\n
+sql_kw = {}\n
+if project_validation_state_list is not None and \\\n
+ len(project_validation_state_list):\n
+ sql_kw[\'validation_state\'] = project_validation_state_list\n
+\n
+project_list = portal.portal_catalog(portal_type=\'Project\', **sql_kw)\n
project_uid_list = [x.uid for x in project_list]\n
\n
\n
@@ -92,8 +94,10 @@
select_dict[\'movement.stop_date\'] = None\n
select_dict[\'catalog.title\'] = None\n
select_dict[\'parent_title\'] = None\n
-milestone_list = [x for x in portal.portal_catalog(parent_uid=project_uid_list,\n
- portal_type=\'Project Milestone\', select_dict=select_dict, **sql_kw)]\n
+milestone_list = []\n
+if len(project_uid_list):\n
+ milestone_list = [x for x in portal.portal_catalog(parent_uid=project_uid_list,\n
+ portal_type=\'Project Milestone\', select_dict=select_dict, **sql_kw)]\n
\n
milestone_list.sort(key = lambda x: (x.parent_title, x.stop_date, x.title))\n
\n
@@ -119,7 +123,7 @@
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>from_date=None, at_date=None, **kw</string> </value>
+ <value> <string>from_date=None, at_date=None, project_validation_state_list=None, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
@@ -147,7 +151,7 @@
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>2</int> </value>
+ <value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
@@ -155,17 +159,17 @@
<tuple>
<string>from_date</string>
<string>at_date</string>
+ <string>project_validation_state_list</string>
<string>kw</string>
<string>listbox</string>
<string>_getattr_</string>
<string>context</string>
<string>translateString</string>
<string>portal</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
- <string>NegatedQuery</string>
- <string>ComplexQuery</string>
<string>query_kw</string>
+ <string>sql_kw</string>
+ <string>None</string>
+ <string>len</string>
<string>_write_</string>
<string>_apply_</string>
<string>project_list</string>
@@ -174,10 +178,9 @@
<string>_getiter_</string>
<string>x</string>
<string>project_uid_list</string>
- <string>sql_kw</string>
<string>query_list</string>
- <string>None</string>
- <string>len</string>
+ <string>Query</string>
+ <string>ComplexQuery</string>
<string>select_dict</string>
<string>milestone_list</string>
<string>milestone</string>
@@ -197,6 +200,7 @@
<tuple>
<none/>
<none/>
+ <none/>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog.xml?rev=30044&r1=30043&r2=30044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog.xml [utf8] Tue Oct 27 17:16:47 2009
@@ -63,6 +63,7 @@
<value>
<list>
<string>left</string>
+ <string>right</string>
</list>
</value>
</item>
@@ -76,6 +77,14 @@
<list>
<string>my_from_date</string>
<string>my_at_date</string>
+ <string>my_project_validation_state_list</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>right</string> </key>
+ <value>
+ <list>
<string>your_format</string>
<string>your_portal_skin</string>
</list>
Added: erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog/my_project_validation_state_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog/my_project_validation_state_list.xml?rev=30044&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog/my_project_validation_state_list.xml (added)
+++ erp5/trunk/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_generateMilestoneReportDialog/my_project_validation_state_list.xml [utf8] Tue Oct 27 17:16:47 2009
@@ -1,0 +1,179 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>delegated_list</string> </key>
+ <value>
+ <list>
+ <string>default</string>
+ <string>items</string>
+ <string>size</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>my_project_validation_state_list</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>items</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>size</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string>my_multi_list_field</string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string>Base_viewFieldLibrary</string> </value>
+ </item>
+ <item>
+ <key> <string>items</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>size</string> </key>
+ <value> <int>4</int> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string>Click to edit the target</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>python: [x[1] for x in field.get_value(\'items\') if x[1] not in (\'draft\', \'invalidated\')]</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="3" aka="AAAAAAAAAAM=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>python: here.Base_getTranslatedWorkflowStateItemList(wf_id=\'project_workflow\')</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="4" aka="AAAAAAAAAAQ=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>python: len(field.get_value(\'items\'))</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_project/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/bt/revision?rev=30044&r1=30043&r2=30044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_project/bt/revision [utf8] Tue Oct 27 17:16:47 2009
@@ -1,1 +1,1 @@
-683
+684
More information about the Erp5-report
mailing list