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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
4029d75f
Commit
4029d75f
authored
Jan 05, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: use print function in python scripts
parent
0823548f
Changes
71
Hide whitespace changes
Inline
Side-by-side
Showing
71 changed files
with
260 additions
and
256 deletions
+260
-256
bt5/cloudooo_web/SkinTemplateItem/portal_skins/cloudooo_web/Document_getPropertiesAsJSON.py
...portal_skins/cloudooo_web/Document_getPropertiesAsJSON.py
+2
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.py
...counting/Alarm_checkPayableAndReceivableAccountGrouped.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_importGapFile.py
...teItem/portal_skins/erp5_accounting/Base_importGapFile.py
+2
-2
bt5/erp5_accounting_l10n_br_extend/SkinTemplateItem/portal_skins/erp5_accounting_l10n_br_extend/ERP5Site_fixBrazilianGapIds.py
..._accounting_l10n_br_extend/ERP5Site_fixBrazilianGapIds.py
+2
-2
bt5/erp5_accounting_l10n_br_sme/SkinTemplateItem/portal_skins/erp5_accounting_l10n_br_sme/ERP5Site_fixBrazilianGapIds.py
...rp5_accounting_l10n_br_sme/ERP5Site_fixBrazilianGapIds.py
+2
-2
bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/FiscalReport_doReport.py
...al_skins/erp5_accounting_l10n_pl/FiscalReport_doReport.py
+1
-1
bt5/erp5_accounting_l10n_pl_default_gap/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl_default_gap/AccountModule_createAccountFromGap.py
...l10n_pl_default_gap/AccountModule_createAccountFromGap.py
+2
-2
bt5/erp5_accounting_l10n_pl_default_gap/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl_default_gap/ERP5Site_createDefaultPlGap.py
...unting_l10n_pl_default_gap/ERP5Site_createDefaultPlGap.py
+1
-1
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ActivityTool_watchActivities.py
...skins/erp5_administration/ActivityTool_watchActivities.py
+4
-4
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_dumpUnreferencedSecurityUid.py
...s/erp5_administration/Base_dumpUnreferencedSecurityUid.py
+2
-2
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurity.py
...tem/portal_skins/erp5_administration/Base_viewSecurity.py
+18
-18
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurityMappingAsUser.py
...ins/erp5_administration/Base_viewSecurityMappingAsUser.py
+5
-5
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkFolderHandler.py
..._skins/erp5_administration/ERP5Site_checkFolderHandler.py
+1
-1
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpBuilderList.py
...tal_skins/erp5_administration/ERP5Site_dumpBuilderList.py
+10
-10
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpInstalledBusinessTemplateList.py
...inistration/ERP5Site_dumpInstalledBusinessTemplateList.py
+1
-1
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpOrderBuilderList.py
...kins/erp5_administration/ERP5Site_dumpOrderBuilderList.py
+11
-11
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalSkinsContent.py
...ns/erp5_administration/ERP5Site_dumpPortalSkinsContent.py
+2
-2
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeActionList.py
.../erp5_administration/ERP5Site_dumpPortalTypeActionList.py
+4
-4
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeList.py
..._skins/erp5_administration/ERP5Site_dumpPortalTypeList.py
+4
-4
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeRoleList.py
...ns/erp5_administration/ERP5Site_dumpPortalTypeRoleList.py
+4
-4
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPropertySheetList.py
...ins/erp5_administration/ERP5Site_dumpPropertySheetList.py
+4
-4
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpRuleTesterList.py
..._skins/erp5_administration/ERP5Site_dumpRuleTesterList.py
+11
-11
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpSkinProperty.py
...al_skins/erp5_administration/ERP5Site_dumpSkinProperty.py
+1
-1
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/SkinsTool_listRelationFieldWithRelationSetterId.py
...ration/SkinsTool_listRelationFieldWithRelationSetterId.py
+1
-1
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/TemplateTool_deleteObsoleteTemplateList.py
...administration/TemplateTool_deleteObsoleteTemplateList.py
+1
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_migrateToEmbeddedFile.py
.../portal_skins/erp5_base/ERP5Site_migrateToEmbeddedFile.py
+1
-1
bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_afterMaxmaDemoConfiguration.py
...demo/BusinessConfiguration_afterMaxmaDemoConfiguration.py
+2
-2
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.py
...ator_standard/BusinessConfiguration_afterConfiguration.py
+6
-6
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/ERP5Site_getTranslationMessageInConfiguratorUIAsPOT.py
...rd/ERP5Site_getTranslationMessageInConfiguratorUIAsPOT.py
+1
-1
bt5/erp5_configurator_standard_ui_test/SkinTemplateItem/portal_skins/erp5_configurator_standard_ui_test/Zuite_assertEndConfiguration.py
...igurator_standard_ui_test/Zuite_assertEndConfiguration.py
+2
-2
bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/FastInput_generateObjectStructure.py
...kins/erp5_consulting/FastInput_generateObjectStructure.py
+7
-7
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testProxyField.py
...emplateItem/portal_components/test.erp5.testProxyField.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_migrateEventWorkflowHistory.py
...skins/erp5_crm/EventModule_migrateEventWorkflowHistory.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_viewEmailReport.py
...tem/portal_skins/erp5_crm/PersonModule_viewEmailReport.py
+1
-1
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/ERP5Site_preConvertDocumentList.py
...dms_conversion_catalog/ERP5Site_preConvertDocumentList.py
+1
-1
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/Zuite_setupDMS.py
...plateItem/portal_skins/erp5_dms_ui_test/Zuite_setupDMS.py
+1
-1
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/Zuite_tearDownDMS.py
...teItem/portal_skins/erp5_dms_ui_test/Zuite_tearDownDMS.py
+5
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromPortalType.py
...ns/erp5_glossary/GlossaryModule_findTermFromPortalType.py
+2
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromPropertySheet.py
...erp5_glossary/GlossaryModule_findTermFromPropertySheet.py
+2
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromWorkflow.py
...kins/erp5_glossary/GlossaryModule_findTermFromWorkflow.py
+2
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.py
...em/portal_skins/erp5_glossary/GlossaryModule_getPOFile.py
+6
-6
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.py
...s/erp5_glossary/GlossaryModule_migrateLanguageProperty.py
+2
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_formatDiffObjectListToHTML.py
...tal_skins/erp5_toolbox/Base_formatDiffObjectListToHTML.py
+9
-9
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_formatDiffObjectListToText.py
...tal_skins/erp5_toolbox/Base_formatDiffObjectListToText.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_viewSimulationTree.py
...Item/portal_skins/erp5_toolbox/Base_viewSimulationTree.py
+7
-8
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Site_getToBeTranslatedMessageListFromEntireSystemAsPot.py
...Site_getToBeTranslatedMessageListFromEntireSystemAsPot.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Site_showAllUsedSelectionNames.py
..._skins/erp5_toolbox/ERP5Site_showAllUsedSelectionNames.py
+2
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Type_cloneRoleInformation.py
...ortal_skins/erp5_toolbox/ERP5Type_cloneRoleInformation.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDeadProxyFieldList.py
...tal_skins/erp5_toolbox/SkinsTool_getDeadProxyFieldList.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getNotAssignedFieldList.py
...l_skins/erp5_toolbox/SkinsTool_getNotAssignedFieldList.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getRelationStringFieldWithoutProxyListBoxIdOrColumns.py
...l_getRelationStringFieldWithoutProxyListBoxIdOrColumns.py
+3
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_listDuplicateSkins.py
...portal_skins/erp5_toolbox/SkinsTool_listDuplicateSkins.py
+4
-4
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsDiff.py
...eItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsDiff.py
+12
-12
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/AmortisationSystem_addAmortisationMethod.py
...mmobilisation/AmortisationSystem_addAmortisationMethod.py
+5
-5
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_ImmobilisationDelivery_addImmobilisationActions.py
...alType_ImmobilisationDelivery_addImmobilisationActions.py
+5
-5
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_ImmobilisationMovement_addAmortisationMethodActions.py
...pe_ImmobilisationMovement_addAmortisationMethodActions.py
+5
-5
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_Item_addImmobilisationActions.py
...mmobilisation/PortalType_Item_addImmobilisationActions.py
+5
-5
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDictAsJSON.py
...ledge_pad/KnowledgeBox_getDefaultPreferencesDictAsJSON.py
+1
-1
bt5/erp5_knowledge_pad_ui_test/SkinTemplateItem/portal_skins/erp5_knowledge_pad_ui_test/Zuite_setupGadgets.py
...al_skins/erp5_knowledge_pad_ui_test/Zuite_setupGadgets.py
+1
-1
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebManifest_createCloneFile.py
...rp5_officejs_appstore_base/WebManifest_createCloneFile.py
+7
-7
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/ERP5Site_printParameterAsHTMLTitle.py
...p5_officejs_ui_test/ERP5Site_printParameterAsHTMLTitle.py
+1
-1
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsText.py
...roll/PaySheetTransaction_viewPaySheetTransactionAsText.py
+3
-3
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_exportTaskReportListAsiCalendar.py
...oject/TaskReportModule_exportTaskReportListAsiCalendar.py
+14
-14
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_updateTestPageID.py
..._skins/erp5_run_my_doc/TestPageModule_updateTestPageID.py
+7
-7
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/ERP5Site_getTileImageMetadataList.py
...skins/erp5_safeimage/ERP5Site_getTileImageMetadataList.py
+1
-1
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
...rtal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
+1
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_afterComplete.py
...portal_skins/erp5_test_result/TestResult_afterComplete.py
+3
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_viewTestResultLineStdoutSet.py
...rp5_test_result/TestResult_viewTestResultLineStdoutSet.py
+1
-1
bt5/erp5_tiosafe_core/SkinTemplateItem/portal_skins/erp5_integration/IntegrationTestModule_createFormFromPropertySheet.py
...tion/IntegrationTestModule_createFormFromPropertySheet.py
+2
-2
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/ERP5Site_migrateData.py
...eItem/portal_skins/erp5_hr_record/ERP5Site_migrateData.py
+3
-3
bt5/erp5_web_project_ui_test/SkinTemplateItem/portal_skins/erp5_web_project_test/ERP5Site_createTestStartedProject.py
...rp5_web_project_test/ERP5Site_createTestStartedProject.py
+1
-1
No files found.
bt5/cloudooo_web/SkinTemplateItem/portal_skins/cloudooo_web/Document_getPropertiesAsJSON.py
View file @
4029d75f
...
...
@@ -26,9 +26,9 @@ informations = { 'processing': processing,
if
informations
[
'processing'
]
in
[
'converted'
,
'conversion_failed'
,
'empty'
]:
informations
[
'permanent_url'
]
=
document
.
Document_getPermanentUrl
()
print
dumps
(
informations
)
#print info before del object
print
(
dumps
(
informations
)
)
#print info before del object
portal
.
portal_sessions
.
manage_delObjects
(
reference
)
else
:
print
dumps
(
informations
)
print
(
dumps
(
informations
)
)
return
printed
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.py
View file @
4029d75f
...
...
@@ -35,7 +35,7 @@ search_params = dict(
for
brain
in
portal
.
portal_simulation
.
getInventoryList
(
**
search_params
):
if
round
(
brain
.
total_price
,
precision
)
==
0
:
print
'%s has a 0 balance but some not grouped transactions.'
%
brain
.
mirror_section_relative_url
print
(
'%s has a 0 balance but some not grouped transactions.'
%
brain
.
mirror_section_relative_url
)
if
fixit
:
tr
=
brain
.
getObject
().
getParentValue
()
grouped_line_list
=
tr
.
AccountingTransaction_guessGroupedLines
()
...
...
@@ -51,9 +51,9 @@ for brain in portal.portal_simulation.getInventoryList(**search_params):
portal_type
=
portal
.
getPortalAccountingMovementTypeList
(),
grouping_reference
=
None
,)
if
not
line
.
getObject
().
getGroupingReference
()])
if
grouped_line_list
:
print
'FIXED'
,
grouped_line_list
print
(
'FIXED %s'
%
grouped_line_list
)
else
:
print
'NOT FIXED'
print
(
'NOT FIXED'
)
active_result
=
ActiveResult
(
summary
=
context
.
getTitle
(),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_importGapFile.py
View file @
4029d75f
...
...
@@ -78,7 +78,7 @@ for property_dict in object_list:
gap
=
str
(
gap
)
if
gap
:
gap
=
gap
.
replace
(
'CLASSE '
,
''
)
print
'+ %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
print
(
'+ %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
)
path
=
root
b
=
''
for
a
in
gap
:
...
...
@@ -96,7 +96,7 @@ for path in existing_path_list:
description
=
document
.
getDescription
()
or
''
gap
=
document
.
getId
()
or
''
title
=
document
.
getTitle
()
or
''
print
'- %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
print
(
'- %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
)
document
.
getParentValue
().
deleteContent
(
document
.
getId
())
return
printed
bt5/erp5_accounting_l10n_br_extend/SkinTemplateItem/portal_skins/erp5_accounting_l10n_br_extend/ERP5Site_fixBrazilianGapIds.py
View file @
4029d75f
...
...
@@ -7,7 +7,7 @@ for cat in category_list:
cat
.
getObject
().
setId
(
newid
)
except
:
pass
print
newid
print
(
newid
)
print
'Categories Renamed'
print
(
'Categories Renamed'
)
return
printed
bt5/erp5_accounting_l10n_br_sme/SkinTemplateItem/portal_skins/erp5_accounting_l10n_br_sme/ERP5Site_fixBrazilianGapIds.py
View file @
4029d75f
...
...
@@ -7,7 +7,7 @@ for cat in category_list:
cat
.
getObject
().
setId
(
newid
)
except
:
pass
print
newid
print
(
newid
)
print
'Categories Renamed'
print
(
'Categories Renamed'
)
return
printed
bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/FiscalReport_doReport.py
View file @
4029d75f
...
...
@@ -48,7 +48,7 @@ dane.p59=dane.p55-dane.p56
if
debug
:
for
f
in
range
(
20
,
60
):
n
=
'p'
+
str
(
f
)
print
n
,
getattr
(
dane
,
n
)
print
(
n
,
getattr
(
dane
,
n
)
)
return
printed
return
container
[
report
].
index_html
(
REQUEST
=
context
.
REQUEST
,
RESPONSE
=
context
.
REQUEST
.
RESPONSE
,
dane
=
dane
)
bt5/erp5_accounting_l10n_pl_default_gap/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl_default_gap/AccountModule_createAccountFromGap.py
View file @
4029d75f
...
...
@@ -5,7 +5,7 @@ Warning: Before using this script as zope, edit account_workflow and give Manage
#This script will REMOVE any existing accounts!!!
#comment following if you are sure
print
'Nothing done!'
print
(
'Nothing done!'
)
return
printed
...
...
@@ -22,7 +22,7 @@ for category in gap_root.getCategoryMemberValueList():
acc
=
account_module
.
newContent
(
title
=
'%s %s'
%
(
category
.
getId
(),
category
.
getTitle
()),
\
gap_value
=
category
)
acc
.
validate
()
print
'acc created'
print
(
'acc created'
)
return
printed
bt5/erp5_accounting_l10n_pl_default_gap/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl_default_gap/ERP5Site_createDefaultPlGap.py
View file @
4029d75f
...
...
@@ -251,7 +251,7 @@ for line in gap_text.splitlines():
cpath
+=
n
path
.
append
(
cpath
)
parent
=
gap
.
restrictedTraverse
(
'/'
.
join
(
path
))
print
'Added to '
,
parent
print
(
'Added to '
,
parent
)
parent
.
newContent
(
id
=
num
,
title
=
descr
)
...
...
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ActivityTool_watchActivities.py
View file @
4029d75f
container
.
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/html'
)
print
'<html><head><meta http-equiv="refresh" content="%s"></head><body>'
%
refresh_interval
print
(
'<html><head><meta http-equiv="refresh" content="%s"></head><body>'
%
refresh_interval
)
for
table
in
'message'
,
'message_queue'
:
q
=
"""SELECT count(*) AS %(table)s, method_id, processing_node AS node, min(priority) AS min_pri, max(priority) AS max_pri
FROM %(table)s GROUP BY method_id, processing_node ORDER BY node"""
%
dict
(
table
=
table
)
print
"<table border=
\
"
\
"
style=
\
"
font-size:XX-small;
\
"
><tbody> <tr><th>%s</th> <th>method_id</th> <th>node</th> <th>min_pri</th> <th>max_pri</th> </tr>"
%
table
print
(
"<table border=
\
"
\
"
style=
\
"
font-size:XX-small;
\
"
><tbody> <tr><th>%s</th> <th>method_id</th> <th>node</th> <th>min_pri</th> <th>max_pri</th> </tr>"
%
table
)
for
row
in
context
.
cmf_activity_sql_connection
.
manage_test
(
q
):
print
'<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td</tr>'
%
(
row
[
table
],
row
[
'method_id'
],
row
[
'node'
],
row
[
'min_pri'
],
row
[
'max_pri'
]
)
print
'</tbody> </table> <br/>'
print
(
'<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td</tr>'
%
(
row
[
table
],
row
[
'method_id'
],
row
[
'node'
],
row
[
'min_pri'
],
row
[
'max_pri'
])
)
print
(
'</tbody> </table> <br/>'
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_dumpUnreferencedSecurityUid.py
View file @
4029d75f
...
...
@@ -10,14 +10,14 @@ for security_uid_field in security_uid_field_list:
print
(
">> useless uids in roles_and_users table <<
\
n
"
)
if
len
(
referenced_uid_set
)
>
0
:
for
row
in
req
(
"select * from roles_and_users where uid not in %s"
+
tuple
(
referenced_uid_set
)):
print
row
.
uid
,
row
.
local_roles_group_id
,
row
.
allowedRolesAndUsers
print
(
row
.
uid
,
row
.
local_roles_group_id
,
row
.
allowedRolesAndUsers
)
print
(
"
\
n
>> uids that should be in roles_and_users table <<
\
n
"
)
all_uid_set
=
{
row
.
uid
for
row
in
req
(
"select uid from roles_and_users"
)}
for
security_uid_field
in
security_uid_field_list
:
for
row
in
req
(
"select %s, relative_url from catalog where %s not in %s"
%
(
security_uid_field
,
security_uid_field
,
tuple
(
all_uid_set
))):
print
security_uid_field
,
getattr
(
row
,
security_uid_field
,
None
),
row
.
relative_url
print
(
security_uid_field
,
getattr
(
row
,
security_uid_field
,
None
),
row
.
relative_url
)
print
(
"
\
n
>> END <<"
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurity.py
View file @
4029d75f
...
...
@@ -6,18 +6,18 @@ u = getSecurityManager().getUser()
user_value
=
u
.
getUserValue
()
if
user_value
is
None
:
print
'User ID:'
,
u
.
getId
(
)
print
(
'User ID:'
,
u
.
getId
()
)
else
:
print
'User ID:'
,
u
.
getId
(),
user_value
.
getPath
(
)
print
(
'User ID:'
,
u
.
getId
(),
user_value
.
getPath
()
)
login_value
=
u
.
getLoginValue
()
if
login_value
is
None
:
print
'Login:'
,
u
.
getUserName
(
)
print
(
'Login:'
,
u
.
getUserName
()
)
else
:
print
'Login:'
,
u
.
getUserName
(),
login_value
.
getPath
(
)
print
'Is owner:'
,
u
.
allowed
(
context
,(
'Owner'
,
))
print
'User roles:'
,
u
.
getRoles
(
)
print
'User roles in context:'
,
u
.
getRolesInContext
(
context
)
print
'Permissions:'
print
(
'Login:'
,
u
.
getUserName
(),
login_value
.
getPath
()
)
print
(
'Is owner:'
,
u
.
allowed
(
context
,(
'Owner'
,)
))
print
(
'User roles:'
,
u
.
getRoles
()
)
print
(
'User roles in context:'
,
u
.
getRolesInContext
(
context
)
)
print
(
'Permissions:'
)
for
permission
in
[
'Access contents information'
,
'Add portal content'
,
...
...
@@ -26,25 +26,25 @@ for permission in [
'View'
,
'Manage portal'
,
]:
print
" "
,
permission
,
u
.
has_permission
(
permission
,
context
)
print
(
" "
,
permission
,
u
.
has_permission
(
permission
,
context
)
)
print
print
()
try
:
print
"User groups:
\
n
"
,
pformat
(
sorted
(
u
.
getGroups
(
)))
print
(
"User groups:
\
n
"
,
pformat
(
sorted
(
u
.
getGroups
()
)))
except
AttributeError
:
print
'no getGroups'
print
(
'no getGroups'
)
print
print
'Local roles on document:
\
n
'
,
pformat
(
context
.
get_local_roles
(
))
print
()
print
(
'Local roles on document:
\
n
'
,
pformat
(
context
.
get_local_roles
()
))
print
'''
print
(
'''
----------------
Security mapping
----------------'''
----------------'''
)
if
u
.
getId
()
is
not
None
:
try
:
print
context
.
Base_viewSecurityMappingAsUser
(
u
.
getId
(
))
print
(
context
.
Base_viewSecurityMappingAsUser
(
u
.
getId
()
))
except
Unauthorized
:
print
"user doesn't have permission to security mapping in this context"
print
(
"user doesn't have permission to security mapping in this context"
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurityMappingAsUser.py
View file @
4029d75f
...
...
@@ -16,12 +16,12 @@ for method_id, base_category_list in getSecurityCategoryMapping():
security_category_dict
.
setdefault
(
tuple
(
base_category_list
),
[]).
extend
(
getattr
(
context
,
method_id
)(
base_category_list
,
login
,
context
,
''
))
except
Exception
:
# XXX: it is not possible to log message with traceback from python script
print
'It was not possible to invoke method %s with base_category_list %s'
%
(
method_id
,
base_category_list
)
print
(
'It was not possible to invoke method %s with base_category_list %s'
%
(
method_id
,
base_category_list
)
)
for
base_category_list
,
category_value_list
in
security_category_dict
.
items
():
print
'base_category_list:'
,
base_category_list
print
(
'base_category_list: %s'
%
(
base_category_list
,))
for
category_dict
in
category_value_list
:
print
'-> category_dict:'
,
category_dict
print
'-->'
,
group_id_list_generator
(
category_order
=
base_category_list
,
**
category_dict
)
print
(
'-> category_dict: %s'
%
category_dict
)
print
(
'--> %s'
%
group_id_list_generator
(
category_order
=
base_category_list
,
**
category_dict
)
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkFolderHandler.py
View file @
4029d75f
...
...
@@ -20,7 +20,7 @@ if context.getPortalType() == 'Alarm':
else
:
active_process
=
context
.
portal_activities
.
newActiveProcess
().
getPath
()
ERP5Site_checkDataWithScript
=
context
.
portal_activities
.
ERP5Site_checkDataWithScript
print
'Results will be saved to %s'
%
active_process
print
(
'Results will be saved to %s'
%
active_process
)
checkTopLevel
()
ERP5Site_checkDataWithScript
(
...
...
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpBuilderList.py
View file @
4029d75f
for
builder
in
sorted
(
context
.
getPortalObject
().
portal_deliveries
.
contentValues
(),
key
=
lambda
x
:
x
.
getTitle
()):
print
builder
.
getId
(
)
print
" Title: %s"
%
(
builder
.
getTitle
(
))
print
" Simulation Select Method: %s"
%
(
builder
.
getSimulationSelectMethodId
(
))
print
" Delivery Select Method: %s"
%
(
builder
.
getDeliverySelectMethodId
(
))
print
" After Generation Script: %s"
%
(
builder
.
getDeliveryAfterGenerationScriptId
(
))
print
print
(
builder
.
getId
()
)
print
(
" Title: %s"
%
(
builder
.
getTitle
()
))
print
(
" Simulation Select Method: %s"
%
(
builder
.
getSimulationSelectMethodId
()
))
print
(
" Delivery Select Method: %s"
%
(
builder
.
getDeliverySelectMethodId
()
))
print
(
" After Generation Script: %s"
%
(
builder
.
getDeliveryAfterGenerationScriptId
()
))
print
()
for
mg
in
sorted
(
builder
.
contentValues
(),
key
=
lambda
x
:
x
.
getTitle
()):
print
builder
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
builder
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Id: %s"
%
mg
.
getId
(),
"Title: %s"
%
mg
.
getTitle
(),
"Type: %s"
%
mg
.
getPortalType
(),
...
...
@@ -17,7 +17,7 @@ for builder in sorted(context.getPortalObject().portal_deliveries.contentValues(
"Tested Properties: %r"
%
mg
.
getTestedPropertyList
(),
"Update Always: %r"
%
mg
.
isUpdateAlways
(),
)])
print
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpInstalledBusinessTemplateList.py
View file @
4029d75f
...
...
@@ -4,6 +4,6 @@ for business_template in sorted(context.getPortalObject().portal_templates.conte
key
=
lambda
x
:
x
.
getTitle
()):
if
business_template
.
getInstallationState
()
==
'installed'
and
\
business_template
.
getTitle
()
not
in
ignore_business_template_list
:
print
business_template
.
getTitle
(
)
print
(
business_template
.
getTitle
()
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpOrderBuilderList.py
View file @
4029d75f
for
builder
in
sorted
(
context
.
getPortalObject
().
portal_orders
.
contentValues
(),
key
=
lambda
x
:
x
.
getTitle
()):
print
builder
.
getId
(
)
print
" Title: %s"
%
(
builder
.
getTitle
(
))
print
" Simulation Select Method: %s"
%
(
builder
.
getSimulationSelectMethodId
(
))
print
" Delivery Select Method: %s"
%
(
builder
.
getDeliverySelectMethodId
(
))
print
" After Generation Script: %s"
%
(
builder
.
getDeliveryAfterGenerationScriptId
(
))
print
" Delivery Module Before Building Script: %s"
%
(
builder
.
getDeliveryModuleBeforeBuildingScriptId
(
))
print
print
(
builder
.
getId
()
)
print
(
" Title: %s"
%
(
builder
.
getTitle
()
))
print
(
" Simulation Select Method: %s"
%
(
builder
.
getSimulationSelectMethodId
()
))
print
(
" Delivery Select Method: %s"
%
(
builder
.
getDeliverySelectMethodId
()
))
print
(
" After Generation Script: %s"
%
(
builder
.
getDeliveryAfterGenerationScriptId
()
))
print
(
" Delivery Module Before Building Script: %s"
%
(
builder
.
getDeliveryModuleBeforeBuildingScriptId
()
))
print
()
for
mg
in
sorted
(
builder
.
contentValues
(),
key
=
lambda
x
:
x
.
getTitle
()):
print
builder
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
builder
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Id: %s"
%
mg
.
getId
(),
"Title: %s"
%
mg
.
getTitle
(),
"Type: %s"
%
mg
.
getPortalType
(),
...
...
@@ -18,7 +18,7 @@ for builder in sorted(context.getPortalObject().portal_orders.contentValues(),
"Tested Properties: %r"
%
mg
.
getTestedPropertyList
(),
"Update Always: %r"
%
mg
.
isUpdateAlways
(),
)])
print
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalSkinsContent.py
View file @
4029d75f
...
...
@@ -37,12 +37,12 @@ for skin_folder in portal.portal_skins.objectValues('Folder'):
for
skin
in
skin_folder
.
objectValues
():
if
skin
.
getId
()
in
ignore_skin_list
:
continue
print
getSkinHash
(
skin
,
skin_folder
)
print
(
getSkinHash
(
skin
,
skin_folder
)
)
if
include_workflow_scripts
:
for
workflow
in
portal
.
portal_workflow
.
objectValues
():
for
skin
in
workflow
.
scripts
.
objectValues
():
print
getSkinHash
(
skin
,
workflow
)
print
(
getSkinHash
(
skin
,
workflow
)
)
container
.
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/plain'
)
return
'
\
n
'
.
join
(
sorted
(
printed
.
splitlines
()))
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeActionList.py
View file @
4029d75f
for
ti
in
sorted
(
context
.
getPortalObject
().
portal_types
.
contentValues
(),
key
=
lambda
x
:
x
.
getId
()):
for
ai
in
sorted
(
ti
.
contentValues
(
portal_type
=
'Action Information'
),
key
=
lambda
x
:
x
.
getReference
()):
print
ti
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
ti
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Reference: %s"
%
ai
.
getReference
(),
"Title: %s"
%
ai
.
getTitle
(),
"Action: %s"
%
ai
.
getActionText
(),
...
...
@@ -9,7 +9,7 @@ for ti in sorted(context.getPortalObject().portal_types.contentValues(), key=lam
"Permission: %s"
%
ai
.
getActionPermission
(),
"Action Type: %s"
%
ai
.
getActionType
(),
"Visible: %s"
%
ai
.
getVisible
(),
"Index: %s"
%
ai
.
getFloatIndex
())])
print
"Index: %s"
%
ai
.
getFloatIndex
())])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeList.py
View file @
4029d75f
for
ti
in
sorted
(
context
.
getPortalObject
().
portal_types
.
contentValues
(),
key
=
lambda
x
:
x
.
getId
()):
print
ti
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
ti
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Short Title: %s"
%
ti
.
getShortTitle
(),
"Class: %s"
%
ti
.
getTypeClass
(),
"Init Script: %s"
%
ti
.
getTypeInitScriptId
(),
...
...
@@ -12,7 +12,7 @@ for ti in sorted(context.getPortalObject().portal_types.contentValues(), key=lam
"Hidden Content Types: %r"
%
sorted
(
ti
.
getTypeHiddenContentTypeList
()),
"Searchable Property: %r"
%
sorted
(
ti
.
getSearchableTextPropertyIdList
()),
"Searchable Method: %r"
%
sorted
(
ti
.
getSearchableTextMethodIdList
()),
)])
print
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPortalTypeRoleList.py
View file @
4029d75f
for
ti
in
sorted
(
context
.
getPortalObject
().
portal_types
.
contentValues
(),
key
=
lambda
x
:
x
.
getId
()):
for
ri
in
sorted
(
ti
.
contentValues
(
portal_type
=
'Role Information'
),
key
=
lambda
x
:(
x
.
getTitle
(),
x
.
getLocalRoleGroupId
(),
x
.
getRoleBaseCategoryScriptId
(),
x
.
getRoleBaseCategoryList
())):
print
ti
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
ti
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Title: %s"
%
ri
.
getTitle
(),
"Roles: %r"
%
ri
.
getRoleNameList
(),
"Condition: %s"
%
ri
.
getConditionText
(),
"Local Roles Group Id: %s"
%
ri
.
getLocalRoleGroupId
(),
"Base Categories: %r"
%
ri
.
getRoleBaseCategoryList
(),
"Base Category Script: %s"
%
ri
.
getRoleBaseCategoryScriptId
(),
"Categories: %r"
%
ri
.
getRoleCategoryList
()
)])
print
"Categories: %r"
%
ri
.
getRoleCategoryList
()
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpPropertySheetList.py
View file @
4029d75f
...
...
@@ -6,7 +6,7 @@ for ps in sorted(context.getPortalObject().portal_property_sheets.contentValues(
ps_id
=
ps
.
getId
()
if
ps_id
in
ignore_property_sheet_list
:
continue
print
ps
.
getId
(
)
print
(
ps
.
getId
()
)
info_list
=
[
'id'
,
'portal_type'
,
'reference'
]
std_prop_list
=
[
'elementary_type'
,
'property_default'
,
'storage_id'
,
'multivaluated'
,
'range'
,
'preference'
,
'read_permission'
,
'write_permission'
,
'translatable'
,
'translation_domain'
]
if
pd
.
getPortalType
()
==
'Standard Property'
:
...
...
@@ -29,10 +29,10 @@ for ps in sorted(context.getPortalObject().portal_property_sheets.contentValues(
elif
pd
.
getPortalType
().
endswith
(
'Constraint'
):
info_list
+=
[]
+
[
p
for
p
in
pd
.
propertyIds
()
if
p
.
startswith
(
'message'
)]
else
:
print
"(not supported)"
,
pd
.
getRelativeUrl
(),
pd
.
getPortalType
(
)
print
(
"(not supported)"
,
pd
.
getRelativeUrl
(),
pd
.
getPortalType
()
)
print
" "
,
"
\
n
"
.
join
([
'%s: %s'
%
(
prop
,
pd
.
getProperty
(
prop
))
for
prop
in
sorted
(
info_list
)]
)
print
print
(
" "
,
"
\
n
"
.
join
([
'%s: %s'
%
(
prop
,
pd
.
getProperty
(
prop
))
for
prop
in
sorted
(
info_list
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpRuleTesterList.py
View file @
4029d75f
...
...
@@ -2,17 +2,17 @@ for rule in sorted(context.getPortalObject().portal_rules.contentValues(),
key
=
lambda
x
:
x
.
getTitle
()):
if
rule
.
getValidationState
()
!=
'validated'
:
continue
print
rule
.
getId
(
)
print
" Title: %s"
%
(
rule
.
getTitle
(
))
print
" Trade Phases: %r"
%
(
rule
.
getTradePhaseList
(
))
print
" Test Method Id: %s"
%
(
rule
.
getTestMethodId
(
))
print
" Membership Criteria: %r"
%
(
rule
.
getMembershipCriterionBaseCategoryList
(
))
print
" Membership Criterion Category: %r"
%
(
rule
.
getMembershipCriterionCategoryList
(
))
print
print
(
rule
.
getId
()
)
print
(
" Title: %s"
%
(
rule
.
getTitle
()
))
print
(
" Trade Phases: %r"
%
(
rule
.
getTradePhaseList
()
))
print
(
" Test Method Id: %s"
%
(
rule
.
getTestMethodId
()
))
print
(
" Membership Criteria: %r"
%
(
rule
.
getMembershipCriterionBaseCategoryList
()
))
print
(
" Membership Criterion Category: %r"
%
(
rule
.
getMembershipCriterionCategoryList
()
))
print
()
for
tester
in
sorted
(
rule
.
contentValues
(),
key
=
lambda
x
:
x
.
getTitle
()):
print
rule
.
getId
(
)
print
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
print
(
rule
.
getId
()
)
print
(
" "
,
"
\
n
"
.
join
([
x
for
x
in
(
"Id: %s"
%
tester
.
getId
(),
"Title: %s"
%
tester
.
getTitle
(),
"Type: %s"
%
tester
.
getPortalType
(),
...
...
@@ -25,7 +25,7 @@ for rule in sorted(context.getPortalObject().portal_rules.contentValues(),
(
tester
.
getMembershipCriterionBaseCategoryList
()),
"Membership Criterion Category: %r"
%
(
tester
.
getMembershipCriterionCategoryList
()),
)])
print
)])
)
print
()
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_dumpSkinProperty.py
View file @
4029d75f
...
...
@@ -13,5 +13,5 @@ for name, layers in skin_tool.getSkinPaths():
if
ignore_skin_folder_list
is
not
None
and
\
layer
in
ignore_skin_folder_list
:
continue
print
'%s,%s'
%
(
name
,
layer
)
print
(
'%s,%s'
%
(
name
,
layer
)
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/SkinsTool_listRelationFieldWithRelationSetterId.py
View file @
4029d75f
...
...
@@ -13,6 +13,6 @@ for field_path, field in context.ZopeFind(
relation_setter_id
=
field
.
get_value
(
'relation_setter_id'
)
if
relation_setter_id
:
print
field_path
,
relation_setter_id
print
(
field_path
,
relation_setter_id
)
return
printed
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/TemplateTool_deleteObsoleteTemplateList.py
View file @
4029d75f
...
...
@@ -16,6 +16,6 @@ for bt in bt_list:
delete_list
.
append
(
bt_id
)
break
print
'Deleted id list:%r'
%
delete_list
print
(
'Deleted id list:%r'
%
delete_list
)
portal_templates
.
manage_delObjects
(
delete_list
)
return
printed
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_migrateToEmbeddedFile.py
View file @
4029d75f
...
...
@@ -8,5 +8,5 @@ context.ERP5Site_checkDataWithScript("Base_migrateToEmbeddedFile",
active_process
=
active_process
.
getPath
(),
method_kw
=
dict
(
force
=
1
))
print
"Migration started with process id: %s"
%
active_process
.
getPath
(
)
print
(
"Migration started with process id: %s"
%
active_process
.
getPath
()
)
return
printed
bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_afterMaxmaDemoConfiguration.py
View file @
4029d75f
...
...
@@ -68,11 +68,11 @@ for business_application_category_id, module_ids in module_business_application_
if
module
is
not
None
:
module
.
edit
(
business_application
=
business_application_category_id
)
print
"Indexing translations"
print
(
"Indexing translations"
)
portal
.
ERP5Site_updateTranslationTable
()
# clear cache so user security is recalculated
portal
.
portal_caches
.
clearAllCache
()
print
"Clear cache."
print
(
"Clear cache."
)
log
(
"%s"
%
printed
)
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.py
View file @
4029d75f
...
...
@@ -12,7 +12,7 @@ if business_template is not None:
filter
=
dict
(
portal_type
=
portal_type
))
for
module
in
module_list
:
module
.
updateLocalRolesOnSecurityGroups
()
print
"Updated Role Mappings for: %s(%s) "
%
(
module
.
getTitle
(),
module
.
getPortalType
(
))
print
(
"Updated Role Mappings for: %s(%s) "
%
(
module
.
getTitle
(),
module
.
getPortalType
()
))
# validate and open all objects
for
path
in
business_template
.
getTemplatePathList
():
...
...
@@ -22,16 +22,16 @@ if business_template is not None:
if
obj
.
getPortalType
()
not
in
(
'Category'
,
'Base Category'
,):
obj
.
updateLocalRolesOnSecurityGroups
()
print
"Updated Role Mappings for: "
,
path
,
obj
.
getPortalType
(
)
print
(
"Updated Role Mappings for: "
,
path
,
obj
.
getPortalType
()
)
if
obj
.
getPortalType
()
in
(
'Person'
,
'Organisation'
):
for
period
in
obj
.
contentValues
(
filter
=
{
'portal_type'
:
'Accounting Period'
}):
period
.
updateLocalRolesOnSecurityGroups
()
print
"
\
t
Open (Accounting Period): "
,
period
.
getRelativeUrl
(
)
print
(
"
\
t
Open (Accounting Period): "
,
period
.
getRelativeUrl
()
)
for
assignment
in
obj
.
contentValues
(
filter
=
{
'portal_type'
:
'Assignment'
}):
assignment
.
updateLocalRolesOnSecurityGroups
()
print
"
\
t
Open (assignment): "
,
assignment
.
getRelativeUrl
(
)
print
(
"
\
t
Open (assignment): "
,
assignment
.
getRelativeUrl
()
)
for
solver_type
in
context
.
portal_solvers
.
objectValues
():
solver_type
.
updateLocalRolesOnSecurityGroups
()
...
...
@@ -96,11 +96,11 @@ if osoe_runner_website is not None:
available_language_list
=
list
(
portal
.
Localizer
.
get_supported_languages
())
osoe_runner_website
.
edit
(
available_language_set
=
available_language_list
)
print
"Indexing translations"
print
(
"Indexing translations"
)
portal
.
ERP5Site_updateTranslationTable
()
# clear cache so user security is recalculated
portal
.
portal_caches
.
clearAllCache
()
print
"Clear cache."
print
(
"Clear cache."
)
log
(
"%s"
%
printed
)
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/ERP5Site_getTranslationMessageInConfiguratorUIAsPOT.py
View file @
4029d75f
...
...
@@ -141,7 +141,7 @@ for message in message_list:
comment_list
=
message_dict
[
message
]
comment_list
.
sort
()
comment
=
'
\
n
'
.
join
([(
'#: %s'
%
i
)
for
i
in
comment_list
])
print
MESSAGE_TEMPLATE
%
(
comment
,
formatText
(
message
))
print
(
MESSAGE_TEMPLATE
%
(
comment
,
formatText
(
message
)
))
context
.
REQUEST
.
RESPONSE
.
setHeader
(
'Content-Type'
,
'text/plain'
)
...
...
bt5/erp5_configurator_standard_ui_test/SkinTemplateItem/portal_skins/erp5_configurator_standard_ui_test/Zuite_assertEndConfiguration.py
View file @
4029d75f
...
...
@@ -8,10 +8,10 @@ message_list = ["Configuration is over. Enjoy your new ERP5 system!",
portal
.
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/plain'
)
for
message
in
message_list
:
if
not
message
in
html_status_report
:
print
"Error: {message} not found in status report"
.
format
(
message
=
message
)
print
(
"Error: {message} not found in status report"
.
format
(
message
=
message
)
)
for
log
in
portal
.
error_log
.
getLogEntries
():
print
"Error: {type} {value} {tb_text}"
.
format
(
**
log
)
print
(
"Error: {type} {value} {tb_text}"
.
format
(
**
log
)
)
if
str
(
printed
):
return
printed
...
...
bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/FastInput_generateObjectStructure.py
View file @
4029d75f
...
...
@@ -201,7 +201,7 @@ for serie in series_list:
# the last element must be saved
data_groups
.
append
(
new_group
)
print
data_groups
print
(
data_groups
)
# [
...
...
@@ -236,24 +236,24 @@ def aggregate(big_list, item_to_add):
if
big_list
==
[]:
return
[]
if
getListLevel
(
big_list
)
==
getListLevel
(
item_to_add
):
print
"big_list "
+
big_list
print
"item_to_add "
+
item_to_add
print
(
"big_list "
+
big_list
)
print
(
"item_to_add "
+
item_to_add
)
big_list
.
append
(
item_to_add
)
return
big_list
else
:
new_big_list_sub_level
=
aggregate
(
getLastSubList
(
big_list
),
item_to_add
)
print
"new_big_list_sub_level "
+
new_big_list_sub_level
print
"big_list "
+
big_list
print
(
"new_big_list_sub_level "
+
new_big_list_sub_level
)
print
(
"big_list "
+
big_list
)
return
None
#setLastSubList(big_list, new_big_list_sub_level)
for
group
in
data_groups
:
collapsed_group
=
group
[
0
]
for
serie_group
in
group
[
1
:]:
print
serie_group
print
(
serie_group
)
collapsed_group
=
aggregate
(
collapsed_group
,
serie_group
)
print
collapsed_group
print
(
collapsed_group
)
# if
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testProxyField.py
View file @
4029d75f
...
...
@@ -289,7 +289,7 @@ class TestProxyField(ERP5TypeTestCase):
python_script_id
=
"ERP5Site_testAccessProxyFieldProperty"
python_script_parameter
=
"proxy_field"
python_script_body
=
"""
print
proxy_field.getRecursiveTemplateField().meta_type
print
(proxy_field.getRecursiveTemplateField().meta_type)
return printed
"""
skin_folder
.
manage_addProduct
[
'PythonScripts'
].
manage_addPythonScript
(
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_migrateEventWorkflowHistory.py
View file @
4029d75f
...
...
@@ -6,5 +6,5 @@ portal.event_module.recurseCallMethod(
group_method_cost
=
1
),
min_depth
=
1
,
max_depth
=
1
)
print
"Migration started with process id: %s"
%
active_process
.
getPath
(
)
print
(
"Migration started with process id: %s"
%
active_process
.
getPath
()
)
return
printed
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_viewEmailReport.py
View file @
4029d75f
...
...
@@ -6,6 +6,6 @@ object_list = list(context.portal_catalog(parent_uid=uids, portal_type = "Email
for
o
in
object_list
:
o_value
=
o
.
getObject
()
if
o
is
not
None
:
print
o_value
.
getUrlString
(
)
print
(
o_value
.
getUrlString
()
)
return
printed
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/ERP5Site_preConvertDocumentList.py
View file @
4029d75f
...
...
@@ -8,5 +8,5 @@ context.ERP5Site_checkDataWithScript("Base_callPreConvert",
tag
=
"pre_convert"
,
packet
=
2
,
id_list
=
[
"document_module"
,
"image_module"
,
"web_page_module"
])
print
"OK"
print
(
"OK"
)
return
printed
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/Zuite_setupDMS.py
View file @
4029d75f
...
...
@@ -42,5 +42,5 @@ tiolive_logo_image = context.portal_catalog.getResultValue(
if
tiolive_logo_image
is
not
None
and
tiolive_logo_image
.
getValidationState
()
==
'published'
:
tiolive_logo_image
.
reject
()
print
"Done"
print
(
"Done"
)
return
printed
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/Zuite_tearDownDMS.py
View file @
4029d75f
...
...
@@ -2,5 +2,9 @@
#portal_preferences = context.portal_preferences
#portal_preferences.manage_delObjects(['dms_system_preference_ui_tests', 'dms_preference_ui_tests'])
#context.portal_caches.clearAllCache()
print
"Done"
# Delete System Preference
#portal_preferences = context.portal_preferences
#portal_preferences.manage_delObjects(['dms_system_preference_ui_tests', 'dms_preference_ui_tests'])
#context.portal_caches.clearAllCache()
print
(
"Done"
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromPortalType.py
View file @
4029d75f
...
...
@@ -2,10 +2,10 @@ result = context.GlossaryModule_getTermDictListFromPortalType(portal_type_list)
if
export_tsv
:
for
i
in
result
:
print
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
print
(
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
i
[
'business_field'
],
i
[
'title'
],
i
[
'description'
],
i
[
'field_path'
])])
i
[
'field_path'
])])
)
return
printed
else
:
portal_catalog
=
context
.
portal_catalog
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromPropertySheet.py
View file @
4029d75f
...
...
@@ -2,10 +2,10 @@ result = context.GlossaryModule_getTermDictListFromPropertySheet(property_sheet_
if
export_tsv
:
for
i
in
result
:
print
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
print
(
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
i
[
'business_field'
],
i
[
'title'
],
i
[
'description'
],
i
[
'field_path'
])])
i
[
'field_path'
])])
)
return
printed
else
:
portal_catalog
=
context
.
portal_catalog
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_findTermFromWorkflow.py
View file @
4029d75f
...
...
@@ -3,10 +3,10 @@ result = context.GlossaryModule_getTermDictListFromWorkflow(template_list)
if
export_tsv
:
for
i
in
result
:
print
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
print
(
'
\
t
'
.
join
([
'"%s"'
%
x
for
x
in
(
i
[
'reference'
],
i
[
'language'
],
i
[
'business_field'
],
i
[
'title'
],
i
[
'description'
],
i
[
'workflow_id'
])])
i
[
'workflow_id'
])])
)
return
printed
else
:
portal_catalog
=
context
.
portal_catalog
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.py
View file @
4029d75f
...
...
@@ -24,7 +24,7 @@ def formatString(string):
# po header
now
=
DateTime
().
toZone
(
'UTC'
).
strftime
(
"%Y-%m-%d %H:%M+0000"
)
print
MESSAGE_TEMPLATE
%
(
dict
(
english
=
'""'
,
print
(
MESSAGE_TEMPLATE
%
(
dict
(
english
=
'""'
,
translation
=
r'''"Project-Id-Version: ERP5 Localized Interface\n"
"POT-Creation-Date: %s\n"
...
...
@@ -34,7 +34,7 @@ r'''"Project-Id-Version: ERP5 Localized Interface\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
'''
%
(
now
,
now
,
language
)))
'''
%
(
now
,
now
,
language
)))
)
catalog
=
context
.
portal_catalog
for
i
in
catalog
(
portal_type
=
'Glossary Term'
,
...
...
@@ -63,18 +63,18 @@ for i in catalog(portal_type='Glossary Term',
if
not
english_title
:
raise
ValueError
(
'Title of corresponding English term(%s) to "%s" is empty.'
%
(
english_relative_url
,
translated_title
))
if
translated_title
!=
english_title
:
print
formatMessage
(
english
=
formatString
(
english_title
),
print
(
formatMessage
(
english
=
formatString
(
english_title
),
translation
=
formatString
(
translated_title
),
term
=
term
)
term
=
term
)
)
if
translated_description
:
if
not
english_description
:
raise
ValueError
(
'Description of corresponding English term(%s) to "%s" is empty.'
%
(
english_relative_url
,
translated_description
))
if
translated_description
!=
english_description
:
print
formatMessage
(
english
=
formatString
(
english_description
),
print
(
formatMessage
(
english
=
formatString
(
english_description
),
translation
=
formatString
(
translated_description
),
term
=
term
)
term
=
term
)
)
RESPONSE
=
context
.
REQUEST
.
RESPONSE
RESPONSE
.
setHeader
(
'Content-disposition'
,
'attachment;filename=translation.po'
)
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.py
View file @
4029d75f
...
...
@@ -5,6 +5,6 @@ for i in context.getPortalObject().glossary_module.objectValues():
lang
=
lang_list
[
0
]
i
.
setLanguage
(
lang
)
i
.
setCategoryList
([
x
for
x
in
i
.
categories
if
not
x
.
startswith
(
'language/'
)])
print
i
.
getPath
(),
lang
print
'Migration finished.'
print
(
i
.
getPath
(),
lang
)
print
(
'Migration finished.'
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_formatDiffObjectListToHTML.py
View file @
4029d75f
...
...
@@ -22,28 +22,28 @@ for diff_object in sortDiffObjectList(diff_object_list):
if
getattr
(
diff_object
,
"error"
,
None
)
is
not
None
:
print
(
"<p>"
)
print
(
"Error"
)
print
(
"(%s) -"
%
html_quote
(
diff_object
.
object_class
))
print
(
(
"(%s) -"
%
html_quote
(
diff_object
.
object_class
)
))
if
diff_object
.
object_class
in
link_configuration
:
print
(
link_configuration
[
diff_object
.
object_class
]
%
{
"object_id"
:
html_quote
(
diff_object
.
object_id
)}
)
print
(
(
link_configuration
[
diff_object
.
object_class
]
%
{
"object_id"
:
html_quote
(
diff_object
.
object_id
)})
)
else
:
print
(
html_quote
(
diff_object
.
object_id
))
print
(
(
html_quote
(
diff_object
.
object_id
)
))
print
(
"</p>"
)
if
detailed
:
print
(
"<p>"
)
print
(
html_quote
(
diff_object
.
error
))
print
(
(
html_quote
(
diff_object
.
error
)
))
print
(
"</p>"
)
else
:
print
(
"<p>"
)
print
(
html_quote
(
diff_object
.
object_state
))
print
(
"(%s) -"
%
html_quote
(
diff_object
.
object_class
))
print
(
(
html_quote
(
diff_object
.
object_state
)
))
print
(
(
"(%s) -"
%
html_quote
(
diff_object
.
object_class
)
))
if
diff_object
.
object_class
in
link_configuration
:
print
(
link_configuration
[
diff_object
.
object_class
]
%
{
"object_id"
:
html_quote
(
diff_object
.
object_id
)}
)
print
(
(
link_configuration
[
diff_object
.
object_class
]
%
{
"object_id"
:
html_quote
(
diff_object
.
object_id
)})
)
else
:
print
(
html_quote
(
diff_object
.
object_id
))
print
(
(
html_quote
(
diff_object
.
object_id
)
))
print
(
"</p>"
)
if
detailed
and
getattr
(
diff_object
,
"data"
,
None
)
is
not
None
:
print
(
"<div>"
)
print
(
DiffFile
(
diff_object
.
data
).
toHTML
(
))
print
(
(
DiffFile
(
diff_object
.
data
).
toHTML
()
))
print
(
"</div>"
)
print
(
"</div>"
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_formatDiffObjectListToText.py
View file @
4029d75f
...
...
@@ -2,14 +2,14 @@ def sortDiffObjectList(diff_object_list):
return
sorted
(
diff_object_list
,
key
=
lambda
x
:
(
x
.
object_state
,
x
.
object_class
,
x
.
object_id
))
for
diff_object
in
sortDiffObjectList
(
diff_object_list
):
print
(
"%s (%s) - %s"
%
(
diff_object
.
object_state
,
diff_object
.
object_class
,
diff_object
.
object_id
))
print
(
(
"%s (%s) - %s"
%
(
diff_object
.
object_state
,
diff_object
.
object_class
,
diff_object
.
object_id
)
))
if
getattr
(
diff_object
,
"error"
,
None
)
is
not
None
:
if
detailed
:
print
(
" %s"
%
diff_object
.
error
)
print
(
(
" %s"
%
diff_object
.
error
)
)
print
(
""
)
else
:
if
detailed
and
getattr
(
diff_object
,
"data"
,
None
)
is
not
None
:
print
(
"%s"
%
diff_object
.
data
.
lstrip
(
))
print
(
(
"%s"
%
diff_object
.
data
.
lstrip
()
))
print
(
""
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/Base_viewSimulationTree.py
View file @
4029d75f
# License: GPL
# Author: Lukasz Nowak <lukasz.nowak@ventis.com.pl>
# Copyright 2007 Ventis s. c.
simulations_found
=
context
.
Base_getSimulationTree
(
start_path
=
start_path
)
if
len
(
simulations_found
)
==
0
:
print
'No simulations related'
print
(
'No simulations related'
)
else
:
for
simulation_root
in
simulations_found
.
iterkeys
()
:
print
simulation_root
for
simulation_root
in
simulations_found
:
print
(
simulation_root
)
for
simulation
in
simulations_found
[
simulation_root
]:
print
'
\
t
'
,
simulation
.
getPath
(),
simulation
.
getPortalType
(),
print
(
'
\
t
'
,
simulation
.
getPath
(),
simulation
.
getPortalType
(),
end
=
' '
)
if
simulation
.
getPortalType
()
==
'Simulation Movement'
:
print
simulation
.
getCausalityState
(),
print
(
simulation
.
getCausalityState
(),
end
=
' '
)
else
:
print
'nostate'
,
print
simulation
.
getCategoriesList
(
)
print
(
'nostate'
,
end
=
' '
)
print
(
simulation
.
getCategoriesList
()
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Site_getToBeTranslatedMessageListFromEntireSystemAsPot.py
View file @
4029d75f
...
...
@@ -172,10 +172,10 @@ def formatString(string):
else
:
return
'
\
n
'
.
join
([
'""'
]
+
[
formatString
(
i
)
for
i
in
line_list
])
print
'''msgid ""
print
(
'''msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
'''
'''
)
MESSAGE_TEMPLATE
=
'''
\
%s
...
...
@@ -188,7 +188,7 @@ for message in message_list:
comment_list
=
message_dict
[
message
]
comment_list
.
sort
()
comment
=
'
\
n
'
.
join
([(
'#: %s'
%
i
)
for
i
in
comment_list
])
print
MESSAGE_TEMPLATE
%
(
comment
,
formatString
(
message
))
print
(
MESSAGE_TEMPLATE
%
(
comment
,
formatString
(
message
)
))
RESPONSE
=
context
.
REQUEST
.
RESPONSE
RESPONSE
.
setHeader
(
'Content-disposition'
,
'attachment;filename=translation.pot'
)
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Site_showAllUsedSelectionNames.py
View file @
4029d75f
...
...
@@ -48,7 +48,7 @@ recurse(o, callback, seldict)
for
selection_name
in
seldict
.
keys
():
if
len
(
seldict
[
selection_name
])
!=
1
or
all_selections
:
print
"'%s' [%s]"
%
(
selection_name
,
len
(
seldict
[
selection_name
]
))
print
(
"'%s' [%s]"
%
(
selection_name
,
len
(
seldict
[
selection_name
])
))
for
form_name
in
seldict
[
selection_name
]:
print
"
\
t
%s"
%
(
form_name
,
)
print
(
"
\
t
%s"
%
(
form_name
,)
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/ERP5Type_cloneRoleInformation.py
View file @
4029d75f
...
...
@@ -3,12 +3,12 @@
from
erp5.component.module.Log
import
log
log
(
"Obsolete script, please use BaseType_copyRoleList instead"
)
print
'cloning role information from'
print
from_type
print
(
'cloning role information from'
)
print
(
from_type
)
if
to_type_list
==
():
to_type_list
=
(
to_type
,)
print
"to"
,
to_type_list
print
(
"to"
,
to_type_list
)
context
.
portal_types
[
from_type
].
BaseType_copyRoleList
(
remove_existing_roles
=
True
,
portal_type_list
=
to_type_list
)
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDeadProxyFieldList.py
View file @
4029d75f
...
...
@@ -2,11 +2,11 @@
"""
portal_skin
=
context
.
REQUEST
.
get
(
'portal_skin'
,
'View'
)
print
"<html>"
print
(
"<html>"
)
for
field_path
,
field
in
context
.
ZopeFind
(
context
.
portal_skins
,
obj_metatypes
=
[
'ProxyField'
],
search_sub
=
1
):
if
field
.
getTemplateField
()
is
None
:
print
'<a href="%s/%s/manage_main?portal_skin=%s">%s</a><br />'
%
(
context
.
absolute_url
(),
field_path
,
portal_skin
,
field_path
)
print
(
'<a href="%s/%s/manage_main?portal_skin=%s">%s</a><br />'
%
(
context
.
absolute_url
(),
field_path
,
portal_skin
,
field_path
)
)
print
"</html>"
print
(
"</html>"
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getNotAssignedFieldList.py
View file @
4029d75f
...
...
@@ -7,9 +7,9 @@ for form_path, form in context.ZopeFind(
try
:
groups
=
form
.
get_groups
()
except
AttributeError
as
e
:
print
"%s is broken: %s"
%
(
form_path
,
e
)
print
(
"%s is broken: %s"
%
(
form_path
,
e
)
)
if
'not_assigned'
in
groups
:
print
'Not assigned fields in %s: %s'
%
(
form_path
,
[
f
.
getId
()
for
f
in
form
.
get_fields_in_group
(
'not_assigned'
)])
print
(
'Not assigned fields in %s: %s'
%
(
form_path
,
[
f
.
getId
()
for
f
in
form
.
get_fields_in_group
(
'not_assigned'
)])
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getRelationStringFieldWithoutProxyListBoxIdOrColumns.py
View file @
4029d75f
...
...
@@ -14,14 +14,14 @@ for field_path, field in context.ZopeFind(
continue
if
not
(
field
.
get_value
(
'proxy_listbox_ids'
)
or
field
.
get_value
(
'columns'
)):
print
field_path
print
(
field_path
)
continue
for
path
,
name
in
field
.
get_value
(
'proxy_listbox_ids'
):
if
context
.
restrictedTraverse
(
path
,
None
)
is
None
:
print
' PROBLEM: field %s uses an invalid form for %s: %s'
%
(
field_path
,
name
,
path
)
print
(
' PROBLEM: field %s uses an invalid form for %s: %s'
%
(
field_path
,
name
,
path
)
)
else
:
proxy_listbox
=
context
.
restrictedTraverse
(
path
)
if
proxy_listbox
.
meta_type
not
in
(
'ProxyField'
,
'ListBox'
):
print
' PROBLEM: field %s uses an invalid proxy with %s meta_type'
%
(
field_path
,
proxy_listbox
.
meta_type
)
print
(
' PROBLEM: field %s uses an invalid proxy with %s meta_type'
%
(
field_path
,
proxy_listbox
.
meta_type
)
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_listDuplicateSkins.py
View file @
4029d75f
...
...
@@ -6,7 +6,7 @@ container.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
# make sure context is the skins tool
stool
=
context
.
portal_skins
print
'<html><body>'
print
(
'<html><body>'
)
skins_by_name
=
{}
for
skin_key
,
skin_path_list
in
stool
.
getSkinPaths
():
...
...
@@ -24,9 +24,9 @@ for skin_key, skin_path_list in stool.getSkinPaths():
for
skin_name
,
location_list
in
skins_by_name
.
items
():
if
len
(
location_list
)
>
1
:
print
skin_name
,
'<br/>'
print
(
skin_name
,
'<br/>'
)
for
location
in
location_list
:
print
" "
*
3
,
'<a href="%s/%s/%s/manage_main">%s</a><br/>'
%
(
stool
.
absolute_url
(),
location
,
skin_name
,
location
)
print
(
" "
*
3
,
'<a href="%s/%s/%s/manage_main">%s</a><br/>'
%
(
stool
.
absolute_url
(),
location
,
skin_name
,
location
)
)
print
'</body></html>'
print
(
'</body></html>'
)
return
printed
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsDiff.py
View file @
4029d75f
...
...
@@ -5,7 +5,7 @@ if template_tool.getDiffFilterScriptList():
else
:
from
erp5.component.module.DiffUtils
import
DiffFile
print
'<div style="color: black">'
print
(
'<div style="color: black">'
)
# XXX: ERP5VCS_doCreateJavaScriptStatus should send lists
if
isinstance
(
added
,
basestring
):
...
...
@@ -19,20 +19,20 @@ for f in modified:
diff
=
DiffFile
(
vcs_tool
.
diff
(
f
))
if
not
diff
:
continue
print
'<input name="modified" value="%s" type="checkbox" checked="checked" />'
%
f
print
vcs_tool
.
getHeader
(
f
)
print
diff
.
toHTML
(
)
print
"<hr/><br/>"
print
(
'<input name="modified" value="%s" type="checkbox" checked="checked" />'
%
f
)
print
(
vcs_tool
.
getHeader
(
f
)
)
print
(
diff
.
toHTML
()
)
print
(
"<hr/><br/>"
)
for
f
in
added
:
print
'<input name="added" value="%s" type="checkbox" checked="checked" />'
%
f
print
vcs_tool
.
getHeader
(
f
)
print
"<br/><span style='color: green;'>File Added</span><br/><br/><hr/><br/>"
print
(
'<input name="added" value="%s" type="checkbox" checked="checked" />'
%
f
)
print
(
vcs_tool
.
getHeader
(
f
)
)
print
(
"<br/><span style='color: green;'>File Added</span><br/><br/><hr/><br/>"
)
for
f
in
removed
:
print
'<input name="removed" value="%s" type="checkbox" checked="checked" />'
%
f
print
vcs_tool
.
getHeader
(
f
)
print
"<br/><span style='color: red;'>File Removed</span><br/><br/><hr/><br/>"
print
(
'<input name="removed" value="%s" type="checkbox" checked="checked" />'
%
f
)
print
(
vcs_tool
.
getHeader
(
f
)
)
print
(
"<br/><span style='color: red;'>File Removed</span><br/><br/><hr/><br/>"
)
print
'</div>'
print
(
'</div>'
)
return
printed
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/AmortisationSystem_addAmortisationMethod.py
View file @
4029d75f
...
...
@@ -9,10 +9,10 @@ from string import capitalize
def
addAction
(
portal_type
,
portal_type_type
,
country
,
amortisation_method
):
print
'Adding UI tab "Amortisation Details" for method %s on portal_type %s... '
%
(
amortisation_method
,
portal_type
),
print
(
'Adding UI tab "Amortisation Details" for method %s on portal_type %s... '
%
(
amortisation_method
,
portal_type
),
end
=
' '
)
id
=
"%s_%s_amortisation_details_view"
%
(
country
,
amortisation_method
)
if
id
in
[
x
.
id
for
x
in
portal_type
.
listActions
()]:
print
"Already exists"
print
(
"Already exists"
)
else
:
if
portal_type_type
==
"Immobilisation"
:
action
=
"%s_Immobilisation_viewDetails"
%
amortisation_method
...
...
@@ -27,7 +27,7 @@ def addAction(portal_type, portal_type_type, country, amortisation_method):
permission
=
(
'View'
,),
category
=
"object_view"
,
visible
=
1
)
print
"OK"
print
(
"OK"
)
return
printed
...
...
@@ -44,10 +44,10 @@ amortisation_method = "".join(tokens[1:])
for
portal_type
in
context
.
portal_types
.
objectValues
():
# Check if the portal_type is Immobilisation
if
portal_type
.
id
==
"Immobilisation"
:
print
addAction
(
portal_type
,
"Immobilisation"
,
country
,
amortisation_method
),
print
(
addAction
(
portal_type
,
"Immobilisation"
,
country
,
amortisation_method
),
end
=
' '
)
else
:
# Check if the portal_type is amortisable
if
"immobilise"
in
[
x
.
id
for
x
in
portal_type
.
listActions
()]:
print
addAction
(
portal_type
,
"Item"
,
country
,
amortisation_method
),
print
(
addAction
(
portal_type
,
"Item"
,
country
,
amortisation_method
),
end
=
' '
)
return
printed
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_ImmobilisationDelivery_addImmobilisationActions.py
View file @
4029d75f
...
...
@@ -10,18 +10,18 @@ actions_to_add = [
]
print
'Adding Immobilisation Item Actions to Portal Type %s :'
%
context
.
getId
(
)
print
(
'Adding Immobilisation Item Actions to Portal Type %s :'
%
context
.
getId
()
)
action_list
=
context
.
listActions
()
for
action_to_add
in
actions_to_add
:
print
"- Adding Action '%s (%s)'... "
%
(
action_to_add
[
'id'
],
action_to_add
[
'name'
]),
print
(
"- Adding Action '%s (%s)'... "
%
(
action_to_add
[
'id'
],
action_to_add
[
'name'
]),
end
=
' '
)
found
=
0
for
action
in
action_list
:
if
getattr
(
action
,
'id'
,
None
)
==
action_to_add
[
'id'
]:
print
'already exists'
print
(
'already exists'
)
found
=
1
if
not
found
:
context
.
addAction
(
**
action_to_add
)
print
"OK"
print
(
"OK"
)
print
print
()
return
printed
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_ImmobilisationMovement_addAmortisationMethodActions.py
View file @
4029d75f
...
...
@@ -8,7 +8,7 @@ amortisation_method_view = 'amortisation_method_view'
action_list
=
context
.
listActions
()
print
"Making portal type '%s' an Immobilisation Movement :"
%
context
.
getId
(
)
print
(
"Making portal type '%s' an Immobilisation Movement :"
%
context
.
getId
()
)
# Add a view for each amortisation method
amortisation_method_list
=
context
.
Immobilisation_getAmortisationMethodList
()
for
method
in
amortisation_method_list
:
...
...
@@ -17,13 +17,13 @@ for method in amortisation_method_list:
title
=
method
[
1
].
title
or
id
action_id
=
view_id_basis
%
(
region
,
id
)
print
"- Adding View for method '%s'... "
%
title
,
print
(
"- Adding View for method '%s'... "
%
title
,
end
=
' '
)
# Check if the action already exists
exists
=
0
for
action
in
action_list
:
if
getattr
(
action
,
"id"
,
None
)
==
action_id
:
print
"already exists"
print
(
"already exists"
)
exists
=
1
if
not
exists
:
...
...
@@ -37,8 +37,8 @@ for method in amortisation_method_list:
permission
=
view_permissions_basis
,
category
=
"object_view"
,
visible
=
1
)
print
"OK"
print
(
"OK"
)
print
print
()
return
printed
bt5/erp5_immobilisation/SkinTemplateItem/portal_skins/erp5_immobilisation/PortalType_Item_addImmobilisationActions.py
View file @
4029d75f
...
...
@@ -18,18 +18,18 @@ actions_to_add = [
]
print
'Adding Immobilisation Item Actions to Portal Type %s :'
%
context
.
getId
(
)
print
(
'Adding Immobilisation Item Actions to Portal Type %s :'
%
context
.
getId
()
)
action_list
=
context
.
listActions
()
for
action_to_add
in
actions_to_add
:
print
"- Adding Action '%s (%s)'... "
%
(
action_to_add
[
'id'
],
action_to_add
[
'name'
]),
print
(
"- Adding Action '%s (%s)'... "
%
(
action_to_add
[
'id'
],
action_to_add
[
'name'
]),
end
=
' '
)
found
=
0
for
action
in
action_list
:
if
getattr
(
action
,
'id'
,
None
)
==
action_to_add
[
'id'
]:
print
'already exists'
print
(
'already exists'
)
found
=
1
if
not
found
:
context
.
addAction
(
**
action_to_add
)
print
"OK"
print
(
"OK"
)
print
print
()
return
printed
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_getDefaultPreferencesDictAsJSON.py
View file @
4029d75f
user_preferences
=
context
.
KnowledgeBox_getDefaultPreferencesDict
()
print
user_preferences
print
(
user_preferences
)
return
printed
bt5/erp5_knowledge_pad_ui_test/SkinTemplateItem/portal_skins/erp5_knowledge_pad_ui_test/Zuite_setupGadgets.py
View file @
4029d75f
...
...
@@ -17,5 +17,5 @@ if remove_existing_pads:
user_knowledge_pad_list
=
context
.
ERP5Site_getKnowledgePadListForUser
(
mode
=
mode
)
context
.
knowledge_pad_module
.
manage_delObjects
([
x
.
getId
()
for
x
in
user_knowledge_pad_list
])
print
"Done"
print
(
"Done"
)
return
printed
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebManifest_createCloneFile.py
View file @
4029d75f
...
...
@@ -37,16 +37,16 @@ document_list = portal.portal_catalog(
path_list
=
[
software_product_rurl
]
print
" Processing File List
\
r
===============================
\
r
"
print
(
" Processing File List
\
r
===============================
\
r
"
)
for
document_brain
in
document_list
:
document
=
document_brain
.
getObject
()
if
document
.
getFollowUp
():
continue
print
document
.
getId
(
)
print
(
document
.
getId
()
)
new_document
=
document
.
Base_createCloneDocument
(
batch_mode
=
True
)
new_id
=
base_id
+
new_document
.
getReference
().
replace
(
'.'
,
'_'
)
if
new_id
in
new_document
.
getParentValue
():
print
" deleting %s"
%
new_id
print
(
" deleting %s"
%
new_id
)
new_document
.
getParentValue
().
manage_delObjects
([
new_id
])
new_document
.
setId
(
new_id
)
path_list
.
append
(
new_document
.
getRelativeUrl
())
...
...
@@ -54,8 +54,8 @@ for document_brain in document_list:
# new_document.setVersion(base_id + "dev")
new_document
.
setFollowUp
(
software_product_rurl
)
print
"
\
r
\
r
Here is your path list
\
r
===============================
\
r
\
r
"
print
'
\
r
'
.
join
(
path_list
)
print
"
\
r
\
r
===============================
\
r
\
r
"
print
" Done"
print
(
"
\
r
\
r
Here is your path list
\
r
===============================
\
r
\
r
"
)
print
(
'
\
r
'
.
join
(
path_list
)
)
print
(
"
\
r
\
r
===============================
\
r
\
r
"
)
print
(
" Done"
)
return
printed
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/ERP5Site_printParameterAsHTMLTitle.py
View file @
4029d75f
container
.
REQUEST
.
RESPONSE
.
setHeader
(
'Content-Type'
,
'text/html'
)
print
"<html><body><h1 class='test-script-title'>Title is : "
+
parameter
+
"</h1></body></html>"
print
(
"<html><body><h1 class='test-script-title'>Title is : "
+
parameter
+
"</h1></body></html>"
)
return
printed
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsText.py
View file @
4029d75f
...
...
@@ -8,8 +8,8 @@ line_dict_list = context.PaySheetTransaction_getLineListAsDict()
title_list
=
[
'Designation
\
t
\
t
'
,
'Base'
,
'Employer Rate'
,
'Employer Share'
,
'Employee Rate'
,
'Employee Share'
]
print
'
\
t
\
t
'
.
join
(
title_list
)
print
''
print
(
'
\
t
\
t
'
.
join
(
title_list
)
)
print
(
''
)
def
rightPad
(
string
,
length
):
string
=
str
(
string
)
...
...
@@ -36,6 +36,6 @@ for line in line_dict_list:
string_to_display
.
append
(
rightPad
(
' '
,
24
))
string_to_display
.
append
(
rightPad
(
' '
,
24
))
print
''
.
join
(
string_to_display
)
print
(
''
.
join
(
string_to_display
)
)
return
printed
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_exportTaskReportListAsiCalendar.py
View file @
4029d75f
...
...
@@ -24,7 +24,7 @@ def foldContent(s):
return
s
def
printTask
(
task
)
:
print
"""BEGIN:VTODO
print
(
"""BEGIN:VTODO
DCREATED:%(creation_date)s
UID:%(uid)s
SEQUENCE:1
...
...
@@ -38,31 +38,31 @@ PRIORITY:%(priority)s""" % ( {
'modification_date'
:
formatDate
(
task
.
getModificationDate
()),
'status'
:
task
.
getSimulationState
()
==
'delivered'
and
'COMPLETED'
or
'NEEDS_ACTION'
,
'priority'
:
task
.
getProperty
(
'int_index'
,
3
),
}
)
}
)
)
if
task
.
hasComment
():
print
"DESCRIPTION:"
+
foldContent
(
task
.
getComment
(
))
print
(
"DESCRIPTION:"
+
foldContent
(
task
.
getComment
()
))
if
task
.
hasStartDate
():
print
"DTSTART;VALUE=DATE:"
+
formatDate
(
task
.
getStartDate
(
))
print
(
"DTSTART;VALUE=DATE:"
+
formatDate
(
task
.
getStartDate
()
))
if
task
.
hasStopDate
():
print
"DUE;VALUE=DATE:"
+
formatDate
(
task
.
getStopDate
(
))
print
(
"DUE;VALUE=DATE:"
+
formatDate
(
task
.
getStopDate
()
))
organizer
=
task
.
getDestinationValue
(
portal_type
=
'Person'
)
if
organizer
:
print
"ORGANIZER;CN=%s:MAILTO:%s"
%
(
organizer
.
getTitle
(),
organizer
.
getDefaultEmailText
(
))
print
"X-ORGANIZER:MAILTO:%s"
%
(
organizer
.
getDefaultEmailText
(
))
print
(
"ORGANIZER;CN=%s:MAILTO:%s"
%
(
organizer
.
getTitle
(),
organizer
.
getDefaultEmailText
()
))
print
(
"X-ORGANIZER:MAILTO:%s"
%
(
organizer
.
getDefaultEmailText
()
))
for
attendee
in
task
.
getSourceValueList
(
portal_type
=
'Person'
)
:
print
"ATTENDEE;CN=%s:MAILTO:%s"
%
(
attendee
.
getTitle
(),
attendee
.
getDefaultEmailText
(
))
print
"ATTACH;FMTTYPE=text/html:%s/%s/view"
%
(
context
.
ERP5Site_getAbsoluteUrl
(),
task
.
getRelativeUrl
(
))
print
(
"ATTENDEE;CN=%s:MAILTO:%s"
%
(
attendee
.
getTitle
(),
attendee
.
getDefaultEmailText
()
))
print
(
"ATTACH;FMTTYPE=text/html:%s/%s/view"
%
(
context
.
ERP5Site_getAbsoluteUrl
(),
task
.
getRelativeUrl
()
))
print
"END:VTODO"
print
(
"END:VTODO"
)
return
printed
print
"""BEGIN:VCALENDAR
print
(
"""BEGIN:VCALENDAR
PRODID:-//ERP5//NONSGML Task Report Module//EN
VERSION:2.0"""
VERSION:2.0"""
)
obj_list
=
context
.
getPortalObject
().
portal_selections
.
callSelectionFor
(
"task_report_module_selection"
)
for
obj
in
obj_list
:
print
printTask
(
obj
.
getObject
(
))
print
"END:VCALENDAR"
print
(
printTask
(
obj
.
getObject
()
))
print
(
"END:VCALENDAR"
)
context
.
REQUEST
.
RESPONSE
.
setHeader
(
'Content-Type'
,
'text/calendar'
)
context
.
REQUEST
.
RESPONSE
.
setHeader
(
'Content-disposition'
,
'attachment; filename=ERP5.ics'
)
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_updateTestPageID.py
View file @
4029d75f
...
...
@@ -7,21 +7,21 @@ portal = context.getPortalObject()
test_pages
=
portal
.
test_page_module
.
searchFolder
(
validation_state
=
(
'published'
,
'published_alive'
,
'released'
,
'released_alive'
,
'shared'
,
'shared_alive'
,))
print
len
(
test_pages
)
print
(
len
(
test_pages
)
)
new_page_list
=
[]
for
page
in
test_pages
:
print
"changing ID of %s to %s of document in state %s"
%
(
page
.
getRelativeUrl
(),
page
.
getReference
(),
page
.
getValidationState
(
))
print
(
"changing ID of %s to %s of document in state %s"
%
(
page
.
getRelativeUrl
(),
page
.
getReference
(),
page
.
getValidationState
()
))
if
not
dry_run
:
page
.
setId
(
page
.
getReference
())
print
"
\
t
page changed"
print
(
"
\
t
page changed"
)
new_page_list
.
append
(
page
.
getReference
())
print
"finished"
print
(
"finished"
)
print
"For business template Path"
print
(
"For business template Path"
)
for
p
in
new_page_list
:
print
"test_page_module/"
+
p
print
"test_page_module/"
+
p
+
"/**"
print
(
"test_page_module/"
+
p
)
print
(
"test_page_module/"
+
p
+
"/**"
)
return
printed
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/ERP5Site_getTileImageMetadataList.py
View file @
4029d75f
import
json
portal
=
context
.
getPortalObject
()
context
.
REQUEST
.
response
.
setHeader
(
'Access-Control-Allow-Origin'
,
'*'
)
print
portal
.
portal_catalog
(
portal_type
=
"Image Title"
,
src__
=
1
)
print
(
portal
.
portal_catalog
(
portal_type
=
"Image Title"
,
src__
=
1
)
)
#return printed
data
=
{}
data
[
"image_list"
]
=
[]
...
...
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
View file @
4029d75f
...
...
@@ -7,6 +7,6 @@ portal = context.getPortalObject()
data
=
portal
.
restrictedTraverse
(
"portal_skins/erp5_safeimage/img/image_test.jpg"
)
print
data
.
data
print
(
data
.
data
)
return
printed
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_afterComplete.py
View file @
4029d75f
...
...
@@ -15,6 +15,7 @@ if recipient_list:
mail_from
=
'nobody@svn.erp5.org'
,
include_link
=
include_link
,
include_diff
=
True
)
print
'Successfully sent to: '
,
recipient_list
print
'OK'
print
(
'Successfully sent to: %s'
%
recipient_list
)
print
(
'OK'
)
return
printed
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_viewTestResultLineStdoutSet.py
View file @
4029d75f
...
...
@@ -5,5 +5,5 @@ Multiline stdout values behaviour is undefined.
"""
for
test_result_node
in
context
.
objectValues
(
portal_type
=
'Test Result Node'
):
if
test_result_node
.
getCmdline
()
==
'LOG url'
:
print
test_result_node
.
getStdout
(
)
print
(
test_result_node
.
getStdout
().
decode
(
'ascii'
,
'replace'
)
)
return
printed
bt5/erp5_tiosafe_core/SkinTemplateItem/portal_skins/erp5_integration/IntegrationTestModule_createFormFromPropertySheet.py
View file @
4029d75f
...
...
@@ -5,12 +5,12 @@ ps = context.getPortalObject().portal_property_sheets[property_sheet_id]
for
prop
in
ps
.
objectValues
(
portal_type
=
"Standard Property"
):
field_id
=
"my_%s"
%
prop
.
getReference
()
if
getattr
(
context
,
field_id
,
None
)
is
None
:
print
"will add %s"
%
(
field_id
)
print
(
"will add %s"
%
(
field_id
)
)
if
prop
.
getElementaryType
()
==
"string"
:
context
.
manage_addField
(
field_id
,
prop
.
getReference
(),
"StringField"
)
elif
prop
.
getElementaryType
()
==
"boolean"
:
context
.
manage_addField
(
field_id
,
prop
.
getReference
(),
"CheckBoxField"
)
else
:
print
"unkown type"
,
prop
.
getElementaryType
(
)
print
(
"unkown type"
,
prop
.
getElementaryType
()
)
return
printed
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/ERP5Site_migrateData.py
View file @
4029d75f
...
...
@@ -19,9 +19,9 @@ for record in portal.expense_record_module.objectValues(portal_type="Expense Rec
)
image
.
share
()
else
:
print
ticket
.
getRelativeUrl
(
)
print
(
ticket
.
getRelativeUrl
()
)
print
DateTime
(
)
print
(
DateTime
()
)
#return printed
...
...
@@ -31,6 +31,6 @@ for i in context.portal_catalog(portal_type='Expense Validation Request'):
if
i
.
getReference
()
!=
sourceReference
:
if
migrate
:
i
.
setReference
(
sourceReference
)
print
i
.
getRelativeUrl
(
)
print
(
i
.
getRelativeUrl
()
)
return
printed
bt5/erp5_web_project_ui_test/SkinTemplateItem/portal_skins/erp5_web_project_test/ERP5Site_createTestStartedProject.py
View file @
4029d75f
...
...
@@ -227,5 +227,5 @@ if create_project_documents:
portal_type
=
'Project'
,
reference
=
draft_project
)
print
"Project Created"
print
(
"Project Created"
)
return
printed
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