Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
erp5
Commits
45f71807
Commit
45f71807
authored
Dec 02, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Make erp5_core pass coding style test
/reviewed-on
nexedi/erp5!996
parents
ef456975
d9f07b5b
Changes
138
Hide whitespace changes
Inline
Side-by-side
Showing
138 changed files
with
242 additions
and
839 deletions
+242
-839
bt5/erp5_core_proxy_field_legacy/SkinTemplateItem/portal_skins/erp5_core_proxy_field_legacy/Base_viewFieldLibrary/planning_box.xml
...proxy_field_legacy/Base_viewFieldLibrary/planning_box.xml
+1
-1
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml
...5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml
+1
-1
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_viewPlanning/planning_box.xml
...ns/erp5_mrp/ProductionOrder_viewPlanning/planning_box.xml
+1
-1
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewPlanningReport/planning_box.xml
...p5_project/TaskModule_viewPlanningReport/planning_box.xml
+1
-1
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml
...ject/TaskReportModule_viewPlanningReport/planning_box.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/your_dialog_updated.xml
...elivery_viewSolveDivergenceDialog/your_dialog_updated.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/GenericSolver_viewConfigurationFormBox/my_tested_property_list.xml
...lver_viewConfigurationFormBox/my_tested_property_list.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/ItemListSplitSolver_viewConfigurationFormBox/my_start_date.xml
...istSplitSolver_viewConfigurationFormBox/my_start_date.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/ItemListSplitSolver_viewConfigurationFormBox/my_stop_date.xml
...ListSplitSolver_viewConfigurationFormBox/my_stop_date.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitMoveSolver_viewConfigurationFormBox/my_delivery_solver.xml
...oveSolver_viewConfigurationFormBox/my_delivery_solver.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitMoveSolver_viewConfigurationFormBox/my_delivery_url.xml
...itMoveSolver_viewConfigurationFormBox/my_delivery_url.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_delivery_solver.xml
...litSolver_viewConfigurationFormBox/my_delivery_solver.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_start_date.xml
...itySplitSolver_viewConfigurationFormBox/my_start_date.xml
+1
-1
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_stop_date.xml
...titySplitSolver_viewConfigurationFormBox/my_stop_date.xml
+1
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/BarModule_viewMultiForm2Dialog/your_email_1.xml
...5_ui_test/BarModule_viewMultiForm2Dialog/your_email_1.xml
+1
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/BarModule_viewMultiForm2Dialog/your_text_1.xml
...p5_ui_test/BarModule_viewMultiForm2Dialog/your_text_1.xml
+1
-1
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.ScriptConstraint.py
...eItem/portal_components/document.erp5.ScriptConstraint.py
+1
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.DocumentExtraction.py
...em/portal_components/extension.erp5.DocumentExtraction.py
+1
-16
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
...al_components/extension.erp5.FolderWorkflowActionUtils.py
+0
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
...l_components/extension.erp5.FolderWorkflowActionUtils.xml
+1
-3
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
...teItem/portal_components/extension.erp5.InventoryBrain.py
+0
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml
...eItem/portal_components/extension.erp5.InventoryBrain.xml
+1
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/Base_getAutoLogoutSessionKey.py
...al_skins/erp5_auto_logout/Base_getAutoLogoutSessionKey.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.py
...TemplateItem/portal_skins/erp5_core/Alarm_getReportURL.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.py
...plateItem/portal_skins/erp5_core/Base_callDialogMethod.py
+2
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.py
...mplateItem/portal_skins/erp5_core/Base_configureSortOn.py
+1
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureUI.py
...inTemplateItem/portal_skins/erp5_core/Base_configureUI.py
+1
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertDateListToChartList.py
...portal_skins/erp5_core/Base_convertDateListToChartList.py
+0
-25
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertDateListToChartList.xml
...ortal_skins/erp5_core/Base_convertDateListToChartList.xml
+0
-62
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertVariationListToQuantityList.py
...kins/erp5_core/Base_convertVariationListToQuantityList.py
+0
-31
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertVariationListToQuantityList.xml
...ins/erp5_core/Base_convertVariationListToQuantityList.xml
+0
-62
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.py
...lateItem/portal_skins/erp5_core/Base_createNewDocument.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createRelation.py
...emplateItem/portal_skins/erp5_core/Base_createRelation.py
+4
-60
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
...core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
+5
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editRelation.py
...nTemplateItem/portal_skins/erp5_core/Base_editRelation.py
+1
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateParentDomain.py
...eItem/portal_skins/erp5_core/Base_generateParentDomain.py
+3
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateRandomString.py
...eItem/portal_skins/erp5_core/Base_generateRandomString.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.py
...ateItem/portal_skins/erp5_core/Base_generateWeekDomain.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.py
...ateItem/portal_skins/erp5_core/Base_generateYearDomain.py
+1
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.py
...l_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.py
+1
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHelpUrl.py
...kinTemplateItem/portal_skins/erp5_core/Base_getHelpUrl.py
+5
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getLineListFieldPropertyDictList.py
..._skins/erp5_core/Base_getLineListFieldPropertyDictList.py
+3
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getLineListFieldPropertyDictList.xml
...skins/erp5_core/Base_getLineListFieldPropertyDictList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getListbox.py
...kinTemplateItem/portal_skins/erp5_core/Base_getListbox.py
+4
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
...skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
+3
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.xml
...kins/erp5_core/Base_getMultiListFieldPropertyDictList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPreferredSectionItemList.xml
...rtal_skins/erp5_core/Base_getPreferredSectionItemList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
...em/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSafeIdFromString.py
...teItem/portal_skins/erp5_core/Base_getSafeIdFromString.py
+5
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSafeIdFromString.xml
...eItem/portal_skins/erp5_core/Base_getSafeIdFromString.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml
...emplateItem/portal_skins/erp5_core/Base_getSearchText.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSourceVisibility.py
...teItem/portal_skins/erp5_core/Base_getSourceVisibility.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSourceVisibility.xml
...eItem/portal_skins/erp5_core/Base_getSourceVisibility.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistory.py
...ateItem/portal_skins/erp5_core/Base_getWorkflowHistory.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
...portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
+3
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.py
...plateItem/portal_skins/erp5_core/Base_hashCategoryList.py
+2
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml
...lateItem/portal_skins/erp5_core/Base_hashCategoryList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.py
...Item/portal_skins/erp5_core/Base_jumpToRelatedDocument.py
+2
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToDay.py
...portal_skins/erp5_core/Base_roundPlanningBoxBoundToDay.py
+0
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToDay.xml
...ortal_skins/erp5_core/Base_roundPlanningBoxBoundToDay.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToInt.py
...portal_skins/erp5_core/Base_roundPlanningBoxBoundToInt.py
+0
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToInt.xml
...ortal_skins/erp5_core/Base_roundPlanningBoxBoundToInt.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToMinute.py
...tal_skins/erp5_core/Base_roundPlanningBoxBoundToMinute.py
+0
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_roundPlanningBoxBoundToMinute.xml
...al_skins/erp5_core/Base_roundPlanningBoxBoundToMinute.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchHandler.py
...TemplateItem/portal_skins/erp5_core/Base_searchHandler.py
+0
-49
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchHandler.xml
...emplateItem/portal_skins/erp5_core/Base_searchHandler.xml
+0
-62
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_sortObjectListLikeSQL.py
...Item/portal_skins/erp5_core/Base_sortObjectListLikeSQL.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_sortObjectListLikeSQL.xml
...tem/portal_skins/erp5_core/Base_sortObjectListLikeSQL.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_updateDialogForm.py
...plateItem/portal_skins/erp5_core/Base_updateDialogForm.py
+0
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateDialogConfirmation.py
...portal_skins/erp5_core/Base_validateDialogConfirmation.py
+0
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateDialogConfirmation.xml
...ortal_skins/erp5_core/Base_validateDialogConfirmation.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateIDAsReferenceSuffix.py
...ortal_skins/erp5_core/Base_validateIDAsReferenceSuffix.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateIDAsReferenceSuffix.xml
...rtal_skins/erp5_core/Base_validateIDAsReferenceSuffix.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.py
...plateItem/portal_skins/erp5_core/Base_validateRelation.py
+18
-21
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewDict.py
.../SkinTemplateItem/portal_skins/erp5_core/Base_viewDict.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/my_planning_box.xml
...skins/erp5_core/Base_viewFieldLibrary/my_planning_box.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/my_view_mode_id_as_reference.xml
...re/Base_viewFieldLibrary/my_view_mode_id_as_reference.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_save.py
...plateItem/portal_skins/erp5_core/BusinessTemplate_save.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.py
...portal_skins/erp5_core/CategoryTool_importCategoryFile.py
+0
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml
...ortal_skins/erp5_core/CategoryTool_importCategoryFile.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Category_getSortedCategoryChildValueList.py
...ins/erp5_core/Category_getSortedCategoryChildValueList.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkDataWithScript.py
...em/portal_skins/erp5_core/ERP5Site_checkDataWithScript.py
+4
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.py
...portal_skins/erp5_core/ERP5Site_checkNamingConventions.py
+11
-11
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getHelpUrl.py
...emplateItem/portal_skins/erp5_core/ERP5Site_getHelpUrl.py
+5
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getPlanningBox.py
...ateItem/portal_skins/erp5_core/ERP5Site_getPlanningBox.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_newContent.py
...emplateItem/portal_skins/erp5_core/ERP5Site_newContent.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexCategory.py
...teItem/portal_skins/erp5_core/ERP5Site_reindexCategory.py
+9
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
...l_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.py
...Item/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.py
...portal_skins/erp5_core/ERP5Site_updateTranslationTable.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityAcquiredCategoryFromContent.py
...5_core/ERP5Type_getSecurityAcquiredCategoryFromContent.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityAcquiredCategoryFromContent.xml
..._core/ERP5Type_getSecurityAcquiredCategoryFromContent.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.py
..._skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.xml
...skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromContent.py
...kins/erp5_core/ERP5Type_getSecurityCategoryFromContent.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromContent.xml
...ins/erp5_core/ERP5Type_getSecurityCategoryFromContent.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.py
...l_skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.xml
..._skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromAssignment.py
...5_core/ERP5Type_getSecurityChildCategoryFromAssignment.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromAssignment.xml
..._core/ERP5Type_getSecurityChildCategoryFromAssignment.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromContent.py
...erp5_core/ERP5Type_getSecurityChildCategoryFromContent.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromContent.xml
...rp5_core/ERP5Type_getSecurityChildCategoryFromContent.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromAssignment.py
..._core/ERP5Type_getSecurityParentCategoryFromAssignment.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromAssignment.xml
...core/ERP5Type_getSecurityParentCategoryFromAssignment.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromContent.py
...rp5_core/ERP5Type_getSecurityParentCategoryFromContent.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromContent.xml
...p5_core/ERP5Type_getSecurityParentCategoryFromContent.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.py
...re/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml
...e/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.py
...ore/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.py
+2
-17
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml
...re/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.py
.../SkinTemplateItem/portal_skins/erp5_core/Folder_delete.py
+9
-10
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_deleteObjectList.py
...ateItem/portal_skins/erp5_core/Folder_deleteObjectList.py
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_deleteObjectList.xml
...teItem/portal_skins/erp5_core/Folder_deleteObjectList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
.../SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
+11
-11
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.xml
...SkinTemplateItem/portal_skins/erp5_core/Folder_filter.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_getContentListReportSectionList.py
...skins/erp5_core/Folder_getContentListReportSectionList.py
+0
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_getDeleteObjectList.py
...Item/portal_skins/erp5_core/Folder_getDeleteObjectList.py
+4
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
...portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.py
...e/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_search.py
.../SkinTemplateItem/portal_skins/erp5_core/Folder_search.py
+0
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Planning_commonStats.py
...mplateItem/portal_skins/erp5_core/Planning_commonStats.py
+0
-102
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Planning_commonStats.xml
...plateItem/portal_skins/erp5_core/Planning_commonStats.xml
+0
-62
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.py
...SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.py
+4
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.py
...Item/portal_skins/erp5_core/Predicate_hashCategoryList.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.xml
...tem/portal_skins/erp5_core/Predicate_hashCategoryList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportFormatItemList.py
...tal_skins/erp5_core/Preference_getReportFormatItemList.py
+0
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/RamCache_getCachePluginStatisticList.py
...l_skins/erp5_core/RamCache_getCachePluginStatisticList.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_hashVariationCategoryItemList.py
...skins/erp5_core/Resource_hashVariationCategoryItemList.py
+5
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_hashVariationCategoryItemList.xml
...kins/erp5_core/Resource_hashVariationCategoryItemList.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_afterClone.py
...tem/portal_skins/erp5_core/SystemPreference_afterClone.py
+1
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_downloadRepositoryBusinessTemplateList.py
...re/TemplateTool_downloadRepositoryBusinessTemplateList.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_filterTupleDiff.py
...em/portal_skins/erp5_core/TemplateTool_filterTupleDiff.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.py
...p5_core/TemplateTool_installBusinessTemplateListAction.py
+0
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installRepositoryBusinessTemplateList.py
...ore/TemplateTool_installRepositoryBusinessTemplateList.py
+9
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
...lateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
+1
-2
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/scripts/checkConsistency.py
..._workflow/validation_workflow/scripts/checkConsistency.py
+1
-2
product/ERP5/bootstrap/erp5_core/bt/skip_coding_style_test
product/ERP5/bootstrap/erp5_core/bt/skip_coding_style_test
+0
-1
product/ERP5Form/PlanningBox.py
product/ERP5Form/PlanningBox.py
+1
-1
No files found.
bt5/erp5_core_proxy_field_legacy/SkinTemplateItem/portal_skins/erp5_core_proxy_field_legacy/Base_viewFieldLibrary/planning_box.xml
View file @
45f71807
...
@@ -540,7 +540,7 @@
...
@@ -540,7 +540,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToDay
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToDay
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
sec_axis_script
</string>
</key>
<key>
<string>
sec_axis_script
</string>
</key>
...
...
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml
View file @
45f71807
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToMinute
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToMinute
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
...
...
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_viewPlanning/planning_box.xml
View file @
45f71807
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToMinute
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToMinute
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewPlanningReport/planning_box.xml
View file @
45f71807
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToMinute
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToMinute
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml
View file @
45f71807
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToMinute
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToMinute
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/Delivery_viewSolveDivergenceDialog/your_dialog_updated.xml
View file @
45f71807
...
@@ -279,7 +279,7 @@
...
@@ -279,7 +279,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/GenericSolver_viewConfigurationFormBox/my_tested_property_list.xml
View file @
45f71807
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/ItemListSplitSolver_viewConfigurationFormBox/my_start_date.xml
View file @
45f71807
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/ItemListSplitSolver_viewConfigurationFormBox/my_stop_date.xml
View file @
45f71807
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitMoveSolver_viewConfigurationFormBox/my_delivery_solver.xml
View file @
45f71807
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitMoveSolver_viewConfigurationFormBox/my_delivery_url.xml
View file @
45f71807
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_delivery_solver.xml
View file @
45f71807
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_start_date.xml
View file @
45f71807
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/QuantitySplitSolver_viewConfigurationFormBox/my_stop_date.xml
View file @
45f71807
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/BarModule_viewMultiForm2Dialog/your_email_1.xml
View file @
45f71807
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/BarModule_viewMultiForm2Dialog/your_text_1.xml
View file @
45f71807
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.ScriptConstraint.py
View file @
45f71807
...
@@ -37,7 +37,7 @@ class ScriptConstraint(ConstraintMixin):
...
@@ -37,7 +37,7 @@ class ScriptConstraint(ConstraintMixin):
portal_type
=
'Script Constraint'
portal_type
=
'Script Constraint'
def
_createConsistencyMessage
(
self
,
object_relative_url
,
message
,
mapping
):
def
_createConsistencyMessage
(
self
,
object_relative_url
,
message
,
mapping
):
#
XXX If I put in the right place I have TypeError: 'NoneType' object is not callable
#
XXX If I put in the right place I have TypeError: 'NoneType' object is not callable
from
Products.ERP5Type.ConsistencyMessage
import
ConsistencyMessage
from
Products.ERP5Type.ConsistencyMessage
import
ConsistencyMessage
return
ConsistencyMessage
(
self
,
return
ConsistencyMessage
(
self
,
object_relative_url
=
object_relative_url
,
object_relative_url
=
object_relative_url
,
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.DocumentExtraction.py
View file @
45f71807
...
@@ -107,23 +107,8 @@ def getExcerptText(context, txt, sw, tags, trail, maxlines):
...
@@ -107,23 +107,8 @@ def getExcerptText(context, txt, sw, tags, trail, maxlines):
txt
=
txt
.
replace
(
'-'
,
' - '
)
# to find hyphenated occurrences
txt
=
txt
.
replace
(
'-'
,
' - '
)
# to find hyphenated occurrences
txt
=
txt
.
replace
(
','
,
', '
)
txt
=
txt
.
replace
(
','
,
', '
)
txt
=
txt
.
replace
(
';'
,
'; '
)
txt
=
txt
.
replace
(
';'
,
'; '
)
r
=
re
.
compile
(
'
\
s+
'
)
r
=
re
.
compile
(
r
'\
s+
')
txt = re.sub(r,'
',txt)
txt = re.sub(r,'
',txt)
text = '
'.join(txt.split('
\
n
')).split('
') # very rough tokenization
text = '
'.join(txt.split('
\
n
')).split('
') # very rough tokenization
return [p for p in generateParts(context,text,sw,tags,trail,maxlines)]
return [p for p in generateParts(context,text,sw,tags,trail,maxlines)]
if __name__=='
__main__
':
sw='
pricing
priority
right
acting
proportion
'
txt='
'.join([l.strip() for l in open('
offer
.
txt
').readlines()])
# configuration
tags=('
<
b
>
','
</
b
>
')
trail=5
maxlines=5
for p in getExcerptText(None,txt,sw,tags,trail,maxlines):
print p
# vim: filetype=python syntax=python shiftwidth=2
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
45f71807
...
@@ -52,7 +52,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
...
@@ -52,7 +52,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
doc
.
getPortalTypeName
())
doc
.
getPortalTypeName
())
return
get_url
return
get_url
request
=
self
.
REQUEST
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
wf_tool
=
portal
.
portal_workflow
wf_tool
=
portal
.
portal_workflow
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
View file @
45f71807
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
W: 55, 2: Unused variable \'request\' (unused-variable)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
View file @
45f71807
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
from
Products.ZSQLCatalog.zsqlbrain
import
ZSQLBrain
from
Products.ZSQLCatalog.zsqlbrain
import
ZSQLBrain
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
ZTUtils
import
make_query
from
ZTUtils
import
make_query
from
Products.CMFCore.utils
import
getToolByName
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
ComputedAttribute
import
ComputedAttribute
from
ComputedAttribute
import
ComputedAttribute
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.xml
View file @
45f71807
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
W: 17, 0: Unused getToolByName imported from Products.CMFCore.utils (unused-import)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/Base_getAutoLogoutSessionKey.py
View file @
45f71807
from
AccessControl
import
getSecurityManager
from
zExceptions
import
Unauthorized
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
# Cheap "do not call from URL" protection - not that the session key is secret
if
REQUEST
is
not
None
:
# Cheap "do not call from URL" protection - not that the session key is secret
raise
Unauthorized
raise
Unauthorized
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportURL.py
View file @
45f71807
from
ZTUtils
import
make_query
from
ZTUtils
import
make_query
obj
ect
=
brain
.
getObject
()
obj
=
brain
.
getObject
()
if
obj
ect
is
None
:
if
obj
is
None
:
return
None
return
None
url
=
context
.
absolute_url
()
url
=
context
.
absolute_url
()
method
=
context
.
getReportMethodId
(
'Alarm_viewReport'
)
method
=
context
.
getReportMethodId
(
'Alarm_viewReport'
)
kw
=
{
'active_process'
:
'portal_activities/%s'
%
obj
ect
.
id
,
kw
=
{
'active_process'
:
'portal_activities/%s'
%
obj
.
id
,
'reset'
:
'1'
,
'reset'
:
'1'
,
}
}
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.py
View file @
45f71807
...
@@ -104,7 +104,6 @@ except FormValidationError, validation_errors:
...
@@ -104,7 +104,6 @@ except FormValidationError, validation_errors:
can_redirect
=
1
can_redirect
=
1
MARKER
=
[]
# A recognisable default value. Use with 'is', not '=='.
MARKER
=
[]
# A recognisable default value. Use with 'is', not '=='.
listbox_id_list
=
[]
# There should not be more than one listbox - but this give us a way to check.
listbox_id_list
=
[]
# There should not be more than one listbox - but this give us a way to check.
file_id_list
=
[]
# For uploaded files.
for
field
in
form
.
get_fields
():
for
field
in
form
.
get_fields
():
k
=
field
.
id
k
=
field
.
id
v
=
request
.
get
(
k
,
MARKER
)
v
=
request
.
get
(
k
,
MARKER
)
...
@@ -151,7 +150,7 @@ if len(listbox_id_list):
...
@@ -151,7 +150,7 @@ if len(listbox_id_list):
if
hasattr
(
kw
,
'previous_md5_object_uid_list'
):
if
hasattr
(
kw
,
'previous_md5_object_uid_list'
):
selection_list
=
context
.
portal_selections
.
callSelectionFor
(
kw
[
'list_selection_name'
],
context
=
context
)
selection_list
=
context
.
portal_selections
.
callSelectionFor
(
kw
[
'list_selection_name'
],
context
=
context
)
if
selection_list
is
not
None
:
if
selection_list
is
not
None
:
object_uid_list
=
map
(
lambda
x
:
x
.
getObject
().
getUid
(),
selection_list
)
object_uid_list
=
[
x
.
getObject
().
getUid
()
for
x
in
selection_list
]
error
=
context
.
portal_selections
.
selectionHasChanged
(
kw
[
'previous_md5_object_uid_list'
],
object_uid_list
)
error
=
context
.
portal_selections
.
selectionHasChanged
(
kw
[
'previous_md5_object_uid_list'
],
object_uid_list
)
if
error
:
if
error
:
error_message
=
context
.
Base_translateString
(
"Sorry, your selection has changed."
)
error_message
=
context
.
Base_translateString
(
"Sorry, your selection has changed."
)
...
@@ -167,7 +166,7 @@ listbox_uid = kw.get('listbox_uid', None)
...
@@ -167,7 +166,7 @@ listbox_uid = kw.get('listbox_uid', None)
# In such cases, we must not try to update a non-existing selection.
# In such cases, we must not try to update a non-existing selection.
if
listbox_uid
is
not
None
and
kw
.
has_key
(
'list_selection_name'
):
if
listbox_uid
is
not
None
and
kw
.
has_key
(
'list_selection_name'
):
uids
=
kw
.
get
(
'uids'
)
uids
=
kw
.
get
(
'uids'
)
selected_uids
=
context
.
portal_selections
.
updateSelectionCheckedUidList
(
context
.
portal_selections
.
updateSelectionCheckedUidList
(
kw
[
'list_selection_name'
],
kw
[
'list_selection_name'
],
listbox_uid
,
uids
)
listbox_uid
,
uids
)
# Remove values which doesn't work with make_query.
# Remove values which doesn't work with make_query.
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.py
View file @
45f71807
# Updates attributes of an Zope document
from
Products.Formulator.Errors
import
FormValidationError
# which is in a class inheriting from ERP5 Base
from
Products.Formulator.Errors
import
ValidationError
,
FormValidationError
request
=
context
.
REQUEST
request
=
context
.
REQUEST
field_sort_type
=
request
.
form
.
get
(
'field_sort_type'
,
None
)
field_sort_type
=
request
.
form
.
get
(
'field_sort_type'
,
None
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureUI.py
View file @
45f71807
# Updates attributes of an Zope document
from
Products.Formulator.Errors
import
FormValidationError
# which is in a class inheriting from ERP5 Base
from
Products.Formulator.Errors
import
ValidationError
,
FormValidationError
request
=
context
.
REQUEST
request
=
context
.
REQUEST
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertDateListToChartList.py
deleted
100644 → 0
View file @
ef456975
# This scripts allows to update a list so that it
# can be displayed correctly in a graph
# The list given have to be of the forme:
# list = [[Datetime(),value (,value)*],([Datetime(),value (,value)*])*]
list
.
sort
()
# Check if there is any none value, and replace it by 0
formated_list
=
[]
if
len
(
list
)
>=
1
:
for
i
in
range
(
len
(
list
)):
for
index_value
in
range
(
1
,
len
(
list
[
0
])):
if
list
[
i
][
index_value
]
==
None
:
list
[
i
][
index_value
]
=
0
formated_list
.
append
(
list
[
0
])
for
i
in
range
(
1
,
len
(
list
)):
nb_days
=
int
(
list
[
i
][
0
]
-
list
[
i
-
1
][
0
])
for
day
in
range
(
1
,
nb_days
):
formated_list
.
append
([
list
[
i
-
1
][
0
]
+
day
])
for
nb_value
in
range
(
1
,
len
(
list
[
i
-
1
])):
formated_list
[
len
(
formated_list
)
-
1
].
append
(
list
[
i
-
1
][
nb_value
])
formated_list
.
append
(
list
[
i
])
return
formated_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertDateListToChartList.xml
deleted
100644 → 0
View file @
ef456975
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
_params
</string>
</key>
<value>
<string>
list=[]
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_convertDateListToChartList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertVariationListToQuantityList.py
deleted
100644 → 0
View file @
ef456975
# This scripts allows to update a list so that it
# converts variation on a quantity to the quantity itself
# ie, if list=[[DateTime('09/10/2003'),+4],[DateTime('09/19/2003'),-8]],
# and initial_quantity = [3]
# result: [[DateTime('2003/09/10'), 7], [DateTime('2003/09/19'), -1]]
# The list given have to be of the forme:
# list = [[Datetime(),value (,value)*],([Datetime(),value (,value)*])*]
# The initial_quantity have to be like this :
# initial_quantity = [value (,value)*]
list
.
sort
()
quantity_list
=
[]
#if type(initial_quantity) is type(1):
# initial_quantity = [initial_quantity]
if
len
(
list
)
>=
1
and
(
len
(
list
[
0
])
-
1
)
==
len
(
initial_quantity
):
quantity_list
.
append
([
list
[
0
][
0
]])
for
i
in
range
(
1
,
len
(
list
[
0
])):
if
list
[
0
][
i
]
==
None
:
list
[
0
][
i
]
=
0
quantity_list
[
0
].
append
(
initial_quantity
[
i
-
1
]
+
list
[
0
][
i
])
for
value
in
range
(
1
,
len
(
list
)):
quantity_list
.
append
([
list
[
value
][
0
]])
for
i
in
range
(
1
,
len
(
list
[
0
])):
if
list
[
value
][
i
]
==
None
:
list
[
value
][
i
]
=
0
quantity_list
[
value
].
append
(
quantity_list
[
value
-
1
][
i
]
+
list
[
value
][
i
])
return
quantity_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_convertVariationListToQuantityList.xml
deleted
100644 → 0
View file @
ef456975
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
_params
</string>
</key>
<value>
<string>
list=[],initial_quantity=[]
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_convertVariationListToQuantityList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.py
View file @
45f71807
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
this type cannot be added in the container.
this type cannot be added in the container.
"""
"""
Base_translateString
=
context
.
Base_translateString
Base_translateString
=
context
.
Base_translateString
REQUEST
=
context
.
REQUEST
parent
=
context
.
getParentValue
()
parent
=
context
.
getParentValue
()
allowed_type_list
=
parent
.
getVisibleAllowedContentTypeList
()
allowed_type_list
=
parent
.
getVisibleAllowedContentTypeList
()
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createRelation.py
View file @
45f71807
...
@@ -19,11 +19,11 @@ for v in values:
...
@@ -19,11 +19,11 @@ for v in values:
# We should not edit the id field
# We should not edit the id field
# because the object which is created is not attached to a
# because the object which is created is not attached to a
# module yet
# module yet
id
=
v
id
_
=
v
else
:
else
:
id
=
str
(
module
.
generateNewId
())
id
_
=
str
(
module
.
generateNewId
())
module
.
invokeFactory
(
type_name
=
portal_type
,
id
=
id
)
module
.
invokeFactory
(
type_name
=
portal_type
,
id
=
id_
)
new_ob
=
module
.
get
(
id
)
new_ob
=
module
.
get
(
id
_
)
kw
=
{}
kw
=
{}
if
catalog_index
!=
'id'
:
if
catalog_index
!=
'id'
:
kw
[
catalog_index
]
=
v
kw
[
catalog_index
]
=
v
...
@@ -34,59 +34,3 @@ for v in values:
...
@@ -34,59 +34,3 @@ for v in values:
o
.
setValue
(
base_category
,
ref_list
,
portal_type
=
[
portal_type
])
o
.
setValue
(
base_category
,
ref_list
,
portal_type
=
[
portal_type
])
return
request
[
'RESPONSE'
].
redirect
(
return_url
)
return
request
[
'RESPONSE'
].
redirect
(
return_url
)
try
:
# Validate the form
form
=
getattr
(
context
,
form_id
)
form
.
validate_all_to_request
(
request
)
my_field
=
None
# Find out which field defines the relation
for
f
in
form
.
get_fields
():
if
f
.
has_value
(
'base_category'
):
if
f
.
get_value
(
'base_category'
)
==
base_category
:
k
=
f
.
id
v
=
getattr
(
request
,
k
,
None
)
if
v
!=
context
.
getProperty
(
k
[
3
:]):
my_field
=
f
if
my_field
:
kw
=
{}
kw
[
my_field
.
get_value
(
'catalog_index'
)]
=
request
.
get
(
my_field
.
id
,
None
)
context
.
portal_selections
.
setSelectionParamsFor
(
'Base_viewRelatedObjectList'
,
kw
.
copy
())
kw
[
'base_category'
]
=
base_category
kw
[
'portal_type'
]
=
my_field
.
get_value
(
'portal_type'
)
request
.
set
(
'base_category'
,
base_category
)
request
.
set
(
'portal_type'
,
my_field
.
get_value
(
'portal_type'
))
request
.
set
(
'form_id'
,
'Base_viewRelatedObjectList'
)
request
.
set
(
my_field
.
get_value
(
'catalog_index'
),
request
.
get
(
my_field
.
id
,
None
))
relation_list
=
context
.
portal_catalog
(
**
kw
)
if
len
(
relation_list
)
>
0
:
return
context
.
Base_viewRelatedObjectList
(
REQUEST
=
request
)
else
:
request
.
set
(
'catalog_index'
,
my_field
.
get_value
(
'catalog_index'
))
request
.
set
(
'relation_values'
,
request
.
get
(
my_field
.
id
,
None
))
return
context
.
Base_viewCreateRelationDialog
(
REQUEST
=
request
)
pass
# context.newRelation(base_category, my_field.get_value('portal_type'))
except
FormValidationError
,
validation_errors
:
# Pack errors into the request
field_errors
=
form
.
ErrorFields
(
validation_errors
)
request
.
set
(
'field_errors'
,
field_errors
)
return
form
(
request
)
else
:
message
=
'Relation+Unchanged.'
if
not
selection_index
:
redirect_url
=
'%s/%s?%s'
%
(
o
.
absolute_url
()
,
form_id
,
'portal_status_message=%s'
%
message
)
else
:
redirect_url
=
'%s/%s?selection_index=%s&selection_name=%s&%s'
%
(
o
.
absolute_url
()
,
form_id
,
selection_index
,
selection_name
,
'portal_status_message=%s'
%
message
)
request
[
'RESPONSE'
].
redirect
(
redirect_url
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
View file @
45f71807
...
@@ -57,7 +57,7 @@ def editListBox(listbox_field, listbox):
...
@@ -57,7 +57,7 @@ def editListBox(listbox_field, listbox):
if
listbox
is
not
None
:
if
listbox
is
not
None
:
global_property_dict
=
{}
global_property_dict
=
{}
if
listbox_field
.
has_value
(
'global_attributes'
):
if
listbox_field
.
has_value
(
'global_attributes'
):
hidden_attribute_list
=
map
(
lambda
x
:
x
[
0
],
listbox_field
.
get_value
(
'global_attributes'
))
hidden_attribute_list
=
[
x
[
0
]
for
x
in
listbox_field
.
get_value
(
'global_attributes'
)]
for
hidden_attribute
in
hidden_attribute_list
:
for
hidden_attribute
in
hidden_attribute_list
:
global_property_dict
[
hidden_attribute
]
=
getattr
(
request
,
hidden_attribute
,
None
)
global_property_dict
[
hidden_attribute
]
=
getattr
(
request
,
hidden_attribute
,
None
)
for
item_url
,
listbox_item_dict
in
listbox
.
items
():
for
item_url
,
listbox_item_dict
in
listbox
.
items
():
...
@@ -129,10 +129,10 @@ def editMatrixBox(matrixbox_field, matrixbox):
...
@@ -129,10 +129,10 @@ def editMatrixBox(matrixbox_field, matrixbox):
columns
=
matrixbox_field
.
get_value
(
'columns'
)
columns
=
matrixbox_field
.
get_value
(
'columns'
)
tabs
=
matrixbox_field
.
get_value
(
'tabs'
)
tabs
=
matrixbox_field
.
get_value
(
'tabs'
)
column_ids
=
map
(
lambda
x
:
x
[
0
],
columns
)
column_ids
=
[
x
[
0
]
for
x
in
columns
]
line_ids
=
map
(
lambda
x
:
x
[
0
],
lines
)
line_ids
=
[
x
[
0
]
for
x
in
lines
]
tab_ids
=
map
(
lambda
x
:
x
[
0
],
tabs
)
tab_ids
=
[
x
[
0
]
for
x
in
tabs
]
extra_dimension_category_list_list
=
[[
category
for
category
,
label
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
extra_dimension_category_list_list
=
[[
category
for
category
,
_
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
# There are 3 cases
# There are 3 cases
# Case 1: we do 1 dimensional matrix
# Case 1: we do 1 dimensional matrix
...
@@ -250,8 +250,6 @@ server_physical_path = context.getPhysicalPath()
...
@@ -250,8 +250,6 @@ server_physical_path = context.getPhysicalPath()
server_physical_path
=
list
(
server_physical_path
)
server_physical_path
=
list
(
server_physical_path
)
server_url
=
request
[
"SERVER_URL"
]
server_url
=
request
[
"SERVER_URL"
]
server_physical_path
.
insert
(
0
,
server_url
)
server_physical_path
.
insert
(
0
,
server_url
)
#calculate direct the url instead of using absolute_url
new_url
=
'/'
.
join
(
server_physical_path
)
# for web mode, we should use 'view' instead of passed form_id
# for web mode, we should use 'view' instead of passed form_id
# after 'Save & View'.
# after 'Save & View'.
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editRelation.py
View file @
45f71807
# Updates relation of an ERP5 document
# Updates relation of an ERP5 document
from
Products.ERP5Type.Message
import
Message
from
Products.Formulator.Errors
import
ValidationError
from
Products.ERP5Form.MultiRelationField
import
SUB_FIELD_ID
from
Products.ERP5Form.MultiRelationField
import
SUB_FIELD_ID
if
listbox_uid
is
not
None
:
if
listbox_uid
is
not
None
:
selection_tool
=
context
.
getPortalObject
().
portal_selections
selection_tool
=
context
.
getPortalObject
().
portal_selections
select
ed_uids
=
select
ion_tool
.
updateSelectionCheckedUidList
(
selection_tool
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
selection_name
,
listbox_uid
,
uids
)
uids
=
selection_tool
.
getSelectionCheckedUidsFor
(
selection_name
)
uids
=
selection_tool
.
getSelectionCheckedUidsFor
(
selection_name
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateParentDomain.py
View file @
45f71807
from
Products.ERP5Type.Document
import
newTempDomain
domain_list
=
[]
domain_list
=
[]
request
=
context
.
REQUEST
request
=
context
.
REQUEST
filter
=
{}
filter
_
=
{}
try
:
try
:
# first, try to get form_id from the request
# first, try to get form_id from the request
...
@@ -12,7 +11,7 @@ except KeyError:
...
@@ -12,7 +11,7 @@ except KeyError:
if
listbox
is
not
None
:
if
listbox
is
not
None
:
portal_type_list
=
[
x
[
0
]
for
x
in
listbox
.
get_value
(
'portal_types'
)]
portal_type_list
=
[
x
[
0
]
for
x
in
listbox
.
get_value
(
'portal_types'
)]
filter
[
'portal_type'
]
=
portal_type_list
filter
_
[
'portal_type'
]
=
portal_type_list
if
depth
==
0
:
if
depth
==
0
:
parent_obj
=
request
[
'here'
]
parent_obj
=
request
[
'here'
]
...
@@ -22,7 +21,7 @@ else:
...
@@ -22,7 +21,7 @@ else:
parent_url
=
parent
.
getProperty
(
'parent_url'
)
parent_url
=
parent
.
getProperty
(
'parent_url'
)
parent_obj
=
context
.
restrictedTraverse
(
parent_url
)
parent_obj
=
context
.
restrictedTraverse
(
parent_url
)
for
obj
in
parent_obj
.
contentValues
(
filter
=
filter
):
for
obj
in
parent_obj
.
contentValues
(
filter
=
filter
_
):
domain
=
parent
.
generateTempDomain
(
id
=
'%s_%s'
%
(
depth
,
obj
.
getId
()))
domain
=
parent
.
generateTempDomain
(
id
=
'%s_%s'
%
(
depth
,
obj
.
getId
()))
domain
.
edit
(
title
=
obj
.
getTitle
(),
domain
.
edit
(
title
=
obj
.
getTitle
(),
parent_url
=
obj
.
getRelativeUrl
(),
parent_url
=
obj
.
getRelativeUrl
(),
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateRandomString.py
View file @
45f71807
...
@@ -10,4 +10,4 @@ if include_letters:
...
@@ -10,4 +10,4 @@ if include_letters:
character_set
=
'%s%s'
%
(
character_set
,
letters
)
character_set
=
'%s%s'
%
(
character_set
,
letters
)
if
include_digits
:
if
include_digits
:
character_set
=
'%s%s'
%
(
character_set
,
digits
)
character_set
=
'%s%s'
%
(
character_set
,
digits
)
return
''
.
join
([
choice
(
character_set
)
for
i
in
range
(
int
(
string_length
))])
return
''
.
join
([
choice
(
character_set
)
for
_
in
range
(
int
(
string_length
))])
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.py
View file @
45f71807
...
@@ -20,7 +20,7 @@ bound_start = DateTime(bound_start.year() , bound_start.month() , bound_start.da
...
@@ -20,7 +20,7 @@ bound_start = DateTime(bound_start.year() , bound_start.month() , bound_start.da
# Normalize Week. XXX this should be in preferences as well
# Normalize Week. XXX this should be in preferences as well
while
bound_start
.
Day
()
is
not
'Sunday'
:
while
bound_start
.
Day
()
is
not
'Sunday'
:
bound_start
=
bound_start
-
1
bound_start
=
bound_start
-
1
current_date
=
bound_start
+
7
*
bound_variation
current_date
=
bound_start
+
7
*
bound_variation
bound_stop
=
current_date
+
7
bound_stop
=
current_date
+
7
current_date
=
DateTime
(
current_date
.
year
()
,
current_date
.
month
()
,
current_date
.
day
())
current_date
=
DateTime
(
current_date
.
year
()
,
current_date
.
month
()
,
current_date
.
day
())
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.py
View file @
45f71807
...
@@ -21,12 +21,6 @@ current_date = DateTime(year, 1, 1)
...
@@ -21,12 +21,6 @@ current_date = DateTime(year, 1, 1)
default_link_url
=
'setLanePath?form_id=%s&list_selection_name=%s'
%
(
default_link_url
=
'setLanePath?form_id=%s&list_selection_name=%s'
%
(
form_id
,
selection_name
)
form_id
,
selection_name
)
# Define date format using user Preferences
date_order
=
portal
.
portal_preferences
.
getPreferredDateOrder
()
date_format
=
dict
(
ymd
=
'%m/%d'
,
dmy
=
'%d/%m'
,
mdy
=
'%m/%d'
).
get
(
date_order
,
'%m/%d'
)
category_list
=
[]
category_list
=
[]
if
depth
==
0
:
if
depth
==
0
:
# getting list of months
# getting list of months
...
@@ -45,7 +39,7 @@ if depth == 0:
...
@@ -45,7 +39,7 @@ if depth == 0:
if
current_date
.
month
()
!=
12
:
if
current_date
.
month
()
!=
12
:
stop_date
=
DateTime
(
current_date
.
year
(),
current_date
.
month
()
+
1
,
1
)
stop_date
=
DateTime
(
current_date
.
year
(),
current_date
.
month
()
+
1
,
1
)
else
:
else
:
stop_date
=
DateTime
(
year
+
1
,
1
,
1
)
stop_date
=
DateTime
(
year
+
1
,
1
,
1
)
o
.
setProperty
(
'stop'
,
stop_date
)
o
.
setProperty
(
'stop'
,
stop_date
)
o
.
setProperty
(
'relative_position'
,
int
(
current_date
))
o
.
setProperty
(
'relative_position'
,
int
(
current_date
))
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.py
View file @
45f71807
...
@@ -88,13 +88,12 @@ if not (content_type.startswith('application/vnd.sun.xml')
...
@@ -88,13 +88,12 @@ if not (content_type.startswith('application/vnd.sun.xml')
tmp_ooo
.
edit
(
data
=
import_file
.
read
(),
tmp_ooo
.
edit
(
data
=
import_file
.
read
(),
content_type
=
content_type
)
content_type
=
content_type
)
tmp_ooo
.
convertToBaseFormat
()
tmp_ooo
.
convertToBaseFormat
()
ignored
,
import_file_content
=
tmp_ooo
.
convert
(
'ods'
)
_
,
import_file_content
=
tmp_ooo
.
convert
(
'ods'
)
parser
.
openFromString
(
str
(
import_file_content
))
parser
.
openFromString
(
str
(
import_file_content
))
else
:
else
:
parser
.
openFile
(
import_file
)
parser
.
openFile
(
import_file
)
# Extract tables from the speadsheet file
# Extract tables from the speadsheet file
filename
=
parser
.
getFilename
()
spreadsheet_list
=
parser
.
getSpreadsheetsMapping
(
no_empty_lines
=
True
)
spreadsheet_list
=
parser
.
getSpreadsheetsMapping
(
no_empty_lines
=
True
)
...
@@ -128,8 +127,6 @@ for table_name in spreadsheet_list.keys():
...
@@ -128,8 +127,6 @@ for table_name in spreadsheet_list.keys():
else
:
else
:
# If there is a new column with a header and the path definition has
# If there is a new column with a header and the path definition has
# started, that seems the path definition has ended
# started, that seems the path definition has ended
if
'path_0'
in
property_map
.
values
():
path_index
==
None
# FIXME: useless statement, but what was the original intention ??
property_map
[
column_index
]
=
column_id
.
encode
(
'utf8'
)
property_map
[
column_index
]
=
column_id
.
encode
(
'utf8'
)
column_index
+=
1
column_index
+=
1
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHelpUrl.py
View file @
45f71807
if
context
.
REQUEST
.
has_key
(
'workflow_action'
):
# We are on a workflow transition
if
context
.
REQUEST
.
has_key
(
'workflow_action'
):
# We are on a workflow transition
help
=
'%s#%s'
%
(
getattr
(
getattr
(
context
,
form_id
),
'form_action'
),
context
.
REQUEST
[
'workflow_action'
])
help
_relative_url
=
'%s#%s'
%
(
getattr
(
getattr
(
context
,
form_id
),
'form_action'
),
context
.
REQUEST
[
'workflow_action'
])
elif
action
is
not
None
:
elif
action
is
not
None
:
help
=
'%s#%s'
%
(
context
.
getPortalTypeName
(),
action
)
help
_relative_url
=
'%s#%s'
%
(
context
.
getPortalTypeName
(),
action
)
elif
form_id
is
not
None
:
elif
form_id
is
not
None
:
help
=
'%s_%s'
%
(
context
.
getPortalTypeName
(),
form_id
)
help
_relative_url
=
'%s_%s'
%
(
context
.
getPortalTypeName
(),
form_id
)
else
:
else
:
help
=
context
.
getPortalTypeName
()
help
_relative_url
=
context
.
getPortalTypeName
()
return
'%s/%s'
%
(
context
.
portal_preferences
.
getPreferredHtmlStyleDocumentationBaseUrl
(),
help
)
return
'%s/%s'
%
(
context
.
portal_preferences
.
getPreferredHtmlStyleDocumentationBaseUrl
(),
help
_relative_url
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getLineListFieldPropertyDictList.py
View file @
45f71807
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
# Define a dictionary where we store the subfields to display.
# Define a dictionary where we store the subfields to display.
sub_field_dict
=
{}
sub_field_dict
=
{}
split_depth
=
1
split_depth
=
1
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getLineListFieldPropertyDictList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getListbox.py
View file @
45f71807
...
@@ -45,7 +45,7 @@ if listbox:
...
@@ -45,7 +45,7 @@ if listbox:
# the listbox is there.
# the listbox is there.
for
group
in
(
'bottom'
,
'center'
,
'left'
,
'right'
):
for
group
in
(
'bottom'
,
'center'
,
'left'
,
'right'
):
for
field
in
form
.
get_fields_in_group
(
group
):
for
field
in
form
.
get_fields_in_group
(
group
):
if
(
isListBox
(
field
)
and
if
(
isListBox
(
field
)
and
not
field
.
get_value
(
'hidden'
)
and
not
field
.
get_value
(
'hidden'
)
and
field
.
get_value
(
'enabled'
)):
field
.
get_value
(
'enabled'
)):
return
field
return
field
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
View file @
45f71807
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
# Define a dictionary where we store the subfields to display.
# Define a dictionary where we store the subfields to display.
sub_field_dict
=
{}
sub_field_dict
=
{}
split_depth
=
1
split_depth
=
1
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPreferredSectionItemList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
portal_type=
[\'Organisation\']
, validation_state=(\'validated\', \'draft\'), base_category=None
</string>
</value>
<value>
<string>
portal_type=
(\'Organisation\', )
, validation_state=(\'validated\', \'draft\'), base_category=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
portal_type=
[]
, limit=None, **kw
</string>
</value>
<value>
<string>
portal_type=
()
, limit=None, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSafeIdFromString.py
View file @
45f71807
...
@@ -8,14 +8,14 @@ translation_map = { "a": ['\xe0']
...
@@ -8,14 +8,14 @@ translation_map = { "a": ['\xe0']
}
}
clean_id
=
''
clean_id
=
''
if
s
tring
==
None
:
if
s
is
None
:
return
None
return
None
s
tring
=
string
.
lower
()
s
=
s
.
lower
()
s
tring
=
string
.
strip
()
s
=
s
.
strip
()
# oocalc inserts some strange chars when you press - key in a text cell.
# oocalc inserts some strange chars when you press - key in a text cell.
# Following line is a workaround for this, because \u2013 does not exist in latin1
# Following line is a workaround for this, because \u2013 does not exist in latin1
s
tring
=
string
.
replace
(
u'
\
u2013
'
,
'-'
)
s
=
s
.
replace
(
u'
\
u2013
'
,
'-'
)
for
char
in
s
tring
.
encode
(
'iso8859_1'
):
for
char
in
s
.
encode
(
'iso8859_1'
):
if
char
==
'_'
or
char
.
isalnum
():
if
char
==
'_'
or
char
.
isalnum
():
clean_id
+=
char
clean_id
+=
char
elif
char
.
isspace
()
or
char
in
(
'+'
,
'-'
):
elif
char
.
isspace
()
or
char
in
(
'+'
,
'-'
):
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSafeIdFromString.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
s
tring
=None
</string>
</value>
<value>
<string>
s=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection=None, argument_name_list=
[]
</string>
</value>
<value>
<string>
selection=None, argument_name_list=
()
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSourceVisibility.py
View file @
45f71807
# controls the visibility of "developper mode" links in ERP5 web interface
# controls the visibility of "developper mode" links in ERP5 web interface
# (edit form, edit field, edit portal type, ...) for object
# (edit form, edit field, edit portal type, ...) for object
if
obj
ect
is
None
:
if
obj
is
None
:
object
=
context
obj
=
context
return
context
.
portal_preferences
.
getPreferredHtmlStyleDevelopperMode
()
and
context
.
portal_membership
.
checkPermission
(
'View management screens'
,
obj
ect
)
return
context
.
portal_preferences
.
getPreferredHtmlStyleDevelopperMode
()
and
context
.
portal_membership
.
checkPermission
(
'View management screens'
,
obj
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSourceVisibility.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
obj
ect
=None
</string>
</value>
<value>
<string>
obj=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistory.py
View file @
45f71807
...
@@ -5,7 +5,7 @@ history_name_list = ['building_history', ' installation_history', 'history']
...
@@ -5,7 +5,7 @@ history_name_list = ['building_history', ' installation_history', 'history']
history
=
{}
history
=
{}
portal_workflow
=
context
.
getPortalObject
().
portal_workflow
portal_workflow
=
context
.
getPortalObject
().
portal_workflow
workflow_id_list
=
[
workflow_id
for
workflow_id
,
workflow_state
in
context
.
getWorkflowStateItemList
()]
workflow_id_list
=
[
x
[
0
]
for
x
in
context
.
getWorkflowStateItemList
()]
for
history_name
in
history_name_list
:
for
history_name
in
history_name_list
:
...
@@ -16,7 +16,7 @@ for history_name in history_name_list:
...
@@ -16,7 +16,7 @@ for history_name in history_name_list:
list_history_item
=
portal_workflow
.
getInfoFor
(
ob
=
context
,
name
=
history_name
,
wf_id
=
wf_id
)
list_history_item
=
portal_workflow
.
getInfoFor
(
ob
=
context
,
name
=
history_name
,
wf_id
=
wf_id
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
pass
pass
if
list_history_item
not
in
((),
None
):
if
list_history_item
not
in
((),
None
):
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
View file @
45f71807
request
=
context
.
REQUEST
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ERP5Type.Document
import
newTempMappedValue
from
Products.ERP5Type.Utils
import
getTranslationStringWithContext
from
Products.ERP5Type.Utils
import
getTranslationStringWithContext
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
...
@@ -12,7 +10,7 @@ result = []
...
@@ -12,7 +10,7 @@ result = []
i
=
1
i
=
1
portal_object
=
context
.
getPortalObject
()
portal_object
=
context
.
getPortalObject
()
portal_workflow
=
portal_object
.
portal_workflow
portal_workflow
=
portal_object
.
portal_workflow
workflow_id_list
=
[
x
for
x
,
y
in
context
.
getWorkflowStateItemList
()]
workflow_id_list
=
[
x
[
0
]
for
x
in
context
.
getWorkflowStateItemList
()]
if
not
workflow_id
in
workflow_id_list
:
if
not
workflow_id
in
workflow_id_list
:
return
[]
return
[]
...
@@ -31,12 +29,8 @@ def getActorName(actor):
...
@@ -31,12 +29,8 @@ def getActorName(actor):
# Get history
# Get history
# XXX Compatibility
workflow_item_list
=
portal_workflow
.
getInfoFor
(
for
history_name
in
[
'history'
,
'building_history'
,
'installation_history'
]:
ob
=
context
,
name
=
'history'
,
wf_id
=
workflow_id
)
workflow_item_list
=
portal_workflow
.
getInfoFor
(
ob
=
context
,
name
=
'history'
,
wf_id
=
workflow_id
)
if
workflow_item_list
!=
[]:
break
wf_state_var
=
portal_workflow
[
workflow_id
].
variables
.
getStateVar
()
wf_state_var
=
portal_workflow
[
workflow_id
].
variables
.
getStateVar
()
wf_states
=
portal_workflow
[
workflow_id
].
states
wf_states
=
portal_workflow
[
workflow_id
].
states
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.py
View file @
45f71807
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
in such way that it is possible to select multiple
in such way that it is possible to select multiple
categories for the same document )
categories for the same document )
"""
"""
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
# Initialise result
# Initialise result
sub_field_list
=
[]
sub_field_list
=
[]
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.py
View file @
45f71807
from
ZTUtils
import
make_query
request
=
context
.
REQUEST
request
=
context
.
REQUEST
form
=
getattr
(
context
,
form_id
)
form
=
getattr
(
context
,
form_id
)
field
=
form
.
get_field
(
field_id
)
field
=
form
.
get_field
(
field_id
)
base_category
=
field
.
get_value
(
'base_category'
)
base_category
=
field
.
get_value
(
'base_category'
)
portal_type
=
map
(
lambda
x
:
x
[
0
],
field
.
get_value
(
'portal_type'
))
portal_type
=
[
x
[
0
]
for
x
in
field
.
get_value
(
'portal_type'
)]
kw
=
{}
kw
=
{}
for
k
,
v
in
field
.
get_value
(
'parameter_list'
)
:
for
k
,
v
in
field
.
get_value
(
'parameter_list'
)
:
kw
[
k
]
=
v
kw
[
k
]
=
v
...
@@ -16,7 +14,7 @@ if len(jump_reference_list)==1:
...
@@ -16,7 +14,7 @@ if len(jump_reference_list)==1:
jump_reference
=
jump_reference_list
[
0
]
jump_reference
=
jump_reference_list
[
0
]
return
jump_reference
.
Base_redirect
()
return
jump_reference
.
Base_redirect
()
else
:
else
:
selection_uid_list
=
map
(
lambda
x
:
x
.
getUid
(),
jump_reference_list
)
or
None
selection_uid_list
=
[
x
.
getUid
()
for
x
in
jump_reference_list
]
or
None
kw
=
{
'uid'
:
selection_uid_list
}
kw
=
{
'uid'
:
selection_uid_list
}
# We need to reset the selection. Indeed, some sort columns done in another
# We need to reset the selection. Indeed, some sort columns done in another
# jump could be meaningless for this particular jump. The consequence could
# jump could be meaningless for this particular jump. The consequence could
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToDay.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToDay.py
View file @
45f71807
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToDay.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToDay.xml
View file @
45f71807
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Planning_round
BoundToDay
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToDay
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToInt.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToInt.py
View file @
45f71807
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToInt.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToInt.xml
View file @
45f71807
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Planning_round
BoundToInt
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToInt
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToMinute.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToMinute.py
View file @
45f71807
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Planning_round
BoundToMinute.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_roundPlanningBox
BoundToMinute.xml
View file @
45f71807
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Planning_round
BoundToMinute
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToMinute
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchHandler.py
deleted
100644 → 0
View file @
ef456975
from
Products.Formulator.Errors
import
ValidationError
,
FormValidationError
from
ZTUtils
import
make_query
request
=
context
.
REQUEST
if
isinstance
(
list_form_id
,
tuple
):
list_form_id
=
list_form_id
[
0
]
# The type list is not working with isinstance, I have do do this bad hack
if
hasattr
(
list_form_id
,
'sort'
):
list_form_id
=
list_form_id
[
0
]
module_name
=
context
.
getId
()
try
:
# Validate the form
form
=
getattr
(
context
,
dialog_id
)
form
.
validate_all_to_request
(
request
)
kw
=
{}
for
f
in
form
.
get_fields
():
k
=
f
.
id
# XXX Remove your_ parameters...
k
=
k
[
5
:]
v
=
getattr
(
request
,
k
,
None
)
if
v
is
not
None
and
k
!=
'list_form_id'
:
kw
[
k
]
=
v
if
list_method_id
is
not
None
and
list_method_id
!=
''
:
kw
[
'list_method_id'
]
=
list_method_id
url_params_string
=
make_query
(
kw
)
# raise str(kw), url_params_string
except
FormValidationError
,
validation_errors
:
# Pack errors into the request
field_errors
=
form
.
ErrorFields
(
validation_errors
)
request
.
set
(
'field_errors'
,
field_errors
)
return
form
(
request
)
if
url_params_string
!=
''
:
redirect_url
=
'%s/%s?%s'
%
(
context
.
absolute_url
()
,
list_form_id
,
url_params_string
)
else
:
redirect_url
=
'%s/%s'
%
(
context
.
absolute_url
()
,
list_form_id
)
return
request
.
RESPONSE
.
redirect
(
redirect_url
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchHandler.xml
deleted
100644 → 0
View file @
ef456975
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
_params
</string>
</key>
<value>
<string>
form_id,dialog_id,list_form_id,list_method_id=\'\'
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_searchHandler
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_sortObjectListLikeSQL.py
View file @
45f71807
...
@@ -11,6 +11,6 @@ def generic_sort(a,b):
...
@@ -11,6 +11,6 @@ def generic_sort(a,b):
return
result
return
result
return
result
return
result
unordered_list
=
map
(
lambda
x
:
x
.
getObject
(),
unordered_list
)
unordered_list
=
[
x
.
getObject
()
for
x
in
unordered_list
]
unordered_list
.
sort
(
generic_sort
)
unordered_list
.
sort
(
generic_sort
)
return
unordered_list
return
unordered_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_sortObjectListLikeSQL.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
unordered_list
=[]
, sort_order=()
</string>
</value>
<value>
<string>
unordered_list, sort_order=()
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_updateDialogForm.py
View file @
45f71807
from
string
import
zfill
from
string
import
zfill
request
=
context
.
REQUEST
request
=
context
.
REQUEST
from
string
import
zfill
if
kw
.
get
(
'update'
,
False
):
if
kw
.
get
(
'update'
,
False
):
# Ensure ERP5JS correctly refresh the page
# Ensure ERP5JS correctly refresh the page
request
.
RESPONSE
.
setStatus
(
400
)
request
.
RESPONSE
.
setStatus
(
400
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
FieldValidator_requireIfDialogConfirmed
.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_validateDialogConfirmation
.py
View file @
45f71807
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
FieldValidator_requireIfDialogConfirmed
.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_validateDialogConfirmation
.xml
View file @
45f71807
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
FieldValidator_requireIfDialogConfirmed
</string>
</value>
<value>
<string>
Base_validateDialogConfirmation
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
PropertySheetChild_validateIDField
.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_validateIDAsReferenceSuffix
.py
View file @
45f71807
from
Products.ERP5Type.Log
import
log
portal
=
container
.
getPortalObject
()
portal
=
container
.
getPortalObject
()
if
not
(
id_value
.
endswith
(
portal
.
restrictedTraverse
(
REQUEST
.
object_path
)
\
if
not
(
id_value
.
endswith
(
portal
.
restrictedTraverse
(
REQUEST
.
object_path
)
\
.
getIdAsReferenceSuffix
())):
.
getIdAsReferenceSuffix
())):
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
PropertySheetChild_validateIDField
.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base_validateIDAsReferenceSuffix
.xml
View file @
45f71807
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
PropertySheetChild_validateIDField
</string>
</value>
<value>
<string>
Base_validateIDAsReferenceSuffix
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.py
View file @
45f71807
from
Products.Formulator.Errors
import
ValidationError
,
FormValidationError
from
Products.Formulator.Errors
import
FormValidationError
from
ZTUtils
import
make_query
from
ZTUtils
import
make_query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
...
@@ -46,8 +46,6 @@ def getOrderedUids(uids, values, catalog_index):
...
@@ -46,8 +46,6 @@ def getOrderedUids(uids, values, catalog_index):
uids
.
append
(
value_to_uid
[
value
])
uids
.
append
(
value_to_uid
[
value
])
return
uids
return
uids
field
.
get_value
(
'base_category'
)
try
:
try
:
# Validate the form
# Validate the form
form
=
getattr
(
context
,
form_id
)
form
=
getattr
(
context
,
form_id
)
...
@@ -58,20 +56,19 @@ try:
...
@@ -58,20 +56,19 @@ try:
# Find out which field defines the relation
# Find out which field defines the relation
for
f
in
form
.
get_fields
():
for
f
in
form
.
get_fields
():
if
f
.
has_value
(
'base_category'
):
if
f
.
has_value
(
'base_category'
):
#if f.get_value('base_category') == base_category:
#if f.get_value('base_category') == base_category:
k
=
f
.
id
k
=
f
.
id
v
=
getattr
(
request
,
k
,
None
)
v
=
getattr
(
request
,
k
,
None
)
if
v
in
(
None
,
''
,
'None'
,
[],
())
and
context
.
getProperty
(
k
[
3
:])
in
(
None
,
''
,
'None'
,
[],
()):
if
v
in
(
None
,
''
,
'None'
,
[],
())
and
context
.
getProperty
(
k
[
3
:])
in
(
None
,
''
,
'None'
,
[],
()):
# The old value is None and the new value is not significant
# The old value is None and the new value is not significant
# This bug fix is probably temporary since '' means None
# This bug fix is probably temporary since '' means None
pass
pass
elif
v
!=
context
.
getProperty
(
k
[
3
:]):
elif
v
!=
context
.
getProperty
(
k
[
3
:]):
old_value
=
context
.
getProperty
(
k
[
3
:])
old_value
=
context
.
getProperty
(
k
[
3
:])
my_field
=
f
my_field
=
f
new_value
=
v
new_value
=
v
base_category
=
f
.
get_value
(
'base_category'
)
base_category
=
f
.
get_value
(
'base_category'
)
if
my_field
and
base_category
is
not
None
:
if
my_field
and
base_category
is
not
None
:
empty_list
=
0
if
new_value
==
''
:
if
new_value
==
''
:
new_value
=
[]
new_value
=
[]
if
same_type
(
new_value
,
'a'
):
if
same_type
(
new_value
,
'a'
):
...
@@ -90,7 +87,7 @@ try:
...
@@ -90,7 +87,7 @@ try:
if
checkSameKeys
(
new_value
,
old_value
):
if
checkSameKeys
(
new_value
,
old_value
):
# Reorder keys
# Reorder keys
same_keys
=
1
same_keys
=
1
portal_type
=
map
(
lambda
x
:
x
[
0
],
my_field
.
get_value
(
'portal_type'
))
portal_type
=
[
x
[
0
]
for
x
in
my_field
.
get_value
(
'portal_type'
)]
# We work with strings - ie. single values
# We work with strings - ie. single values
kw
=
{}
kw
=
{}
kw
[
my_field
.
get_value
(
'catalog_index'
)]
=
new_value
kw
[
my_field
.
get_value
(
'catalog_index'
)]
=
new_value
...
@@ -103,7 +100,7 @@ try:
...
@@ -103,7 +100,7 @@ try:
request
.
set
(
'field_id'
,
my_field
.
id
)
request
.
set
(
'field_id'
,
my_field
.
id
)
previous_uids
=
o
.
getValueUidList
(
base_category
,
portal_type
=
portal_type
)
previous_uids
=
o
.
getValueUidList
(
base_category
,
portal_type
=
portal_type
)
relation_list
=
context
.
portal_catalog
(
**
kw
)
relation_list
=
context
.
portal_catalog
(
**
kw
)
relation_uid_list
=
map
(
lambda
x
:
x
.
uid
,
relation_list
)
relation_uid_list
=
[
x
.
uid
for
x
in
relation_list
]
uids
=
[]
uids
=
[]
for
uid
in
previous_uids
:
for
uid
in
previous_uids
:
if
uid
in
relation_uid_list
:
if
uid
in
relation_uid_list
:
...
@@ -125,9 +122,9 @@ try:
...
@@ -125,9 +122,9 @@ try:
# If we have only one in the list, we don't want to lose our time by
# If we have only one in the list, we don't want to lose our time by
# selecting it. So we directly do the update
# selecting it. So we directly do the update
if
len
(
relation_list
)
==
1
:
if
len
(
relation_list
)
==
1
:
selection_index
=
None
selection_index
=
None
uids
=
[
relation_list
[
0
].
uid
]
uids
=
[
relation_list
[
0
].
uid
]
return
o
.
Base_editRelation
(
form_id
=
form_id
,
return
o
.
Base_editRelation
(
form_id
=
form_id
,
field_id
=
my_field
.
id
,
field_id
=
my_field
.
id
,
selection_index
=
selection_index
,
selection_index
=
selection_index
,
selection_name
=
selection_name
,
selection_name
=
selection_name
,
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewDict.py
View file @
45f71807
...
@@ -13,10 +13,10 @@ from pprint import pformat
...
@@ -13,10 +13,10 @@ from pprint import pformat
ret
=
'<html><body><table width=100%>
\
n
'
ret
=
'<html><body><table width=100%>
\
n
'
dict
=
context
.
showDict
().
items
()
property_
dict
=
context
.
showDict
().
items
()
dict
.
sort
()
property_
dict
.
sort
()
i
=
0
i
=
0
for
k
,
v
in
dict
:
for
k
,
v
in
property_
dict
:
if
(
i
%
2
)
==
0
:
if
(
i
%
2
)
==
0
:
c
=
'#88dddd'
c
=
'#88dddd'
else
:
else
:
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/my_planning_box.xml
View file @
45f71807
...
@@ -540,7 +540,7 @@
...
@@ -540,7 +540,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
round_script
</string>
</key>
<key>
<string>
round_script
</string>
</key>
<value>
<string>
Planning_round
BoundToDay
</string>
</value>
<value>
<string>
Base_roundPlanningBox
BoundToDay
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
sec_axis_script
</string>
</key>
<key>
<string>
sec_axis_script
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/my_view_mode_id_as_reference.xml
View file @
45f71807
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
PropertySheetChild_validateIDField
</string>
</value>
<value>
<string>
Base_validateIDAsReferenceSuffix
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_save.py
View file @
45f71807
REQUEST
=
context
.
REQUEST
REQUEST
=
context
.
REQUEST
RESPONSE
=
REQUEST
.
RESPONSE
return
context
.
portal_templates
.
save
(
context
,
REQUEST
=
REQUEST
)
return
context
.
portal_templates
.
save
(
context
,
REQUEST
=
REQUEST
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.py
View file @
45f71807
...
@@ -72,12 +72,10 @@ for base_category, category_list in category_list_spreadsheet_dict.iteritems():
...
@@ -72,12 +72,10 @@ for base_category, category_list in category_list_spreadsheet_dict.iteritems():
except
ValueError
:
except
ValueError
:
category_id
=
category_path
category_id
=
category_path
container
=
portal_categories
container
=
portal_categories
is_base_category
=
True
category_type
=
'Base Category'
category_type
=
'Base Category'
category_type_property_id_set
=
base_category_property_id_set
category_type_property_id_set
=
base_category_property_id_set
else
:
else
:
container
=
resolveCategory
(
container_path
)
container
=
resolveCategory
(
container_path
)
is_base_category
=
False
category_type
=
'Category'
category_type
=
'Category'
category_type_property_id_set
=
category_property_id_set
category_type_property_id_set
=
category_property_id_set
try
:
try
:
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
import_file, update_existing_property=False, keep_existing_category=True, detailed_report=False, simulation_mode=False, displayed_report=
[]
, effective_date=None, expiration_date=None, existing_category_list=\'keep\', create_local_property=False, **kw
</string>
</value>
<value>
<string>
import_file, update_existing_property=False, keep_existing_category=True, detailed_report=False, simulation_mode=False, displayed_report=
()
, effective_date=None, expiration_date=None, existing_category_list=\'keep\', create_local_property=False, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Category_getSortedCategoryChildValueList.py
View file @
45f71807
...
@@ -2,7 +2,7 @@ from Products.ERP5Type.Log import log
...
@@ -2,7 +2,7 @@ from Products.ERP5Type.Log import log
# this script is no longer needed.
# this script is no longer needed.
log
(
'Category_getSortedCategoryChildValueList'
,
'use getCategoryChildValueList method'
)
log
(
'Category_getSortedCategoryChildValueList'
,
'use getCategoryChildValueList method'
)
value_list
=
filter
(
lambda
o
:
o
.
getRelativeUrl
()
!=
context
.
getRelativeUrl
(),
context
.
getCategoryChildValueList
())
value_list
=
[
o
for
o
in
context
.
getCategoryChildValueList
()
if
o
.
getRelativeUrl
()
!=
context
.
getRelativeUrl
()]
sort_id
=
'int_index'
sort_id
=
'int_index'
value_list
.
sort
(
key
=
lambda
x
:
x
.
getProperty
(
sort_id
))
value_list
.
sort
(
key
=
lambda
x
:
x
.
getProperty
(
sort_id
))
return
value_list
return
value_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkDataWithScript.py
View file @
45f71807
...
@@ -42,8 +42,8 @@ if depth == maximum_depth and id_list:
...
@@ -42,8 +42,8 @@ if depth == maximum_depth and id_list:
if
recursive
:
if
recursive
:
for
subdocument
in
document
.
objectValues
():
for
subdocument
in
document
.
objectValues
():
recurse
(
subdocument
)
recurse
(
subdocument
)
for
id
in
id_list
:
for
id
_
in
id_list
:
recurse
(
document
[
id
])
recurse
(
document
[
id
_
])
if
active_process
is
None
:
if
active_process
is
None
:
return
error_list
return
error_list
if
error_list
:
if
error_list
:
...
@@ -84,8 +84,8 @@ else:
...
@@ -84,8 +84,8 @@ else:
active_script
=
getattr
(
activate
(
priority
=
4
),
script
.
id
)
active_script
=
getattr
(
activate
(
priority
=
4
),
script
.
id
)
if
depth
<
maximum_depth
:
if
depth
<
maximum_depth
:
relative_url
=
relative_url
and
relative_url
+
'/'
or
''
relative_url
=
relative_url
and
relative_url
+
'/'
or
''
for
id
in
id_list
:
for
id
_
in
id_list
:
active_script
(
relative_url
=
relative_url
+
id
,
**
kw
)
active_script
(
relative_url
=
relative_url
+
id
_
,
**
kw
)
else
:
else
:
kw
[
'relative_url'
]
=
relative_url
kw
[
'relative_url'
]
=
relative_url
for
i
in
xrange
(
0
,
len
(
id_list
),
packet
):
for
i
in
xrange
(
0
,
len
(
id_list
),
packet
):
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.py
View file @
45f71807
...
@@ -85,13 +85,13 @@ def checkField(folder, form, field):
...
@@ -85,13 +85,13 @@ def checkField(folder, form, field):
a
=
template_field
.
getListMethodName
()
a
=
template_field
.
getListMethodName
()
path
+=
'/listbox'
path
+=
'/listbox'
for
x
in
'columns'
,
'all_columns'
:
for
x
in
'columns'
,
'all_columns'
:
for
id
,
title
in
field
.
get_value
(
x
):
for
id
_
,
title
in
field
.
get_value
(
x
):
error_message
+=
checkTitle
(
path
,
x
,
title
,
field
,
form
)
error_message
+=
checkTitle
(
path
,
x
,
title
,
field
,
form
)
if
a
not
in
(
None
,
"portal_catalog"
,
"searchFolder"
,
"objectValues"
,
if
a
not
in
(
None
,
"portal_catalog"
,
"searchFolder"
,
"objectValues"
,
"contentValues"
,
"ListBox_initializeFastInput"
):
"contentValues"
,
"ListBox_initializeFastInput"
):
if
not
a
.
endswith
(
'List'
):
if
not
a
.
endswith
(
'List'
):
if
0
:
if
0
:
error_message
+=
"%s : %s : %r Bad Naming Convention
\
n
"
%
(
path
,
id
,
a
)
error_message
+=
"%s : %s : %r Bad Naming Convention
\
n
"
%
(
path
,
id
_
,
a
)
return
error_message
return
error_message
def
isListBox
(
field
):
def
isListBox
(
field
):
...
@@ -107,7 +107,7 @@ titlecase_sub = re.compile(r"[A-Za-z]+('[A-Za-z]+)?").sub
...
@@ -107,7 +107,7 @@ titlecase_sub = re.compile(r"[A-Za-z]+('[A-Za-z]+)?").sub
titlecase_repl
=
lambda
mo
:
mo
.
group
(
0
)[
0
].
upper
()
+
mo
.
group
(
0
)[
1
:].
lower
()
titlecase_repl
=
lambda
mo
:
mo
.
group
(
0
)[
0
].
upper
()
+
mo
.
group
(
0
)[
1
:].
lower
()
titlecase
=
lambda
s
:
titlecase_sub
(
titlecase_repl
,
s
)
titlecase
=
lambda
s
:
titlecase_sub
(
titlecase_repl
,
s
)
def
checkTitle
(
path
,
id
,
title
,
field
=
None
,
form
=
None
):
def
checkTitle
(
path
,
id
_
,
title
,
field
=
None
,
form
=
None
):
"""
"""
Generic function that test the validity of a title.
Generic function that test the validity of a title.
"""
"""
...
@@ -115,11 +115,11 @@ def checkTitle(path, id, title, field=None, form=None):
...
@@ -115,11 +115,11 @@ def checkTitle(path, id, title, field=None, form=None):
if
(
form
is
not
None
and
form
.
pt
not
in
(
'form_dialog'
,
'folder_workflow_action_dialog'
))
or
form
is
None
:
if
(
form
is
not
None
and
form
.
pt
not
in
(
'form_dialog'
,
'folder_workflow_action_dialog'
))
or
form
is
None
:
if
(
field
is
not
None
and
not
field
.
get_value
(
'hidden'
)
and
\
if
(
field
is
not
None
and
not
field
.
get_value
(
'hidden'
)
and
\
(
title
is
None
or
len
(
title
.
strip
())
==
0
))
or
(
field
is
None
and
(
title
is
None
or
len
(
title
.
strip
())
==
0
)):
(
title
is
None
or
len
(
title
.
strip
())
==
0
))
or
(
field
is
None
and
(
title
is
None
or
len
(
title
.
strip
())
==
0
)):
return
"%s : %s : can't be empty
\
n
"
%
(
path
,
id
)
return
"%s : %s : can't be empty
\
n
"
%
(
path
,
id
_
)
for
c
in
title
:
for
c
in
title
:
if
c
.
lower
()
not
in
ALLOWED_CHARS
:
if
c
.
lower
()
not
in
ALLOWED_CHARS
:
return
"%s : %s : %r character not allowed
\
n
"
%
(
path
,
id
,
c
)
return
"%s : %s : %r character not allowed
\
n
"
%
(
path
,
id
_
,
c
)
title
=
re
.
sub
(
re
.
compile
(
r"\b("
+
"|"
.
join
(
re
.
escape
(
x
)
for
x
in
SENTENCE_PART_SET
)
+
r")\b"
),
""
,
title
)
title
=
re
.
sub
(
re
.
compile
(
r"\b("
+
"|"
.
join
(
re
.
escape
(
x
)
for
x
in
SENTENCE_PART_SET
)
+
r")\b"
),
""
,
title
)
...
@@ -132,22 +132,22 @@ def checkTitle(path, id, title, field=None, form=None):
...
@@ -132,22 +132,22 @@ def checkTitle(path, id, title, field=None, form=None):
if
word
.
upper
()
in
ABBREVIATION_WORD_SET
:
if
word
.
upper
()
in
ABBREVIATION_WORD_SET
:
if
not
word
.
isupper
():
if
not
word
.
isupper
():
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
,
word
)
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
_
,
word
)
elif
word
.
endswith
(
's'
)
and
word
[:
-
1
].
upper
()
in
ABBREVIATION_WORD_SET
:
elif
word
.
endswith
(
's'
)
and
word
[:
-
1
].
upper
()
in
ABBREVIATION_WORD_SET
:
if
not
word
[:
-
1
].
isupper
():
if
not
word
[:
-
1
].
isupper
():
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
,
word
)
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
_
,
word
)
elif
"-"
in
word
and
word
.
split
(
"-"
)[
0
].
upper
()
in
ABBREVIATION_WORD_SET
:
elif
"-"
in
word
and
word
.
split
(
"-"
)[
0
].
upper
()
in
ABBREVIATION_WORD_SET
:
if
not
word
.
split
(
"-"
)[
0
].
isupper
():
if
not
word
.
split
(
"-"
)[
0
].
isupper
():
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
,
word
)
error_message
+=
'%s : %s : %r is not upper case even though it is an abbriviation
\
n
'
%
(
path
,
id
_
,
word
)
else
:
else
:
if
word
.
lower
()
in
CLOSED_CLASS_WORD_SET
and
word
!=
word_list
[
0
]
:
if
word
.
lower
()
in
CLOSED_CLASS_WORD_SET
and
word
!=
word_list
[
0
]
:
if
(
word
.
capitalize
()
==
word
or
titlecase
(
word
)
==
word
):
if
(
word
.
capitalize
()
==
word
or
titlecase
(
word
)
==
word
):
error_message
+=
'%s : %s : %r is a closed-class word and should not be titlecased
\
n
'
%
(
path
,
id
,
word
)
error_message
+=
'%s : %s : %r is a closed-class word and should not be titlecased
\
n
'
%
(
path
,
id
_
,
word
)
elif
(
word
.
capitalize
()
!=
word
and
titlecase
(
word
)
!=
word
)
and
\
elif
(
word
.
capitalize
()
!=
word
and
titlecase
(
word
)
!=
word
)
and
\
word
not
in
LOWERCASE_WORD_SET
and
word
not
in
SPECIALCASE_WORD_SET
and
word
not
in
CLOSED_CLASS_WORD_SET
:
word
not
in
LOWERCASE_WORD_SET
and
word
not
in
SPECIALCASE_WORD_SET
and
word
not
in
CLOSED_CLASS_WORD_SET
:
error_message
+=
'%s : %s : %r is not titlecased
\
n
'
%
(
path
,
id
,
word
)
error_message
+=
'%s : %s : %r is not titlecased
\
n
'
%
(
path
,
id_
,
word
)
if
len
(
word_list
)
>
1
and
word_list
[
-
1
].
upper
()
==
'LIST'
and
word_list
[
-
2
].
upper
()
!=
'PACKING'
:
if
len
(
word_list
)
>
1
and
word_list
[
-
1
].
upper
()
==
'LIST'
and
word_list
[
-
2
].
upper
()
!=
'PACKING'
:
error_message
+=
'%s : %s : %r is a jargon
\
n
'
%
(
path
,
id
,
title
)
error_message
+=
'%s : %s : %r is a jargon
\
n
'
%
(
path
,
id
_
,
title
)
return
error_message
return
error_message
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getHelpUrl.py
View file @
45f71807
help
=
context
.
getPortalTypeName
()
help
_topic
=
context
.
getPortalTypeName
()
if
workflow_action
is
not
None
:
# First, the workflow transition case.
if
workflow_action
is
not
None
:
# First, the workflow transition case.
help
=
'%s_%s'
%
(
help
,
workflow_action
)
help
_topic
=
'%s_%s'
%
(
help_topic
,
workflow_action
)
elif
current_action
is
not
None
:
# Then, we are able to get the action.
elif
current_action
is
not
None
:
# Then, we are able to get the action.
help
=
'%s_%s'
%
(
help
,
current_action
[
'id'
])
help
_topic
=
'%s_%s'
%
(
help_topic
,
current_action
[
'id'
])
elif
current_form_id
is
not
None
:
# Otherwise, get the form we are in.
elif
current_form_id
is
not
None
:
# Otherwise, get the form we are in.
help
=
'%s_%s'
%
(
help
,
current_form_id
)
help
_topic
=
'%s_%s'
%
(
help_topic
,
current_form_id
)
return
'%s/%s'
%
(
context
.
portal_preferences
.
getPreferredHtmlStyleDocumentationBaseUrl
(),
help
)
return
'%s/%s'
%
(
context
.
portal_preferences
.
getPreferredHtmlStyleDocumentationBaseUrl
(),
help
_topic
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getPlanningBox.py
View file @
45f71807
...
@@ -12,5 +12,5 @@ if form.meta_type != 'ERP5 Form':
...
@@ -12,5 +12,5 @@ if form.meta_type != 'ERP5 Form':
# the listbox is there.
# the listbox is there.
for
group
in
(
'bottom'
,
'center'
,
'left'
,
'right'
):
for
group
in
(
'bottom'
,
'center'
,
'left'
,
'right'
):
for
field
in
form
.
get_fields_in_group
(
group
):
for
field
in
form
.
get_fields_in_group
(
group
):
if
field
.
meta_type
==
'PlanningBox'
and
not
(
field
[
'hidden'
])
and
field
[
'enabled'
]:
if
field
.
meta_type
==
'PlanningBox'
and
not
(
field
[
'hidden'
])
and
field
[
'enabled'
]:
return
field
return
field
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_newContent.py
View file @
45f71807
...
@@ -4,7 +4,6 @@ Content will be created in the appropriate module. It is
...
@@ -4,7 +4,6 @@ Content will be created in the appropriate module. It is
intended to be called from the user interface only.
intended to be called from the user interface only.
"""
"""
translateString
=
context
.
Base_translateString
translateString
=
context
.
Base_translateString
request
=
context
.
REQUEST
# Create the new content in appropriate module
# Create the new content in appropriate module
portal_object
=
context
.
getPortalObject
()
portal_object
=
context
.
getPortalObject
()
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexCategory.py
View file @
45f71807
...
@@ -10,23 +10,23 @@ nb_types = {}
...
@@ -10,23 +10,23 @@ nb_types = {}
for
error
in
error_list
:
for
error
in
error_list
:
# We count the number of each portal type
# We count the number of each portal type
if
error
[
1
]
==
'portal_type'
:
if
error
[
1
]
==
'portal_type'
:
type
=
error
[
3
]
portal_
type
=
error
[
3
]
if
nb_types
.
has_key
(
type
):
if
nb_types
.
has_key
(
portal_
type
):
nb_types
[
type
]
=
nb_types
[
type
]
+
1
nb_types
[
portal_type
]
=
nb_types
[
portal_
type
]
+
1
else
:
else
:
nb_types
[
type
]
=
1
nb_types
[
portal_
type
]
=
1
else
:
else
:
#print error
#print error
return_list
.
append
(
error
)
return_list
.
append
(
error
)
for
type
in
nb_types
.
keys
():
for
portal_
type
in
nb_types
.
keys
():
# Find the number of each portal type in the catalog
# Find the number of each portal type in the catalog
count_result
=
context
.
portal_catalog
.
countResults
(
portal_type
=
type
)
count_result
=
context
.
portal_catalog
.
countResults
(
portal_type
=
portal_
type
)
nb_catalog
=
count_result
[
0
][
0
]
nb_catalog
=
count_result
[
0
][
0
]
if
nb_types
[
type
]
!=
nb_catalog
:
if
nb_types
[
portal_
type
]
!=
nb_catalog
:
message
=
"XXX Warning for %s: there is %i lines in the catalog instead of %i"
%
\
message
=
"XXX Warning for %s: there is %i lines in the catalog instead of %i"
%
\
(
type
,
nb_catalog
,
nb_types
[
type
])
(
portal_type
,
nb_catalog
,
nb_types
[
portal_
type
])
return_list
.
append
((
'Count Error'
,
'PortalRoot_reindexAll'
,
1
,
message
))
return_list
.
append
((
'Count Error'
,
'PortalRoot_reindexAll'
,
1
,
message
))
#else: print "%s: %i" % (
type,nb_types[
type])
#else: print "%s: %i" % (
portal_type,nb_types[portal_
type])
return
return_list
return
return_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
View file @
45f71807
...
@@ -13,7 +13,7 @@ unindex_count = 0
...
@@ -13,7 +13,7 @@ unindex_count = 0
for
candidate
in
candidate_list
:
for
candidate
in
candidate_list
:
path
=
candidate
[
'path'
]
path
=
candidate
[
'path'
]
try
:
try
:
obj
ect
=
portal
.
restrictedTraverse
(
path
)
obj
=
portal
.
restrictedTraverse
(
path
)
except
KeyError
:
except
KeyError
:
# Object is unreachable, remove it from catalog
# Object is unreachable, remove it from catalog
# Use SQLQueue because all activities are triggered on the same object,
# Use SQLQueue because all activities are triggered on the same object,
...
@@ -21,7 +21,7 @@ for candidate in candidate_list:
...
@@ -21,7 +21,7 @@ for candidate in candidate_list:
catalog
.
activate
(
activity
=
"SQLQueue"
).
unindexObject
(
uid
=
candidate
[
'uid'
])
catalog
.
activate
(
activity
=
"SQLQueue"
).
unindexObject
(
uid
=
candidate
[
'uid'
])
unindex_count
+=
1
unindex_count
+=
1
else
:
else
:
obj
ect
.
reindexObject
()
obj
.
reindexObject
()
reindex_count
+=
1
reindex_count
+=
1
print
'%s object reindexed, %s object unindexed'
%
(
reindex_count
,
unindex_count
)
print
'%s object reindexed, %s object unindexed'
%
(
reindex_count
,
unindex_count
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.py
View file @
45f71807
activate_kw
=
{
"tag"
:
tag
}
activate_kw
=
{
"tag"
:
tag
}
folder
=
context
.
restrictedTraverse
(
folder_path
)
folder
=
context
.
restrictedTraverse
(
folder_path
)
method
=
getattr
(
context
,
method
)
method
=
getattr
(
context
,
method
)
for
id
in
id_list
:
for
id
_
in
id_list
:
ob
=
folder
.
get
(
id
)
ob
=
folder
.
get
(
id
_
)
new_id
=
method
(
ob
)
new_id
=
method
(
ob
)
ob
.
setDefaultActivateParameterDict
(
activate_kw
)
ob
.
setDefaultActivateParameterDict
(
activate_kw
)
ob
.
setId
(
new_id
)
ob
.
setId
(
new_id
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.py
View file @
45f71807
...
@@ -11,9 +11,9 @@ z_catalog_translation_list = sql_catalog.z_catalog_translation_list
...
@@ -11,9 +11,9 @@ z_catalog_translation_list = sql_catalog.z_catalog_translation_list
def
catalog_translation_list
(
object_list
):
def
catalog_translation_list
(
object_list
):
parameter_dict
=
{}
parameter_dict
=
{}
for
i
in
object_list
:
for
i
in
object_list
:
for
property
in
(
'language'
,
'message_context'
,
'portal_type'
,
for
property
_
in
(
'language'
,
'message_context'
,
'portal_type'
,
'original_message'
,
'translated_message'
):
'original_message'
,
'translated_message'
):
parameter_dict
.
setdefault
(
property
,
[]).
append
(
i
[
property
])
parameter_dict
.
setdefault
(
property
_
,
[]).
append
(
i
[
property_
])
z_catalog_translation_list
(
**
parameter_dict
)
z_catalog_translation_list
(
**
parameter_dict
)
# Translate every workflow state in the context of the state variable
# Translate every workflow state in the context of the state variable
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityAcquiredCategoryFromContent.py
View file @
45f71807
...
@@ -10,10 +10,10 @@ If unsure, you should use ERP5Type_getSecurityCategoryFromContent.
...
@@ -10,10 +10,10 @@ If unsure, you should use ERP5Type_getSecurityCategoryFromContent.
"""
"""
category_list
=
[]
category_list
=
[]
if
ob
ject
is
None
:
if
ob
is
None
:
return
[]
return
[]
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
category_list
.
append
({
base_category
:
ob
ject
.
getAcquiredCategoryMembershipList
(
base_category
)})
category_list
.
append
({
base_category
:
ob
.
getAcquiredCategoryMembershipList
(
base_category
)})
return
category_list
return
category_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityAcquiredCategoryFromContent.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.py
View file @
45f71807
...
@@ -3,4 +3,4 @@ log("ERP5Type_getSecurityCategoryFromArrow is deprecated, "
...
@@ -3,4 +3,4 @@ log("ERP5Type_getSecurityCategoryFromArrow is deprecated, "
"use ERP5Type_getSecurityCategoryFromContent instead"
)
"use ERP5Type_getSecurityCategoryFromContent instead"
)
return
context
.
ERP5Type_getSecurityCategoryFromContent
(
return
context
.
ERP5Type_getSecurityCategoryFromContent
(
base_category_list
,
user_name
,
ob
ject
,
portal_type
)
base_category_list
,
user_name
,
ob
,
portal_type
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromArrow.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromContent.py
View file @
45f71807
...
@@ -19,7 +19,7 @@ The parameters are
...
@@ -19,7 +19,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
@@ -27,10 +27,10 @@ NOTE: for now, this script requires proxy manager
...
@@ -27,10 +27,10 @@ NOTE: for now, this script requires proxy manager
category_list
=
[]
category_list
=
[]
if
ob
ject
is
None
:
if
ob
is
None
:
return
[]
return
[]
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
category_list
.
append
({
base_category
:
ob
ject
.
getCategoryMembershipList
(
base_category
)})
category_list
.
append
({
base_category
:
ob
.
getCategoryMembershipList
(
base_category
)})
return
category_list
return
category_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromContent.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.py
View file @
45f71807
...
@@ -14,7 +14,7 @@ The parameters are
...
@@ -14,7 +14,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
@@ -22,10 +22,10 @@ NOTE: for now, this script requires proxy manager
...
@@ -22,10 +22,10 @@ NOTE: for now, this script requires proxy manager
category_list
=
[]
category_list
=
[]
if
ob
ject
is
None
:
if
ob
is
None
:
return
[]
return
[]
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
category_list
.
append
({
base_category
:
ob
ject
.
getRelativeUrl
()})
category_list
.
append
({
base_category
:
ob
.
getRelativeUrl
()})
return
category_list
return
category_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromSelf.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromAssignment.py
View file @
45f71807
...
@@ -14,7 +14,7 @@ The parameters are
...
@@ -14,7 +14,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromAssignment.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromContent.py
View file @
45f71807
...
@@ -19,7 +19,7 @@ The parameters are
...
@@ -19,7 +19,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
@@ -27,11 +27,11 @@ NOTE: for now, this script requires proxy manager
...
@@ -27,11 +27,11 @@ NOTE: for now, this script requires proxy manager
category_list
=
[]
category_list
=
[]
if
ob
ject
is
None
:
if
ob
is
None
:
return
[]
return
[]
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
membership_list
=
map
(
lambda
x
:
'%s*'
%
x
,
object
.
getAcquiredCategoryMembershipList
(
base_category
))
membership_list
=
[
'%s*'
%
x
for
x
in
ob
.
getAcquiredCategoryMembershipList
(
base_category
)]
category_list
.
append
({
base_category
:
membership_list
})
category_list
.
append
({
base_category
:
membership_list
})
return
category_list
return
category_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityChildCategoryFromContent.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromAssignment.py
View file @
45f71807
...
@@ -14,7 +14,7 @@ The parameters are
...
@@ -14,7 +14,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromAssignment.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromContent.py
View file @
45f71807
...
@@ -19,7 +19,7 @@ The parameters are
...
@@ -19,7 +19,7 @@ The parameters are
base_category_list -- list of category values we need to retrieve
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
user_name -- string obtained from getSecurityManager().getUser().getId()
ob
ject
-- object which we want to assign roles to
ob
-- object which we want to assign roles to
portal_type -- portal type of object
portal_type -- portal type of object
NOTE: for now, this script requires proxy manager
NOTE: for now, this script requires proxy manager
...
@@ -27,13 +27,13 @@ NOTE: for now, this script requires proxy manager
...
@@ -27,13 +27,13 @@ NOTE: for now, this script requires proxy manager
category_list
=
[]
category_list
=
[]
if
ob
ject
is
None
:
if
ob
is
None
:
return
[]
return
[]
# Consider all parents of all categories
# Consider all parents of all categories
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
member_list
=
[]
member_list
=
[]
for
category
in
ob
ject
.
getAcquiredValueList
(
base_category
):
for
category
in
ob
.
getAcquiredValueList
(
base_category
):
if
category
.
getPortalType
()
==
'Category'
:
if
category
.
getPortalType
()
==
'Category'
:
while
category
.
getPortalType
()
==
'Category'
:
while
category
.
getPortalType
()
==
'Category'
:
member_list
.
append
(
category
.
getRelativeUrl
())
member_list
.
append
(
category
.
getRelativeUrl
())
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityParentCategoryFromContent.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_category_list, user_name, ob
ject
, portal_type
</string>
</value>
<value>
<string>
base_category_list, user_name, ob, portal_type
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.py
View file @
45f71807
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
selected_uids
=
context
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
context
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
uids
=
context
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
uids
=
context
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
# make sure nothing is checked after
# make sure nothing is checked after
context
.
portal_selections
.
setSelectionCheckedUidsFor
(
selection_name
,
[])
context
.
portal_selections
.
setSelectionCheckedUidsFor
(
selection_name
,
[])
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form_id, uids=
[], listbox_uid=[]
, selection_name=\'\'
</string>
</value>
<value>
<string>
form_id, uids=
(), listbox_uid=()
, selection_name=\'\'
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.py
View file @
45f71807
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
def
Object_hasRelation
(
object
):
context
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
# Check if there is some related objets.
result
=
0
for
o
in
object
.
getIndexableChildValueList
():
for
related
in
object
.
portal_categories
.
getRelatedValueList
(
object
):
if
related
.
getRelativeUrl
().
startswith
(
object
.
getRelativeUrl
()):
continue
elif
related
.
getRelativeUrl
().
startswith
(
'portal_simulation'
)
:
continue
else
:
result
=
1
break
return
result
selected_uids
=
context
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
uids
=
context
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
uids
=
context
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
# make sure nothing is checked after
# make sure nothing is checked after
context
.
portal_selections
.
setSelectionCheckedUidsFor
(
selection_name
,
[])
context
.
portal_selections
.
setSelectionCheckedUidsFor
(
selection_name
,
[])
...
@@ -28,7 +14,7 @@ if uids != []:
...
@@ -28,7 +14,7 @@ if uids != []:
object_used
=
0
object_used
=
0
object_list
=
[
x
.
getObject
()
for
x
in
context
.
portal_catalog
(
uid
=
uids
)]
object_list
=
[
x
.
getObject
()
for
x
in
context
.
portal_catalog
(
uid
=
uids
)]
object_used
=
sum
([
Object_hasRelation
(
x
)
for
x
in
object_list
])
object_used
=
sum
([
x
.
getRelationCountForDeletion
(
)
for
x
in
object_list
])
if
object_used
>
0
:
if
object_used
>
0
:
if
object_used
==
1
:
if
object_used
==
1
:
...
@@ -36,7 +22,6 @@ if uids != []:
...
@@ -36,7 +22,6 @@ if uids != []:
else
:
else
:
message
=
Base_translateString
(
"Sorry, ${count} items are in use."
,
message
=
Base_translateString
(
"Sorry, ${count} items are in use."
,
mapping
=
{
'count'
:
repr
(
object_used
)})
mapping
=
{
'count'
:
repr
(
object_used
)})
qs
=
'?portal_status_message=%s'
%
message
else
:
else
:
context
.
manage_cutObjects
(
uids
=
uids
,
REQUEST
=
request
)
context
.
manage_cutObjects
(
uids
=
uids
,
REQUEST
=
request
)
message
=
Base_translateString
(
"Items cut."
)
message
=
Base_translateString
(
"Items cut."
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form_id, selection_name=\'\', uids=
[], listbox_uid=[]
</string>
</value>
<value>
<string>
form_id, selection_name=\'\', uids=
(), listbox_uid=()
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.py
View file @
45f71807
...
@@ -53,18 +53,18 @@ if True:
...
@@ -53,18 +53,18 @@ if True:
object_to_remove_list
=
[]
object_to_remove_list
=
[]
object_to_delete_list
=
[]
object_to_delete_list
=
[]
for
obj
ect
in
object_list
:
for
obj
in
object_list
:
history_dict
=
obj
ect
.
Base_getWorkflowHistory
()
history_dict
=
obj
.
Base_getWorkflowHistory
()
history_dict
.
pop
(
'edit_workflow'
,
None
)
history_dict
.
pop
(
'edit_workflow'
,
None
)
if
history_dict
==
{}
or
obj
ect
.
aq_parent
.
portal_type
==
'Preference'
:
if
history_dict
==
{}
or
obj
.
aq_parent
.
portal_type
==
'Preference'
:
# templates inside preference will be unconditionnaly physically
# templates inside preference will be unconditionnaly physically
# deleted
# deleted
object_to_remove_list
.
append
(
obj
ect
)
object_to_remove_list
.
append
(
obj
)
else
:
else
:
# If a workflow manage a history,
# If a workflow manage a history,
# object should not be removed, but only put in state deleted
# object should not be removed, but only put in state deleted
object_to_delete_list
.
append
(
obj
ect
)
object_to_delete_list
.
append
(
obj
)
# Remove some objects
# Remove some objects
try
:
try
:
...
@@ -100,16 +100,15 @@ if True:
...
@@ -100,16 +100,15 @@ if True:
# Try to call "delete_action" workflow transition on documents which defined it
# Try to call "delete_action" workflow transition on documents which defined it
# Failure of such a call is not a failure globally. The document was deleted anyway
# Failure of such a call is not a failure globally. The document was deleted anyway
not_deleted_count
=
0
for
obj
in
object_to_delete_list
:
for
object
in
object_to_delete_list
:
# Hidden transition (without a message displayed)
# Hidden transition (without a message displayed)
# are not returned by getActionsFor
# are not returned by getActionsFor
try
:
try
:
portal
.
portal_workflow
.
doActionFor
(
obj
ect
,
'delete_action'
)
portal
.
portal_workflow
.
doActionFor
(
obj
,
'delete_action'
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
not_deleted_count
+=
1
pass
# make sure nothing is checked after
# make sure nothing is checked after
if
selection_name
:
if
selection_name
:
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_deleteObjectList.py
View file @
45f71807
...
@@ -2,8 +2,8 @@ request=context.REQUEST
...
@@ -2,8 +2,8 @@ request=context.REQUEST
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
selected_uids
=
context
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
portal
.
portal_selections
.
updateSelectionCheckedUidList
(
selection_name
,
listbox_uid
,
uids
)
uids
=
context
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
uids
=
portal
.
portal_selections
.
getSelectionCheckedUidsFor
(
selection_name
)
if
uids
==
[]:
if
uids
==
[]:
message
=
Base_translateString
(
"Please select one or more items to delete first."
)
message
=
Base_translateString
(
"Please select one or more items to delete first."
)
...
@@ -27,5 +27,5 @@ request.set('proxy_field_id', field_id)
...
@@ -27,5 +27,5 @@ request.set('proxy_field_id', field_id)
request
.
set
(
'proxy_field_selection_name'
,
field_selection_name
)
request
.
set
(
'proxy_field_selection_name'
,
field_selection_name
)
request
.
set
(
'ignore_hide_rows'
,
1
)
request
.
set
(
'ignore_hide_rows'
,
1
)
context
.
portal_selections
.
setSelectionParamsFor
(
'folder_delete_selection'
,
kw
)
portal
.
portal_selections
.
setSelectionParamsFor
(
'folder_delete_selection'
,
kw
)
return
context
.
Folder_viewDeleteDialog
(
uids
=
uids
,
REQUEST
=
request
)
return
context
.
Folder_viewDeleteDialog
(
uids
=
uids
,
REQUEST
=
request
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_deleteObjectList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection_index=None,
form_id=\'\',uids=[], listbox_uid=[],
selection_name=\'\'
</string>
</value>
<value>
<string>
selection_index=None,
form_id=\'\', uids=(), listbox_uid=(),
selection_name=\'\'
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
View file @
45f71807
request
=
cont
ext
.
REQUEST
request
=
cont
ainer
.
REQUEST
stool
=
context
.
portal_selections
s
election_
tool
=
context
.
portal_selections
if
stool
.
getSelectionInvertModeFor
(
selection_name
):
if
s
election_
tool
.
getSelectionInvertModeFor
(
selection_name
):
# if already in invert mode, toggle invert mode
# if already in invert mode, toggle invert mode
stool
.
setSelectionInvertModeFor
(
selection_name
,
invert_mode
=
0
)
s
election_
tool
.
setSelectionInvertModeFor
(
selection_name
,
invert_mode
=
0
)
else
:
else
:
# Set selection to currently checked items, taking into consideration changes
# Set selection to currently checked items, taking into consideration changes
# in uids
# in uids
selection_uids
=
stool
.
getSelectionCheckedUidsFor
(
selection_uids
=
s
election_
tool
.
getSelectionCheckedUidsFor
(
selection_name
,
REQUEST
=
request
)
selection_name
,
REQUEST
=
request
)
filtered_uid_dict
=
{}
filtered_uid_dict
=
{}
listbox_uid
=
map
(
lambda
x
:
int
(
x
),
listbox_uid
)
listbox_uid
=
[
int
(
x
)
for
x
in
listbox_uid
]
uids
=
map
(
lambda
x
:
int
(
x
),
uids
)
uids
=
[
int
(
x
)
for
x
in
uids
]
for
uid
in
uids
:
for
uid
in
uids
:
filtered_uid_dict
[
uid
]
=
1
filtered_uid_dict
[
uid
]
=
1
for
uid
in
selection_uids
:
for
uid
in
selection_uids
:
if
uid
in
listbox_uid
:
if
uid
in
listbox_uid
:
if
uid
in
uids
:
if
uid
in
uids
:
...
@@ -22,10 +22,10 @@ else:
...
@@ -22,10 +22,10 @@ else:
filtered_uid_dict
[
uid
]
=
1
filtered_uid_dict
[
uid
]
=
1
if
len
(
filtered_uid_dict
.
keys
())
>
0
:
if
len
(
filtered_uid_dict
.
keys
())
>
0
:
stool
.
checkAll
(
selection_name
,
uids
,
REQUEST
=
None
)
s
election_
tool
.
checkAll
(
selection_name
,
uids
,
REQUEST
=
None
)
stool
.
setSelectionToIds
(
selection_name
,
s
election_
tool
.
setSelectionToIds
(
selection_name
,
filtered_uid_dict
.
keys
(),
REQUEST
=
request
)
filtered_uid_dict
.
keys
(),
REQUEST
=
request
)
url
=
stool
.
getSelectionListUrlFor
(
url
=
s
election_
tool
.
getSelectionListUrlFor
(
selection_name
,
REQUEST
=
request
)
selection_name
,
REQUEST
=
request
)
request
.
RESPONSE
.
redirect
(
url
)
request
.
RESPONSE
.
redirect
(
url
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection_name, uids=
[], listbox_uid=[]
</string>
</value>
<value>
<string>
selection_name, uids=
(), listbox_uid=()
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_getContentListReportSectionList.py
View file @
45f71807
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Type.Message
import
Message
form
=
context
request
=
context
.
REQUEST
request
=
context
.
REQUEST
report_section_list
=
[]
report_section_list
=
[]
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_getDeleteObjectList.py
View file @
45f71807
...
@@ -9,9 +9,7 @@ if context.getPortalType() == 'Preference':
...
@@ -9,9 +9,7 @@ if context.getPortalType() == 'Preference':
result
.
append
(
i
)
result
.
append
(
i
)
return
result
return
result
else
:
else
:
return
list
(
# kw can contain limit, sort_on and similar runtime information
filter
(
lambda
x
:
x
.
getRelationCountForDeletion
()
==
0
,
# only docs WITHOUT relations can be deleted
object_list
=
[
x
.
getObject
()
for
x
in
context
.
portal_catalog
(
uid
=
uid
or
-
1
,
**
kw
)]
map
(
lambda
x
:
x
.
getObject
(),
# only docs WITHOUT relations can be deleted
context
.
portal_catalog
(
uid
=
uid
,
**
kw
))
# kw can contain limit, sort_on and similar runtime information
return
[
x
for
x
in
object_list
if
x
.
getRelationCountForDeletion
()
==
0
]
)
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
View file @
45f71807
...
@@ -6,7 +6,6 @@ This script is intended as a dialog target.
...
@@ -6,7 +6,6 @@ This script is intended as a dialog target.
:param listbox_uid: {list[int]} marks that this script takes objects from previous listbox as its input
:param listbox_uid: {list[int]} marks that this script takes objects from previous listbox as its input
:param mass_workflow_action: {str} the ID of (worflow) action to execute on each object
:param mass_workflow_action: {str} the ID of (worflow) action to execute on each object
"""
"""
MARKER
=
[]
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
request
=
kwargs
.
get
(
"REQUEST"
,
None
)
or
context
.
REQUEST
request
=
kwargs
.
get
(
"REQUEST"
,
None
)
or
context
.
REQUEST
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.py
View file @
45f71807
...
@@ -9,7 +9,7 @@ if context.cb_dataValid:
...
@@ -9,7 +9,7 @@ if context.cb_dataValid:
else
:
else
:
if
portal_type_set
.
issubset
(
context
.
getVisibleAllowedContentTypeList
()):
if
portal_type_set
.
issubset
(
context
.
getVisibleAllowedContentTypeList
()):
try
:
try
:
new_item_list
=
context
.
manage_pasteObjects
(
portal
.
REQUEST
[
'__cp'
])
context
.
manage_pasteObjects
(
portal
.
REQUEST
[
'__cp'
])
except
KeyError
:
except
KeyError
:
error_message
=
'Nothing to paste.'
error_message
=
'Nothing to paste.'
else
:
else
:
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_search.py
View file @
45f71807
...
@@ -2,11 +2,6 @@ request = container.REQUEST
...
@@ -2,11 +2,6 @@ request = container.REQUEST
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
NegatedQuery
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
NegatedQuery
,
ComplexQuery
def
sorted
(
seq
):
seq
=
[
x
for
x
in
seq
]
seq
.
sort
()
return
seq
# Convert mapping from request.form into something the catalog can understand
# Convert mapping from request.form into something the catalog can understand
# This script uses ad-hoc values that are understood by
# This script uses ad-hoc values that are understood by
# Folder_viewSearchDialog: x_value_ and x_usage_ are used to remember what was
# Folder_viewSearchDialog: x_value_ and x_usage_ are used to remember what was
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Planning_commonStats.py
deleted
100644 → 0
View file @
ef456975
"""
XXX temporary function to recover statistics when needed
=> will be put in an external script.
recover a list with temporary objects we want to apply stats on.
(can be object itself, list of direct sons, list of all sons using
recursive method, etc.)
Then take this special list of objects and return a list of special
temp_objects to display as blocks 'as they are'
"""
from
Products.ERP5Type.Log
import
log
from
Products.ERP5Type.Document
import
newTempMovement
as
newTempBase
from
string
import
zfill
# first recovering methods to apply on tasks
start_property_id
=
field
.
get_value
(
'x_start_bloc'
)
stop_property_id
=
field
.
get_value
(
'x_stop_bloc'
)
size_property_id
=
field
.
get_value
(
'y_size_block'
)
###########################################################
########### CREATING LIST OF TEMP STAT OBJECTS ############
###########################################################
# find a way to get all related objects with their sub-objects
# this list of objects must be stored in a list
# for now considering applying statistics on object_list
# XXX bug : can not apply getExceptionUidList() method on object_tree_line.
# <<unauthorized access>>
#selection.edit(exception_uid_list= object_tree_line.getExceptionUidList())
input_object_list
=
selection
(
method
=
list_method
,
context
=
selection_context
,
REQUEST
=
REQUEST
)
temp_object_list
=
[]
temp_object_id
=
0
# now applying statictic rule.
# for now statistic rules are static
for
input_object
in
input_object_list
:
# recovering input_object attributes
block_begin
=
input_object
.
getObject
().
getProperty
(
start_property_id
,
None
)
block_end
=
input_object
.
getObject
().
getProperty
(
stop_property_id
,
None
)
block_size
=
input_object
.
getObject
().
getProperty
(
size_property_id
,
None
)
if
block_begin
!=
None
and
block_end
!=
None
:
# do not create stat on non completed objects.
# prevent bug while size property is not defined on the object
if
block_size
==
None
:
block_size
=
block_end
-
block_begin
#updating block_size value
block_size
=
float
(
block_size
)
/
(
block_end
-
block_begin
)
# creating new object
temp_object
=
newTempBase
(
context
.
getPortalObject
(),
id
=
str
(
temp_object_id
),
uid
=
'new_%s'
%
zfill
(
temp_object_id
,
4
)
)
# editing object with new values
log
(
"%s"
%
(
","
.
join
([
start_property_id
,
str
(
block_begin
),
stop_property_id
,
str
(
block_end
),
size_property_id
,
str
(
block_size
)])))
temp_object
.
setProperty
(
start_property_id
,
block_begin
)
temp_object
.
setProperty
(
stop_property_id
,
block_end
)
temp_object
.
setProperty
(
size_property_id
,
block_size
)
# adding new object to list
temp_object_list
.
append
(
temp_object
)
temp_object_id
+=
1
###########################################################
################ BUILDING STATS ACTIVITES #################
###########################################################
# building a special list structure.
prop_list
=
[]
for
temp_stat
in
temp_object_list
:
block_begin
=
temp_stat
.
getProperty
(
start_property_id
)
block_end
=
temp_stat
.
getProperty
(
stop_property_id
)
block_size
=
temp_stat
.
getProperty
(
size_property_id
)
prop_list
.
append
([
block_begin
,
float
(
block_size
)])
prop_list
.
append
([
block_end
,
-
(
float
(
block_size
))])
# now sorting list to put start & stop in the right order
prop_list
.
sort
()
# now building new list of temp object with updated properties
size
=
0
temp_stat_object_list
=
[]
for
index
in
range
(
len
(
prop_list
)
-
1
):
# iterating all prop_list elements except the last one
current_prop
=
prop_list
[
index
]
size
+=
current_prop
[
1
]
# new size is relative to the previous size
start
=
current_prop
[
0
]
# current start
stop
=
prop_list
[
index
+
1
][
0
]
# current stop is the begining of the next block
temp_stat_object_id
=
0
if
size
>
0
:
# size is not null
# building new tempObject
temp_stat_object_id
+=
1
temp_stat_object
=
newTempBase
(
context
.
getPortalObject
(),
str
(
temp_stat_object_id
),
uid
=
'new_%s'
%
zfill
(
temp_stat_object_id
,
4
))
# editing object with new values
temp_stat_object
.
setProperty
(
start_property_id
,
start
)
temp_stat_object
.
setProperty
(
stop_property_id
,
stop
)
temp_stat_object
.
setProperty
(
size_property_id
,
size
)
# adding new object to list
temp_stat_object_list
.
append
(
temp_stat_object
)
temp_stat_object_id
+=
1
return
temp_stat_object_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Planning_commonStats.xml
deleted
100644 → 0
View file @
ef456975
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
_params
</string>
</key>
<value>
<string>
selection=None,list_method=None, selection_context=None, report_tree_list = None, object_tree_line=None, REQUEST=None, field=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Planning_commonStats
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.py
View file @
45f71807
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# - Implement validation of matrix fields
# - Implement validation of matrix fields
# - Implement validation of list fields
# - Implement validation of list fields
#
#
from
Products.Formulator.Errors
import
ValidationError
,
FormValidationError
from
Products.Formulator.Errors
import
FormValidationError
from
ZTUtils
import
make_query
from
ZTUtils
import
make_query
request
=
context
.
REQUEST
request
=
context
.
REQUEST
...
@@ -34,12 +34,12 @@ try:
...
@@ -34,12 +34,12 @@ try:
listbox_field
=
form
.
get_field
(
'listbox'
)
listbox_field
=
form
.
get_field
(
'listbox'
)
gv
=
{}
gv
=
{}
if
listbox_field
.
has_value
(
'global_attributes'
):
if
listbox_field
.
has_value
(
'global_attributes'
):
hidden_attributes
=
map
(
lambda
x
:
x
[
0
],
listbox_field
.
get_value
(
'global_attributes'
))
hidden_attributes
=
[
x
[
0
]
for
x
in
listbox_field
.
get_value
(
'global_attributes'
)]
for
k
in
hidden_attributes
:
for
k
in
hidden_attributes
:
gv
[
k
]
=
getattr
(
request
,
k
,
None
)
gv
[
k
]
=
getattr
(
request
,
k
,
None
)
for
property
,
v
in
listbox
.
items
():
for
property
_
,
v
in
listbox
.
items
():
v
.
update
(
gv
)
v
.
update
(
gv
)
context
.
setCriterion
(
property
,
**
v
)
context
.
setCriterion
(
property
_
,
**
v
)
# Update basic attributes
# Update basic attributes
context
.
edit
(
REQUEST
=
request
,
edit_order
=
edit_order
,
**
kw
)
context
.
edit
(
REQUEST
=
request
,
edit_order
=
edit_order
,
**
kw
)
context
.
reindexObject
()
context
.
reindexObject
()
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.py
View file @
45f71807
"""
"""
This script is used in parallel list fields in Predicate_view
This script is used in parallel list fields in Predicate_view
"""
"""
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
# Initialise result
# Initialise result
sub_field_list
=
[]
sub_field_list
=
[]
...
@@ -28,6 +30,4 @@ for category in category_list:
...
@@ -28,6 +30,4 @@ for category in category_list:
z
+=
1
z
+=
1
sub_field_list
.
append
(
new_dict
)
sub_field_list
.
append
(
new_dict
)
request
=
context
.
REQUEST
return
sub_field_list
return
sub_field_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportFormatItemList.py
View file @
45f71807
portal
=
context
.
getPortalObject
()
N_
=
portal
.
Base_translateString
request
=
container
.
REQUEST
request
=
container
.
REQUEST
style
=
request
.
get
(
'your_portal_skin'
,
style
=
request
.
get
(
'your_portal_skin'
,
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/RamCache_getCachePluginStatisticList.py
View file @
45f71807
...
@@ -7,7 +7,6 @@ from Products.ERP5Type.Document import newTempBase
...
@@ -7,7 +7,6 @@ from Products.ERP5Type.Document import newTempBase
# get all cache statistics
# get all cache statistics
cache_stats
=
context
.
getPortalObject
().
portal_caches
.
getCacheTotalMemorySize
()
cache_stats
=
context
.
getPortalObject
().
portal_caches
.
getCacheTotalMemorySize
()
cache_factory_list_stats
=
cache_stats
[
'stats'
]
cache_factory_list_stats
=
cache_stats
[
'stats'
]
cache_plugin_id
=
context
.
getId
()
cache_factory_id
=
context
.
getParentValue
().
getId
()
cache_factory_id
=
context
.
getParentValue
().
getId
()
cache_plugin_stats
=
cache_factory_list_stats
.
get
(
cache_plugin_stats
=
cache_factory_list_stats
.
get
(
cache_factory_id
,
cache_factory_id
,
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_hashVariationCategoryItemList.py
View file @
45f71807
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
# Remove empty items
# Remove empty items
item_list
=
filter
(
lambda
x
:
x
not
in
[(
''
,
''
),
[
''
,
''
]],
item_list
=
[
x
for
x
in
item_list
if
x
not
in
((
''
,
''
),
[
''
,
''
])]
item_list
)
sub_field_dict
=
{}
sub_field_dict
=
{}
split_depth
=
1
split_depth
=
1
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_hashVariationCategoryItemList.xml
View file @
45f71807
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_afterClone.py
View file @
45f71807
# nothing (we don't want to reset priority like in Preference_afterClone)
# nothing (we don't want to reset priority like in Preference_afterClone)
pass
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_downloadRepositoryBusinessTemplateList.py
View file @
45f71807
...
@@ -12,8 +12,8 @@ if len(uids) == 0:
...
@@ -12,8 +12,8 @@ if len(uids) == 0:
id_list
=
[]
id_list
=
[]
for
uid
in
uids
:
for
uid
in
uids
:
repository
,
id
=
context
.
decodeRepositoryBusinessTemplateUid
(
uid
)
repository
,
id
_
=
context
.
decodeRepositoryBusinessTemplateUid
(
uid
)
bt
=
context
.
download
(
'/'
.
join
([
repository
,
id
]))
bt
=
context
.
download
(
'/'
.
join
([
repository
,
id
_
]))
id_list
.
append
(
bt
.
getId
())
id_list
.
append
(
bt
.
getId
())
RESPONSE
.
redirect
(
"%s?portal_status_message=Business+Templates+Downloaded+As:+%s"
%
(
ret_url
,
',+'
.
join
(
id_list
)))
RESPONSE
.
redirect
(
"%s?portal_status_message=Business+Templates+Downloaded+As:+%s"
%
(
ret_url
,
',+'
.
join
(
id_list
)))
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_filterTupleDiff.py
View file @
45f71807
...
@@ -12,7 +12,7 @@ if len(old_line_list) == 4 and len(new_line_list) == 1 and \
...
@@ -12,7 +12,7 @@ if len(old_line_list) == 4 and len(new_line_list) == 1 and \
old_line_list
[
2
]
==
'<tuple/>'
and
\
old_line_list
[
2
]
==
'<tuple/>'
and
\
old_line_list
[
3
]
==
'</tuple>'
and
\
old_line_list
[
3
]
==
'</tuple>'
and
\
old_line_list
[
1
]
==
new_line_list
[
0
]:
old_line_list
[
1
]
==
new_line_list
[
0
]:
return
True
return
True
return
False
return
False
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.py
View file @
45f71807
...
@@ -3,7 +3,6 @@ update_catalog = update_translation = 0
...
@@ -3,7 +3,6 @@ update_catalog = update_translation = 0
bt_id_list
=
getattr
(
context
.
REQUEST
,
'bt_list'
,
())
bt_id_list
=
getattr
(
context
.
REQUEST
,
'bt_list'
,
())
bt_dict
=
{}
bt_dict
=
{}
object_to_update
=
{}
for
item
in
listbox
:
for
item
in
listbox
:
# backward compatibility
# backward compatibility
if
not
same_type
(
item
[
'choice'
],
[]):
if
not
same_type
(
item
[
'choice'
],
[]):
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installRepositoryBusinessTemplateList.py
View file @
45f71807
...
@@ -46,13 +46,13 @@ for uid in uids:
...
@@ -46,13 +46,13 @@ for uid in uids:
if
len
([
x
for
x
in
provider_list
if
x
in
title_list
])
==
0
:
if
len
([
x
for
x
in
provider_list
if
x
in
title_list
])
==
0
:
# No provider installed
# No provider installed
if
len
(
provider_list
)
==
1
:
if
len
(
provider_list
)
==
1
:
# When only one provider is possible, use it
# When only one provider is possible, use it
provider
=
provider_list
[
0
]
provider
=
provider_list
[
0
]
for
candidate
in
available_bt5_list
:
for
candidate
in
available_bt5_list
:
if
candidate
.
title
==
provider
:
if
candidate
.
title
==
provider
:
current_uid_list
.
append
(
candidate
.
uid
)
current_uid_list
.
append
(
candidate
.
uid
)
break
break
portal_status_message
+=
'
\
'
%s
\
'
added because
\
'
%s
\
'
depends on it.'
%
(
provider
,
bt5_title
)
portal_status_message
+=
'
\
'
%s
\
'
added because
\
'
%s
\
'
depends on it.'
%
(
provider
,
bt5_title
)
else
:
else
:
portal_status_message
+=
'
\
'
%s
\
'
requires you to select one of the following business templates: %s'
%
(
bt5_title
,
provider_list
)
portal_status_message
+=
'
\
'
%s
\
'
requires you to select one of the following business templates: %s'
%
(
bt5_title
,
provider_list
)
...
@@ -73,8 +73,8 @@ tuple_list = context.sortBusinessTemplateList(tuple_list)
...
@@ -73,8 +73,8 @@ tuple_list = context.sortBusinessTemplateList(tuple_list)
bt_list
=
[]
bt_list
=
[]
for
repository
,
id
in
tuple_list
:
for
repository
,
id
_
in
tuple_list
:
bt
=
context
.
download
(
'/'
.
join
([
repository
,
id
]))
bt
=
context
.
download
(
'/'
.
join
([
repository
,
id
_
]))
bt_list
.
append
(
bt
.
getId
())
bt_list
.
append
(
bt
.
getId
())
RESPONSE
.
redirect
(
RESPONSE
.
redirect
(
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
View file @
45f71807
...
@@ -12,7 +12,6 @@ from zExceptions import Unauthorized
...
@@ -12,7 +12,6 @@ from zExceptions import Unauthorized
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
portal_diff
=
portal
.
portal_diff
portal_diff
=
portal
.
portal_diff
request
=
context
.
REQUEST
request
=
context
.
REQUEST
object_revision_list
=
[]
history_size
=
portal
.
portal_preferences
.
getPreferredHtmlStyleZodbHistorySize
()
history_size
=
portal
.
portal_preferences
.
getPreferredHtmlStyleZodbHistorySize
()
first_object
=
None
first_object
=
None
...
@@ -105,7 +104,7 @@ if ((first_path is None and second_path is None) and
...
@@ -105,7 +104,7 @@ if ((first_path is None and second_path is None) and
first_object
=
selected_object_list
[
0
]
first_object
=
selected_object_list
[
0
]
second_object
=
selected_object_list
[
1
]
second_object
=
selected_object_list
[
1
]
# Use DiffTool to get the diff between the 2 objects
in object_revision_list List
.
# Use DiffTool to get the diff between the 2 objects.
# These 2 objects can be revisions of same object, 2 different revisions of
# These 2 objects can be revisions of same object, 2 different revisions of
# different objects or 2 current ERP5 object.
# different objects or 2 current ERP5 object.
if
first_object
and
second_object
:
if
first_object
and
second_object
:
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/scripts/checkConsistency.py
View file @
45f71807
object
=
state_change
[
'object'
]
state_change
[
'object'
].
Base_checkConsistency
()
object
.
Base_checkConsistency
()
product/ERP5/bootstrap/erp5_core/bt/skip_coding_style_test
deleted
100644 → 0
View file @
ef456975
1
\ No newline at end of file
product/ERP5Form/PlanningBox.py
View file @
45f71807
...
@@ -849,7 +849,7 @@ class PlanningBoxWidget(Widget.Widget):
...
@@ -849,7 +849,7 @@ class PlanningBoxWidget(Widget.Widget):
round_script
=
fields
.
StringField
(
'round_script'
,
round_script
=
fields
.
StringField
(
'round_script'
,
title
=
'Name of script rounding blocks during validation (ex. '
\
title
=
'Name of script rounding blocks during validation (ex. '
\
'
Planning_round
BoundToDay)'
,
'
Base_roundPlanningBox
BoundToDay)'
,
description
=
'script for block bounds rounding when validating'
,
description
=
'script for block bounds rounding when validating'
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment