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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
d76fce32
Commit
d76fce32
authored
Jul 22, 2024
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes and remove unused imports.
parent
57d21dfa
Changes
72
Hide whitespace changes
Inline
Side-by-side
Showing
72 changed files
with
161 additions
and
191 deletions
+161
-191
bt5/erp5_accounting/DocumentTemplateItem/portal_components/document.erp5.BalanceTransaction.py
...tem/portal_components/document.erp5.BalanceTransaction.py
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_doGetInventory.py
...rp5_accounting_l10n_fr/FiscalReportCell_doGetInventory.py
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getBalance.py
...ns/erp5_accounting_l10n_fr/FiscalReportCell_getBalance.py
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getBankAccountBalance.py
...ounting_l10n_fr/FiscalReportCell_getBankAccountBalance.py
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getThirdPartyBalance.py
...counting_l10n_fr/FiscalReportCell_getThirdPartyBalance.py
+2
-2
bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.CategoryBudgetVariation.py
...ortal_components/document.erp5.CategoryBudgetVariation.py
+1
-1
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/PersonModule_getLeaveRequestReportListboxUntranslatableColumnList.py
...e_getLeaveRequestReportListboxUntranslatableColumnList.py
+1
-1
bt5/erp5_certificate_authority/ToolComponentTemplateItem/portal_components/tool.erp5.CertificateAuthorityTool.py
...m/portal_components/tool.erp5.CertificateAuthorityTool.py
+19
-8
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessConfiguration.py
.../portal_components/document.erp5.BusinessConfiguration.py
+3
-3
bt5/erp5_configurator/ModuleComponentTemplateItem/portal_components/module.erp5.ConfiguratorTestMixin.py
...em/portal_components/module.erp5.ConfiguratorTestMixin.py
+1
-0
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py
...gurator/BusinessConfiguration_validateCustomerPassword.py
+0
-2
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testDateUtils.py
...TemplateItem/portal_components/test.erp5.testDateUtils.py
+1
-1
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
...mplateItem/portal_components/test.erp5.testERP5Catalog.py
+2
-1
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testIdTool.py
...estTemplateItem/portal_components/test.erp5.testIdTool.py
+1
-1
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testNotificationTool.py
...eItem/portal_components/test.erp5.testNotificationTool.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createTableOfContent.py
...s/erp5_corporate_identity/WebPage_createTableOfContent.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getHeadOfTextContent.py
...eItem/portal_skins/erp5_crm/Event_getHeadOfTextContent.py
+1
-1
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRM.py
...m/TestTemplateItem/portal_components/test.erp5.testCRM.py
+3
-3
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testEditorField.py
...mplateItem/portal_components/test.erp5.testEditorField.py
+0
-2
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testERP5WebWithDms.py
...ateItem/portal_components/test.erp5.testERP5WebWithDms.py
+31
-57
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py
...plateItem/portal_components/test.erp5.testTemplateTool.py
+1
-1
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
...plateItem/portal_components/test.erp5.testHalJsonStyle.py
+5
-5
bt5/erp5_km/TestTemplateItem/portal_components/test.erp5.testKM.py
...km/TestTemplateItem/portal_components/test.erp5.testKM.py
+4
-4
bt5/erp5_palo/DocumentTemplateItem/portal_components/document.erp5.PALOETLConnection.py
...Item/portal_components/document.erp5.PALOETLConnection.py
+5
-2
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/AccountingTransactionModule_getPaySheetLineReportSectionLineList.py
...TransactionModule_getPaySheetLineReportSectionLineList.py
+2
-2
bt5/erp5_safeimage/ExtensionTemplateItem/portal_components/extension.erp5.ERP5ZoomifyImage.py
...Item/portal_components/extension.erp5.ERP5ZoomifyImage.py
+1
-7
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
...rtal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
+0
-8
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_fastInput.py
...Item/portal_skins/erp5_trade/SalePackingList_fastInput.py
+0
-1
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testOrder.py
...TestTemplateItem/portal_components/test.erp5.testOrder.py
+2
-2
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testPackingList.py
...mplateItem/portal_components/test.erp5.testPackingList.py
+4
-4
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testResource.py
...tTemplateItem/portal_components/test.erp5.testResource.py
+3
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testBlobSave.zpt
...lateItem/portal_tests/gadget_field_zuite/testBlobSave.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testEmptyDivGeneration.zpt
...ortal_tests/gadget_field_zuite/testEmptyDivGeneration.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.zpt
...eItem/portal_tests/gadget_field_zuite/testNotEditable.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoad.zpt
...eItem/portal_tests/gadget_field_zuite/testSaveAndLoad.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoadMultiline.zpt
...tal_tests/gadget_field_zuite/testSaveAndLoadMultiline.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoadWithRelationField.zpt
...s/gadget_field_zuite/testSaveAndLoadWithRelationField.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.zpt
...sts/gadget_field_zuite/testSaveAndNotEditableInIFrame.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.zpt
...Item/portal_tests/listbox_dialog_mode_zuite/testPager.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testComplexDomainTree.zpt
...Item/portal_tests/listbox_zuite/testComplexDomainTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testConfigure.zpt
...TemplateItem/portal_tests/listbox_zuite/testConfigure.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testCustomSort.zpt
...emplateItem/portal_tests/listbox_zuite/testCustomSort.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainAndReportTrees.zpt
...m/portal_tests/listbox_zuite/testDomainAndReportTrees.zpt
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainTree.zpt
...emplateItem/portal_tests/listbox_zuite/testDomainTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainTreeObsoleteValue.zpt
...ortal_tests/listbox_zuite/testDomainTreeObsoleteValue.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDynamicDomainTree.zpt
...Item/portal_tests/listbox_zuite/testDynamicDomainTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDynamicReportTree.zpt
...Item/portal_tests/listbox_zuite/testDynamicReportTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testMetaTypes.zpt
...TemplateItem/portal_tests/listbox_zuite/testMetaTypes.zpt
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPortalTypes.zpt
...mplateItem/portal_tests/listbox_zuite/testPortalTypes.zpt
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.zpt
...hTemplateItem/portal_tests/listbox_zuite/testRedirect.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.zpt
...emplateItem/portal_tests/listbox_zuite/testReportTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.zpt
...rtal_tests/listbox_zuite/testReportTreeWithStatMethod.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.zpt
...mplateItem/portal_tests/listbox_zuite/testStatColumns.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionDomainTree.zpt
...ge_templates_zuite/testFolderWorkflowActionDomainTree.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/planning_box_field_zuite/testPlanningBoxColumnHeaderLink.zpt
...nning_box_field_zuite/testPlanningBoxColumnHeaderLink.zpt
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/planning_box_field_zuite/testPlanningBoxVerticalViewColumnHeaderLink.zpt
...eld_zuite/testPlanningBoxVerticalViewColumnHeaderLink.zpt
+1
-1
bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testModuleListboxDefaultMoreColumns.zpt
...proxy_field_zuite/testModuleListboxDefaultMoreColumns.zpt
+1
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxDialogModeZuite_CommonTemplate.zpt
...ns/erp5_ui_test/ListBoxDialogModeZuite_CommonTemplate.zpt
+1
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckCustomDialogWorkflowHistory.py
...stFolderWorkflowActionCheckCustomDialogWorkflowHistory.py
+7
-7
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.py
...est/Zuite_testFolderWorkflowActionCheckWorkflowHistory.py
+5
-5
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.py
...derWorkflowActionFilteredSelectionCheckWorkflowHistory.py
+4
-4
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
...5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
+1
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
...nderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
+1
-1
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
...stTemplateItem/portal_components/test.erp5.ShaDirMixin.py
+0
-1
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.TextDocument.py
...plateItem/portal_components/document.erp5.TextDocument.py
+1
-2
product/ERP5/tests/utils.py
product/ERP5/tests/utils.py
+2
-1
product/ERP5OOo/tests/TestFormPrintoutMixin.py
product/ERP5OOo/tests/TestFormPrintoutMixin.py
+0
-1
product/ERP5OOo/tests/testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+2
-2
product/ERP5Type/patches/python.py
product/ERP5Type/patches/python.py
+1
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+2
-4
product/PortalTransforms/libtransforms/commandtransform.py
product/PortalTransforms/libtransforms/commandtransform.py
+5
-3
product/Zelenium/scripts/tinyWebServer.py
product/Zelenium/scripts/tinyWebServer.py
+0
-1
No files found.
bt5/erp5_accounting/DocumentTemplateItem/portal_components/document.erp5.BalanceTransaction.py
View file @
d76fce32
...
@@ -440,7 +440,7 @@ class BalanceTransaction(AccountingTransaction, Inventory):
...
@@ -440,7 +440,7 @@ class BalanceTransaction(AccountingTransaction, Inventory):
return
factory
return
factory
def
_immediateReindexObject
(
self
,
**
kw
):
def
_immediateReindexObject
(
self
,
*
args
,
*
*
kw
):
"""Reindexes the object.
"""Reindexes the object.
This is different indexing that the default Inventory indexing, because
This is different indexing that the default Inventory indexing, because
we want to take into account that lines in this balance transaction to
we want to take into account that lines in this balance transaction to
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_doGetInventory.py
View file @
d76fce32
...
@@ -26,7 +26,7 @@ section_region = section.getRegion()
...
@@ -26,7 +26,7 @@ section_region = section.getRegion()
ledger
=
request
.
get
(
"ledger"
,
None
)
ledger
=
request
.
get
(
"ledger"
,
None
)
if
ledger
is
not
None
:
if
ledger
is
not
None
:
portal_categories
=
context
.
getPortalObject
().
portal_categories
portal_categories
=
context
.
getPortalObject
().
portal_categories
if
isinstance
(
ledger
,
list
)
or
isinstance
(
ledger
,
tuple
):
if
isinstance
(
ledger
,
(
tuple
,
list
)
):
ledger_uid
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
ledger_uid
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
else
:
else
:
ledger_uid
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
ledger_uid
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getBalance.py
View file @
d76fce32
...
@@ -23,7 +23,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
...
@@ -23,7 +23,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
ledger
=
kw
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
ledger
=
kw
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
if
ledger
is
not
None
:
if
ledger
is
not
None
:
portal_categories
=
context
.
getPortalObject
().
portal_categories
portal_categories
=
context
.
getPortalObject
().
portal_categories
if
isinstance
(
ledger
,
list
)
or
isinstance
(
ledger
,
tuple
):
if
isinstance
(
ledger
,
(
tuple
,
list
)
):
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
else
:
else
:
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getBankAccountBalance.py
View file @
d76fce32
...
@@ -22,7 +22,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
...
@@ -22,7 +22,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
ledger
=
kwd
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
ledger
=
kwd
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
if
ledger
is
not
None
:
if
ledger
is
not
None
:
portal_categories
=
context
.
getPortalObject
().
portal_categories
portal_categories
=
context
.
getPortalObject
().
portal_categories
if
isinstance
(
ledger
,
list
)
or
isinstance
(
ledger
,
tuple
):
if
isinstance
(
ledger
,
(
tuple
,
list
)
):
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
else
:
else
:
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/FiscalReportCell_getThirdPartyBalance.py
View file @
d76fce32
...
@@ -27,7 +27,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
...
@@ -27,7 +27,7 @@ kw['where_expression'] = " section.portal_type = 'Organisation' "
ledger
=
kwd
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
ledger
=
kwd
.
get
(
'ledger'
,
request
.
get
(
"ledger"
,
None
))
if
ledger
is
not
None
:
if
ledger
is
not
None
:
portal_categories
=
context
.
getPortalObject
().
portal_categories
portal_categories
=
context
.
getPortalObject
().
portal_categories
if
isinstance
(
ledger
,
list
)
or
isinstance
(
ledger
,
tuple
):
if
isinstance
(
ledger
,
(
tuple
,
list
)
):
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
kw
[
'ledger_uid'
]
=
[
portal_categories
.
ledger
.
restrictedTraverse
(
item
).
getUid
()
for
item
in
ledger
]
else
:
else
:
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
kw
[
'ledger_uid'
]
=
portal_categories
.
ledger
.
restrictedTraverse
(
ledger
).
getUid
()
...
@@ -47,7 +47,7 @@ accounts_to_expand_by_tp = rec_cat.getAccountTypeRelatedValueList(**params) + \
...
@@ -47,7 +47,7 @@ accounts_to_expand_by_tp = rec_cat.getAccountTypeRelatedValueList(**params) + \
total_balance
=
0.0
total_balance
=
0.0
for
account_gap_number
in
accounts
:
for
account_gap_number
in
accounts
:
# We get all acounts strict member of this GAP category
# We get all ac
c
ounts strict member of this GAP category
gap
=
context
.
restrictedTraverse
(
'portal_categories/'
+
getURL
(
account_gap_number
))
gap
=
context
.
restrictedTraverse
(
'portal_categories/'
+
getURL
(
account_gap_number
))
for
account
in
gap
.
getGapRelatedValueList
(
portal_type
=
'Account'
):
for
account
in
gap
.
getGapRelatedValueList
(
portal_type
=
'Account'
):
...
...
bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.CategoryBudgetVariation.py
View file @
d76fce32
...
@@ -207,7 +207,7 @@ class CategoryBudgetVariation(BudgetVariation):
...
@@ -207,7 +207,7 @@ class CategoryBudgetVariation(BudgetVariation):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getBudgetVariationRangeCategoryList'
)
'getBudgetVariationRangeCategoryList'
)
def
getBudgetVariationRangeCategoryList
(
self
,
context
):
def
getBudgetVariationRangeCategoryList
(
self
,
_
):
"""Returns the Variation Range Category List that can be applied to this
"""Returns the Variation Range Category List that can be applied to this
budget.
budget.
"""
"""
...
...
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/PersonModule_getLeaveRequestReportListboxUntranslatableColumnList.py
View file @
d76fce32
...
@@ -15,6 +15,6 @@ for inventory in stool.getInventoryList(
...
@@ -15,6 +15,6 @@ for inventory in stool.getInventoryList(
resource_list
.
append
(
resource_list
.
append
(
(
inventory
.
resource_relative_url
,
(
inventory
.
resource_relative_url
,
portal
.
portal_categories
.
restrictedTraverse
(
portal
.
portal_categories
.
restrictedTraverse
(
inventory
.
resource_relative_url
).
getTitle
()))
inventory
.
resource_relative_url
).
getT
ranslatedT
itle
()))
return
resource_list
return
resource_list
bt5/erp5_certificate_authority/ToolComponentTemplateItem/portal_components/tool.erp5.CertificateAuthorityTool.py
View file @
d76fce32
...
@@ -103,7 +103,8 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -103,7 +103,8 @@ class CertificateAuthorityTool(BaseTool):
Raises CertificateAuthorityBusy"""
Raises CertificateAuthorityBusy"""
if
os
.
path
.
exists
(
self
.
lock
):
if
os
.
path
.
exists
(
self
.
lock
):
raise
CertificateAuthorityBusy
raise
CertificateAuthorityBusy
open
(
self
.
lock
,
'w'
).
write
(
'locked'
)
with
open
(
self
.
lock
,
'w'
)
as
f
:
f
.
write
(
'locked'
)
def
_unlockCertificateAuthority
(
self
):
def
_unlockCertificateAuthority
(
self
):
"""Checks lock and locks Certificate Authority tool"""
"""Checks lock and locks Certificate Authority tool"""
...
@@ -192,7 +193,8 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -192,7 +193,8 @@ class CertificateAuthorityTool(BaseTool):
self
.
_checkCertificateAuthority
()
self
.
_checkCertificateAuthority
()
self
.
_lockCertificateAuthority
()
self
.
_lockCertificateAuthority
()
index
=
open
(
self
.
index
).
read
().
splitlines
()
with
open
(
self
.
index
)
as
f
:
index
=
f
.
read
().
splitlines
()
valid_line_list
=
[
q
for
q
in
index
if
q
.
startswith
(
'V'
)
and
valid_line_list
=
[
q
for
q
in
index
if
q
.
startswith
(
'V'
)
and
(
'CN=%s/'
%
common_name
in
q
)]
(
'CN=%s/'
%
common_name
in
q
)]
if
len
(
valid_line_list
)
>=
1
:
if
len
(
valid_line_list
)
>=
1
:
...
@@ -201,7 +203,8 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -201,7 +203,8 @@ class CertificateAuthorityTool(BaseTool):
'please revoke it before request a new one..'
%
common_name
)
'please revoke it before request a new one..'
%
common_name
)
try
:
try
:
new_id
=
open
(
self
.
serial
,
'r'
).
read
().
strip
().
lower
()
with
open
(
self
.
serial
,
'r'
)
as
f
:
new_id
=
f
.
read
().
strip
().
lower
()
key
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'private'
,
key
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'private'
,
new_id
+
'.key'
)
new_id
+
'.key'
)
csr
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
new_id
+
'.csr'
)
csr
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
new_id
+
'.csr'
)
...
@@ -216,9 +219,13 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -216,9 +219,13 @@ class CertificateAuthorityTool(BaseTool):
'-batch'
,
'-config'
,
self
.
openssl_config
,
'-out'
,
cert
,
'-infiles'
,
'-batch'
,
'-config'
,
self
.
openssl_config
,
'-out'
,
cert
,
'-infiles'
,
csr
])
csr
])
os
.
unlink
(
csr
)
os
.
unlink
(
csr
)
with
open
(
key
)
as
f
:
key
=
f
.
read
()
with
open
(
cert
)
as
f
:
cert
=
f
.
read
()
return
dict
(
return
dict
(
key
=
open
(
key
).
read
()
,
key
=
key
,
certificate
=
open
(
cert
).
read
()
,
certificate
=
cert
,
id
=
new_id
,
id
=
new_id
,
common_name
=
common_name
)
common_name
=
common_name
)
except
Exception
:
except
Exception
:
...
@@ -242,7 +249,8 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -242,7 +249,8 @@ class CertificateAuthorityTool(BaseTool):
self
.
_checkCertificateAuthority
()
self
.
_checkCertificateAuthority
()
self
.
_lockCertificateAuthority
()
self
.
_lockCertificateAuthority
()
try
:
try
:
new_id
=
open
(
self
.
crl
,
'r'
).
read
().
strip
().
lower
()
with
open
(
self
.
crl
,
'r'
)
as
f
:
new_id
=
f
.
read
().
strip
().
lower
()
crl_path
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'crl'
)
crl_path
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'crl'
)
crl
=
os
.
path
.
join
(
crl_path
,
new_id
+
'.crl'
)
crl
=
os
.
path
.
join
(
crl_path
,
new_id
+
'.crl'
)
cert
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'certs'
,
cert
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'certs'
,
...
@@ -260,7 +268,9 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -260,7 +268,9 @@ class CertificateAuthorityTool(BaseTool):
alias
+=
str
(
len
(
glob
.
glob
(
alias
+
'*'
)))
alias
+=
str
(
len
(
glob
.
glob
(
alias
+
'*'
)))
created
.
append
(
alias
)
created
.
append
(
alias
)
os
.
symlink
(
os
.
path
.
basename
(
crl
),
alias
)
os
.
symlink
(
os
.
path
.
basename
(
crl
),
alias
)
return
dict
(
crl
=
open
(
crl
).
read
())
with
open
(
crl
)
as
f
:
crl
=
f
.
read
()
return
dict
(
crl
=
crl
)
except
Exception
:
except
Exception
:
e
=
sys
.
exc_info
()
e
=
sys
.
exc_info
()
try
:
try
:
...
@@ -278,7 +288,8 @@ class CertificateAuthorityTool(BaseTool):
...
@@ -278,7 +288,8 @@ class CertificateAuthorityTool(BaseTool):
self
.
_unlockCertificateAuthority
()
self
.
_unlockCertificateAuthority
()
def
_getValidSerial
(
self
,
common_name
):
def
_getValidSerial
(
self
,
common_name
):
index
=
open
(
self
.
index
).
read
().
splitlines
()
with
open
(
self
.
index
)
as
f
:
index
=
f
.
read
().
splitlines
()
valid_line_list
=
[
q
for
q
in
index
if
q
.
startswith
(
'V'
)
and
valid_line_list
=
[
q
for
q
in
index
if
q
.
startswith
(
'V'
)
and
(
'CN=%s/'
%
common_name
in
q
)]
(
'CN=%s/'
%
common_name
in
q
)]
if
len
(
valid_line_list
)
<
1
:
if
len
(
valid_line_list
)
<
1
:
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessConfiguration.py
View file @
d76fce32
...
@@ -347,9 +347,9 @@ class BusinessConfiguration(Item):
...
@@ -347,9 +347,9 @@ class BusinessConfiguration(Item):
## we have already created configuration save for this state
## we have already created configuration save for this state
## so remove from it already existing configuration items
## so remove from it already existing configuration items
if
configuration_save
!=
self
:
# don't delete ourselves
if
configuration_save
!=
self
:
# don't delete ourselves
existing_conf_items
=
configuration_save
.
objectIds
(
)
existing_conf_items
=
list
(
configuration_save
.
objectIds
()
)
existing_conf_items
=
map
(
None
,
existing_conf_items
)
if
existing_conf_items
:
configuration_save
.
manage_delObjects
(
existing_conf_items
)
configuration_save
.
manage_delObjects
(
existing_conf_items
)
modified_form_kw
=
{}
modified_form_kw
=
{}
for
k
in
form_kw
.
keys
():
for
k
in
form_kw
.
keys
():
...
...
bt5/erp5_configurator/ModuleComponentTemplateItem/portal_components/module.erp5.ConfiguratorTestMixin.py
View file @
d76fce32
##############################################################################
##############################################################################
# coding: utf-8
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
# Rafael Monnerat <rafael@nexedi.com>
# Ivan Tyagov <ivan@nexedi.com>
# Ivan Tyagov <ivan@nexedi.com>
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py
View file @
d76fce32
password_confirm
=
request
.
get
(
'field_your_password_confirm'
,
None
)
password_confirm
=
request
.
get
(
'field_your_password_confirm'
,
None
)
if
editor
.
encode
(
'ascii'
,
'ignore'
)
!=
editor
:
return
False
return
password_confirm
==
editor
return
password_confirm
==
editor
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testDateUtils.py
View file @
d76fce32
...
@@ -348,7 +348,7 @@ def test_suite():
...
@@ -348,7 +348,7 @@ def test_suite():
suite
.
addTest
(
unittest
.
makeSuite
(
TestTimeZoneContext
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestTimeZoneContext
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestDateTimePatch
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestDateTimePatch
))
# also run original tests from DateTime module
# also run original tests from DateTime module
BBB ZOPE2
# pylint:disable=no-name-in-module
# pylint:disable=no-name-in-module
try
:
try
:
import
DateTime.tests.testDateTime
as
test_datetime
import
DateTime.tests.testDateTime
as
test_datetime
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
View file @
d76fce32
...
@@ -4074,7 +4074,8 @@ VALUES
...
@@ -4074,7 +4074,8 @@ VALUES
def
doSomething
(
self
,
message_list
):
def
doSomething
(
self
,
message_list
):
r
=
[]
r
=
[]
for
m
in
message_list
:
for
m
in
message_list
:
m
.
result
=
r
.
append
(
m
.
object
.
getPath
())
r
.
append
(
m
.
object
.
getPath
())
m
.
result
=
None
r
.
sort
()
r
.
sort
()
group_method_call_list
.
append
(
r
)
group_method_call_list
.
append
(
r
)
self
.
portal
.
portal_activities
.
__class__
.
doSomething
=
doSomething
self
.
portal
.
portal_activities
.
__class__
.
doSomething
=
doSomething
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testIdTool.py
View file @
d76fce32
...
@@ -281,7 +281,7 @@ class TestIdTool(ERP5TypeTestCase):
...
@@ -281,7 +281,7 @@ class TestIdTool(ERP5TypeTestCase):
query
=
'select last_id from portal_ids where id_group="foo_bar"'
query
=
'select last_id from portal_ids where id_group="foo_bar"'
self
.
assertRaises
(
ProgrammingError
,
sql_connection
.
manage_test
,
query
)
self
.
assertRaises
(
ProgrammingError
,
sql_connection
.
manage_test
,
query
)
generator
.
rebuildSqlTable
()
generator
.
rebuildSqlTable
()
result
=
sql_connection
.
manage_test
(
query
)
result
=
sql_connection
.
manage_test
(
query
)
self
.
assertEqual
(
result
[
0
].
last_id
,
4
)
self
.
assertEqual
(
result
[
0
].
last_id
,
4
)
def
checkExportImportDict
(
self
,
id_generator
):
def
checkExportImportDict
(
self
,
id_generator
):
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testNotificationTool.py
View file @
d76fce32
...
@@ -37,7 +37,7 @@ import email
...
@@ -37,7 +37,7 @@ import email
from
email.header
import
decode_header
,
make_header
from
email.header
import
decode_header
,
make_header
from
email.utils
import
parseaddr
from
email.utils
import
parseaddr
# Copied from
ERP5Type/patches/CMFMailI
n.py
# Copied from
bt5/erp5_egov/TestTemplateItem/testEGovMixi
n.py
def
decode_email
(
file_
):
def
decode_email
(
file_
):
# Prepare result
# Prepare result
theMail
=
{
theMail
=
{
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createTableOfContent.py
View file @
d76fce32
...
@@ -15,7 +15,7 @@ import re
...
@@ -15,7 +15,7 @@ import re
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
blank
=
""
blank
=
""
header_current
=
1
header_current
=
'0'
header_initial
=
None
header_initial
=
None
table_of_content
=
blank
table_of_content
=
blank
index
=
0
index
=
0
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getHeadOfTextContent.py
View file @
d76fce32
text
=
context
.
asText
()
text
=
context
.
asText
()
LENGTH
=
25
LENGTH
=
25
#TODO: Think about the display length of multibyte characters.
#
TODO: Think about the display length of multibyte characters.
try
:
try
:
return
unicode
(
text
,
'utf-8'
)[:
LENGTH
].
encode
(
'utf-8'
)
return
unicode
(
text
,
'utf-8'
)[:
LENGTH
].
encode
(
'utf-8'
)
except
UnicodeDecodeError
:
except
UnicodeDecodeError
:
...
...
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRM.py
View file @
d76fce32
...
@@ -1603,7 +1603,7 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -1603,7 +1603,7 @@ class TestCRMMailSend(BaseTestCRM):
def
test_testValidatorForAttachmentField
(
self
):
def
test_testValidatorForAttachmentField
(
self
):
"""
"""
If an Event Type doesn't allow Em
e
bedded Files in its sub portal types,
If an Event Type doesn't allow Embedded Files in its sub portal types,
then the dialog should tell the user that attachment can't be uploaded
then the dialog should tell the user that attachment can't be uploaded
"""
"""
# Add a document which will be attached.
# Add a document which will be attached.
...
@@ -1792,7 +1792,7 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -1792,7 +1792,7 @@ class TestCRMMailSend(BaseTestCRM):
def
test_cloneEvent
(
self
):
def
test_cloneEvent
(
self
):
"""
"""
All events uses after script and interac
it
on
All events uses after script and interac
ti
on
workflow add a test for clone
workflow add a test for clone
"""
"""
# XXX in the case of title, getTitle ignores the title attribute,
# XXX in the case of title, getTitle ignores the title attribute,
...
@@ -1825,7 +1825,7 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -1825,7 +1825,7 @@ class TestCRMMailSend(BaseTestCRM):
def
test_cloneTicketAndEventList
(
self
):
def
test_cloneTicketAndEventList
(
self
):
"""
"""
All events uses after script and interac
it
on
All events uses after script and interac
ti
on
workflow add a test for clone
workflow add a test for clone
"""
"""
portal
=
self
.
portal
portal
=
self
.
portal
...
...
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testEditorField.py
View file @
d76fce32
...
@@ -150,12 +150,10 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -150,12 +150,10 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
if
html_text
.
find
(
match_string1
)
==
-
1
:
if
html_text
.
find
(
match_string1
)
==
-
1
:
print
(
html_text
)
print
(
html_text
)
print
(
match_string1
)
print
(
match_string1
)
import
pdb
;
pdb
.
set_trace
()
return
False
return
False
if
html_text
.
find
(
match_string2
)
==
-
1
:
if
html_text
.
find
(
match_string2
)
==
-
1
:
print
(
html_text
)
print
(
html_text
)
print
(
match_string2
)
print
(
match_string2
)
import
pdb
;
pdb
.
set_trace
()
return
False
return
False
return
True
return
True
...
...
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testERP5WebWithDms.py
View file @
d76fce32
...
@@ -104,8 +104,6 @@ def customScript(script_id, script_param, script_code):
...
@@ -104,8 +104,6 @@ def customScript(script_id, script_param, script_code):
class
TestERP5WebWithDms
(
ERP5TypeTestCase
,
ZopeTestCase
.
Functional
):
class
TestERP5WebWithDms
(
ERP5TypeTestCase
,
ZopeTestCase
.
Functional
):
"""Test for erp5_web business template.
"""Test for erp5_web business template.
"""
"""
run_all_test
=
1
quiet
=
0
website_id
=
'test'
website_id
=
'test'
def
getTitle
(
self
):
def
getTitle
(
self
):
...
@@ -213,28 +211,24 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -213,28 +211,24 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
return
webpage_list
return
webpage_list
def
test_01_WebPageVersioning
(
self
,
quiet
=
quiet
,
run
=
run_all_test
):
def
test_01_WebPageVersioning
(
self
):
"""
"""
Simple Case of showing the proper most recent public Web Page based on
Simple Case of showing the proper most recent public Web Page based on
(language, version)
(language, version)
"""
"""
if
not
run
:
return
if
not
quiet
:
message
=
'
\
n
test_01_WebPageVersioning'
ZopeTestCase
.
_print
(
message
)
portal
=
self
.
getPortal
()
portal
=
self
.
getPortal
()
self
.
setupWebSite
()
self
.
setupWebSite
()
websection
=
self
.
setupWebSection
()
websection
=
self
.
setupWebSection
()
page_reference
=
'default-webpage-versionning'
page_reference
=
'default-webpage-versionning'
self
.
setupWebSitePages
(
prefix
=
page_reference
)
self
.
setupWebSitePages
(
prefix
=
page_reference
)
# set default web page for section
# set default web page for section
found_by_reference
=
portal
.
portal_catalog
(
reference
=
page_reference
,
found_by_reference
=
portal
.
portal_catalog
(
reference
=
page_reference
,
language
=
'en'
,
language
=
'en'
,
portal_type
=
'Web Page'
)
portal_type
=
'Web Page'
)
en_01
=
found_by_reference
[
0
].
getObject
()
en_01
=
found_by_reference
[
0
].
getObject
()
# set it as default web page for section
# set it as default web page for section
websection
.
edit
(
categories_list
=
[
'aggregate/%s'
%
en_01
.
getRelativeUrl
(),])
websection
.
edit
(
categories_list
=
[
'aggregate/%s'
%
en_01
.
getRelativeUrl
(),])
self
.
assertEqual
([
en_01
.
getReference
(),],
self
.
assertEqual
([
en_01
.
getReference
(),],
websection
.
getAggregateReferenceList
())
websection
.
getAggregateReferenceList
())
...
@@ -259,15 +253,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -259,15 +253,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
assertEqual
(
'0.2'
,
default_document
.
getVersion
())
self
.
assertEqual
(
'0.2'
,
default_document
.
getVersion
())
self
.
assertEqual
(
'published'
,
default_document
.
getValidationState
())
self
.
assertEqual
(
'published'
,
default_document
.
getValidationState
())
def
test_02_WebSectionAuthorizationForced
(
self
,
quiet
=
quiet
,
run
=
run_all_test
):
def
test_02_WebSectionAuthorizationForced
(
self
):
""" Check that when a document is requested within a Web Section we have a chance to
""" Check that when a document is requested within a Web Section we have a chance to
require user to login.
require user to login.
Whether or not an user will login is controlled by a property on Web Section (authorization_forced).
Whether or not an user will login is controlled by a property on Web Section (authorization_forced).
"""
"""
if
not
run
:
return
if
not
quiet
:
message
=
'
\
n
test_02_WebSectionAuthorizationForced'
ZopeTestCase
.
_print
(
message
)
request
=
self
.
app
.
REQUEST
request
=
self
.
app
.
REQUEST
website
=
self
.
setupWebSite
()
website
=
self
.
setupWebSite
()
websection
=
self
.
setupWebSection
()
websection
=
self
.
setupWebSection
()
...
@@ -284,12 +274,12 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -284,12 +274,12 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
# make sure that _getExtensibleContent will return the same document
# make sure that _getExtensibleContent will return the same document
# there's not other way to test otherwise URL traversal
# there's not other way to test otherwise URL traversal
self
.
assertEqual
(
document
.
getUid
(),
self
.
assertEqual
(
document
.
getUid
(),
websection
.
_getExtensibleContent
(
request
,
document_reference
).
getUid
())
websection
.
_getExtensibleContent
(
request
,
document_reference
).
getUid
())
# Anonymous User should have in the request header for not found when
# Anonymous User should have in the request header for not found when
# viewing non available document in Web Section (with no authorization_forced)
# viewing non available document in Web Section (with no authorization_forced)
self
.
logout
()
self
.
logout
()
self
.
assertEqual
(
None
,
websection
.
_getExtensibleContent
(
request
,
document_reference
))
self
.
assertEqual
(
None
,
websection
.
_getExtensibleContent
(
request
,
document_reference
))
path
=
websection
.
absolute_url_path
()
+
'/'
+
document_reference
path
=
websection
.
absolute_url_path
()
+
'/'
+
document_reference
response
=
self
.
publish
(
path
)
response
=
self
.
publish
(
path
)
self
.
assertEqual
(
404
,
response
.
getStatus
())
self
.
assertEqual
(
404
,
response
.
getStatus
())
...
@@ -301,38 +291,32 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -301,38 +291,32 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
# check Unauthorized exception is raised for anonymous
# check Unauthorized exception is raised for anonymous
# this exception is usually caught and user is redirecetd to login form
# this exception is usually caught and user is redirecetd to login form
self
.
logout
()
self
.
logout
()
self
.
assertRaises
(
Unauthorized
,
websection
.
_getExtensibleContent
,
request
,
document_reference
)
self
.
assertRaises
(
Unauthorized
,
websection
.
_getExtensibleContent
,
request
,
document_reference
)
def
test_03_LatestContent
(
self
,
quiet
=
quiet
,
run
=
run_all_test
):
def
test_03_LatestContent
(
self
):
""" Test latest content for a Web Section. Test different use case like languaeg, workflow state.
""" Test latest content for a Web Section. Test different use case like languaeg, workflow state.
"""
"""
if
not
run
:
return
if
not
quiet
:
message
=
'
\
n
test_03_LatestContent'
ZopeTestCase
.
_print
(
message
)
portal
=
self
.
getPortal
()
portal
=
self
.
getPortal
()
self
.
setupWebSite
()
self
.
setupWebSite
()
websection
=
self
.
setupWebSection
()
websection
=
self
.
setupWebSection
()
portal_categories
=
portal
.
portal_categories
portal_categories
=
portal
.
portal_categories
publication_section_category_id_list
=
[
'documentation'
,
'administration'
]
publication_section_category_id_list
=
[
'documentation'
,
'administration'
]
for
category_id
in
publication_section_category_id_list
:
for
category_id
in
publication_section_category_id_list
:
portal_categories
.
publication_section
.
newContent
(
portal_type
=
'Category'
,
portal_categories
.
publication_section
.
newContent
(
portal_type
=
'Category'
,
id
=
category_id
)
id
=
category_id
)
# set predicate on web section using 'publication_section'
#set predicate on web section using 'publication_section'
websection
.
edit
(
membership_criterion_base_category
=
[
'publication_section'
],
websection
.
edit
(
membership_criterion_base_category
=
[
'publication_section'
],
membership_criterion_category
=
[
'publication_section/%s'
%
publication_section_category_id_list
[
0
]])
membership_criterion_category
=
[
'publication_section/%s'
%
publication_section_category_id_list
[
0
]])
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
0
,
len
(
websection
.
getDocumentValueList
()))
self
.
assertEqual
(
0
,
len
(
websection
.
getDocumentValueList
()))
# create pages belonging to this publication_section 'documentation'
# create pages belonging to this publication_section 'documentation'
web_page_en
=
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
,
web_page_en
=
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
,
language
=
'en'
,
language
=
'en'
,
publication_section_list
=
publication_section_category_id_list
[:
1
])
publication_section_list
=
publication_section_category_id_list
[:
1
])
web_page_en
.
publish
()
web_page_en
.
publish
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
(
language
=
'en'
)))
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
(
language
=
'en'
)))
self
.
assertEqual
(
web_page_en
,
websection
.
getDocumentValueList
(
language
=
'en'
)[
0
].
getObject
())
self
.
assertEqual
(
web_page_en
,
websection
.
getDocumentValueList
(
language
=
'en'
)[
0
].
getObject
())
# create pages belonging to this publication_section 'documentation' but for 'bg' language
# create pages belonging to this publication_section 'documentation' but for 'bg' language
web_page_bg
=
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
,
web_page_bg
=
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
,
...
@@ -340,29 +324,25 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -340,29 +324,25 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
publication_section_list
=
publication_section_category_id_list
[:
1
])
publication_section_list
=
publication_section_category_id_list
[:
1
])
web_page_bg
.
publish
()
web_page_bg
.
publish
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
(
language
=
'bg'
)))
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
(
language
=
'bg'
)))
self
.
assertEqual
(
web_page_bg
,
websection
.
getDocumentValueList
(
language
=
'bg'
)[
0
].
getObject
())
self
.
assertEqual
(
web_page_bg
,
websection
.
getDocumentValueList
(
language
=
'bg'
)[
0
].
getObject
())
# reject page
# reject page
web_page_bg
.
reject
()
web_page_bg
.
reject
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
0
,
len
(
websection
.
getDocumentValueList
(
language
=
'bg'
)))
self
.
assertEqual
(
0
,
len
(
websection
.
getDocumentValueList
(
language
=
'bg'
)))
# publish page and search without a language (by default system should return 'en' docs only)
# publish page and search without a language (by default system should return 'en' docs only)
web_page_bg
.
publish
()
web_page_bg
.
publish
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
()))
self
.
assertEqual
(
1
,
len
(
websection
.
getDocumentValueList
()))
self
.
assertEqual
(
web_page_en
,
websection
.
getDocumentValueList
()[
0
].
getObject
())
self
.
assertEqual
(
web_page_en
,
websection
.
getDocumentValueList
()[
0
].
getObject
())
def
test_04_WebSectionAuthorizationForcedForDefaultDocument
(
self
,
quiet
=
quiet
,
run
=
run_all_test
):
def
test_04_WebSectionAuthorizationForcedForDefaultDocument
(
self
):
""" Check that when a Web Section contains a default document not accessible by user we have a chance to
""" Check that when a Web Section contains a default document not accessible by user we have a chance to
require user to login.
require user to login.
Whether or not an user will login is controlled by a property on Web Section (authorization_forced).
Whether or not an user will login is controlled by a property on Web Section (authorization_forced).
"""
"""
if
not
run
:
return
if
not
quiet
:
message
=
'
\
n
test_04_WebSectionAuthorizationForcedForDefaultDocument'
ZopeTestCase
.
_print
(
message
)
self
.
setupWebSite
()
self
.
setupWebSite
()
websection
=
self
.
setupWebSection
()
websection
=
self
.
setupWebSection
()
web_page_reference
=
'default-document-reference'
web_page_reference
=
'default-document-reference'
...
@@ -413,15 +393,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -413,15 +393,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
commit
()
self
.
commit
()
self
.
assertEqual
(
5
,
len
(
websection
.
getDocumentValueList
(
limit
=
5
)))
self
.
assertEqual
(
5
,
len
(
websection
.
getDocumentValueList
(
limit
=
5
)))
def
test_05_deadProxyFields
(
self
,
quiet
=
quiet
,
run
=
run_all_test
):
def
test_05_deadProxyFields
(
self
):
"""
"""
check that all proxy fields defined in business templates have a valid
check that all proxy fields defined in business templates have a valid
target
target
"""
"""
if
not
run
:
return
if
not
quiet
:
message
=
'
\
n
test_05_deadProxyFields'
ZopeTestCase
.
_print
(
message
)
skins_tool
=
self
.
portal
.
portal_skins
skins_tool
=
self
.
portal
.
portal_skins
for
field_path
,
field
in
skins_tool
.
ZopeFind
(
for
field_path
,
field
in
skins_tool
.
ZopeFind
(
skins_tool
,
obj_metatypes
=
[
'ProxyField'
],
search_sub
=
1
):
skins_tool
,
obj_metatypes
=
[
'ProxyField'
],
search_sub
=
1
):
...
@@ -936,12 +912,10 @@ return True
...
@@ -936,12 +912,10 @@ return True
url at the url of the image tag. ie:
url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
"""
"""
portal
=
self
.
portal
background_image
=
self
.
portal
.
image_module
.
newContent
(
module
=
portal
.
getDefaultModule
(
portal_type
=
portal_type
)
portal_type
=
'Image'
,
upload_file
=
self
.
makeFileUpload
(
'user-TESTSVG-BACKGROUND-IMAGE.png'
)
file
=
self
.
makeFileUpload
(
'user-TESTSVG-BACKGROUND-IMAGE.png'
),
background_image
=
module
.
newContent
(
portal_type
=
portal_type
,
reference
=
"NXD-BACKGROUND"
)
file
=
upload_file
,
reference
=
"NXD-BACKGROUND"
)
background_image
.
publish
()
background_image
.
publish
()
self
.
tic
()
self
.
tic
()
...
...
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py
View file @
d76fce32
...
@@ -865,7 +865,7 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -865,7 +865,7 @@ class TestTemplateTool(ERP5TypeTestCase):
erp5_test
=
self
.
portal
.
portal_skins
[
'erp5_test'
]
erp5_test
=
self
.
portal
.
portal_skins
[
'erp5_test'
]
self
.
assertTrue
(
erp5_test
.
hasObject
(
'test_file'
))
self
.
assertTrue
(
erp5_test
.
hasObject
(
'test_file'
))
def
test_owner
hs
ip
(
self
):
def
test_owner
sh
ip
(
self
):
self
.
assertEqual
(
self
.
assertEqual
(
self
.
portal
.
portal_skins
.
erp5_core
.
getOwnerTuple
(),
self
.
portal
.
portal_skins
.
erp5_core
.
getOwnerTuple
(),
([
self
.
portal
.
getId
(),
'acl_users'
],
'System Processes'
),
([
self
.
portal
.
getId
(),
'acl_users'
],
'System Processes'
),
...
...
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
View file @
d76fce32
...
@@ -1725,7 +1725,7 @@ return context.getPortalObject().foo_module.contentValues()
...
@@ -1725,7 +1725,7 @@ return context.getPortalObject().foo_module.contentValues()
form_relative_url='
portal_skins
/
erp5_ui_test
/
FooModule_viewFooList
/
listbox
'
form_relative_url='
portal_skins
/
erp5_ui_test
/
FooModule_viewFooList
/
listbox
'
)
)
result_dict = json.loads(result)
result_dict = json.loads(result)
#
edital
ble creation date is defined at proxy form
#
edita
ble creation date is defined at proxy form
# Test the listbox_uid parameter
# Test the listbox_uid parameter
self.assertEqual(result_dict['
_embedded
']['
contents
'][0]['
listbox_uid
:
list
']['
key
'], '
listbox_uid
:
list
')
self.assertEqual(result_dict['
_embedded
']['
contents
'][0]['
listbox_uid
:
list
']['
key
'], '
listbox_uid
:
list
')
self.assertEqual(result_dict['
_embedded
']['
contents
'][0]['
id
']['
field_gadget_param
']['
type
'], '
StringField
')
self.assertEqual(result_dict['
_embedded
']['
contents
'][0]['
id
']['
field_gadget_param
']['
type
'], '
StringField
')
...
@@ -3258,10 +3258,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
...
@@ -3258,10 +3258,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
self
.
assertEqual
(
fake_request
.
RESPONSE
.
getHeader
(
'Content-Type'
),
'text/csv'
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
getHeader
(
'Content-Type'
),
'text/csv'
)
else
:
else
:
self
.
assertEqual
(
fake_request
.
RESPONSE
.
getHeader
(
'Content-Type'
),
'text/csv; charset=utf-8'
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
getHeader
(
'Content-Type'
),
'text/csv; charset=utf-8'
)
self
.
assert
True
(
'foook1'
in
result
,
result
)
self
.
assert
In
(
'foook1'
,
result
)
self
.
assert
True
(
'foook2'
in
result
,
result
)
self
.
assert
In
(
'foook2'
,
result
)
self
.
assert
True
(
'foonotok'
not
in
result
,
result
)
self
.
assert
NotIn
(
'foonotok'
,
result
)
# Check one of the field name
# Check one of the field name
self
.
assert
True
(
'Read-Only Quantity'
in
result
,
result
)
self
.
assert
In
(
'Read-Only Quantity'
,
result
)
# Ensure it is not the list mode rendering
# Ensure it is not the list mode rendering
self
.
assertTrue
(
len
(
result
.
split
(
'
\
n
'
))
>
50
,
result
)
self
.
assertTrue
(
len
(
result
.
split
(
'
\
n
'
))
>
50
,
result
)
bt5/erp5_km/TestTemplateItem/portal_components/test.erp5.testKM.py
View file @
d76fce32
...
@@ -601,11 +601,11 @@ class TestKM(TestKMMixIn):
...
@@ -601,11 +601,11 @@ class TestKM(TestKMMixIn):
# add some documents to this web section
# add some documents to this web section
presentation
=
portal
.
document_module
.
newContent
(
presentation
=
portal
.
document_module
.
newContent
(
title
=
'My presentation'
,
title
=
'My presentation'
,
portal_type
=
'Presentation'
,
portal_type
=
'Presentation'
,
reference
=
'Presentation-12456_'
,
reference
=
'Presentation-12456_'
,
version
=
'001'
,
version
=
'001'
,
language
=
'en'
,
language
=
'en'
,
publication_section_list
=
publication_section_category_id_list
[:
1
])
publication_section_list
=
publication_section_category_id_list
[:
1
])
presentation
.
publish
()
presentation
.
publish
()
self
.
tic
()
self
.
tic
()
self
.
changeSkin
(
'KM'
)
self
.
changeSkin
(
'KM'
)
...
@@ -740,7 +740,7 @@ class TestKM(TestKMMixIn):
...
@@ -740,7 +740,7 @@ class TestKM(TestKMMixIn):
portal
=
self
.
getPortal
()
portal
=
self
.
getPortal
()
portal_gadgets
=
portal
.
portal_gadgets
portal_gadgets
=
portal
.
portal_gadgets
url
=
'%s/ERP5Site_viewHomeAreaRenderer?gadget_mode=web_front'
%
self
.
web_site_url
url
=
'%s/ERP5Site_viewHomeAreaRenderer?gadget_mode=web_front'
%
self
.
web_site_url
response
=
self
.
publish
(
url
,
self
.
auth
)
response
=
self
.
publish
(
url
,
self
.
auth
)
self
.
assertIn
(
self
.
web_front_knowledge_pad
.
getTitle
(),
response
.
getBody
())
self
.
assertIn
(
self
.
web_front_knowledge_pad
.
getTitle
(),
response
.
getBody
())
...
...
bt5/erp5_palo/DocumentTemplateItem/portal_components/document.erp5.PALOETLConnection.py
View file @
d76fce32
...
@@ -69,13 +69,16 @@ class PALOETLConnection(XMLObject):
...
@@ -69,13 +69,16 @@ class PALOETLConnection(XMLObject):
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
_ignore_ssl_certificate_check
=
True
_fix_service_location
=
True
def
_getSudsClient
(
self
):
def
_getSudsClient
(
self
):
# maybe client can be cached as a _v_ attribute. For now, we do not care about performance.
# maybe client can be cached as a _v_ attribute. For now, we do not care about performance.
if
"ignore ssl certificate check"
:
if
self
.
_ignore_ssl_certificate_check
:
client
=
suds
.
client
.
Client
(
self
.
getUrlString
(),
transport
=
HTTPAuthenticatedUnverifiedSSL
())
client
=
suds
.
client
.
Client
(
self
.
getUrlString
(),
transport
=
HTTPAuthenticatedUnverifiedSSL
())
else
:
else
:
client
=
suds
.
client
.
Client
(
self
.
getUrlString
())
client
=
suds
.
client
.
Client
(
self
.
getUrlString
())
if
"fix service location"
:
if
self
.
_fix_service_location
:
# XXX The axis2 generated webservice only supports http on port 8080.
# XXX The axis2 generated webservice only supports http on port 8080.
# It seems to be using an old and buggy version of axis2.
# It seems to be using an old and buggy version of axis2.
# Easiest workaround is to force the port (in WSDL terminology) location.
# Easiest workaround is to force the port (in WSDL terminology) location.
...
...
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/AccountingTransactionModule_getPaySheetLineReportSectionLineList.py
View file @
d76fce32
...
@@ -38,10 +38,10 @@ inventory_param_dict = {
...
@@ -38,10 +38,10 @@ inventory_param_dict = {
}
}
employee_param_dict
=
inventory_param_dict
.
copy
()
employee_param_dict
=
inventory_param_dict
.
copy
()
employee_param_dict
[
'contribution_share_uid'
]
=
context
.
portal_categories
.
contribution_share
.
employee
.
getUid
()
employee_param_dict
[
'contribution_share_uid'
]
=
portal
.
portal_categories
.
contribution_share
.
employee
.
getUid
()
employer_param_dict
=
inventory_param_dict
.
copy
()
employer_param_dict
=
inventory_param_dict
.
copy
()
employer_param_dict
[
'contribution_share_uid'
]
=
context
.
portal_categories
.
contribution_share
.
employer
.
getUid
()
employer_param_dict
[
'contribution_share_uid'
]
=
portal
.
portal_categories
.
contribution_share
.
employer
.
getUid
()
if
request
.
get
(
'mirror_section'
):
if
request
.
get
(
'mirror_section'
):
mirror_section
=
request
[
'mirror_section'
]
mirror_section
=
request
[
'mirror_section'
]
...
...
bt5/erp5_safeimage/ExtensionTemplateItem/portal_components/extension.erp5.ERP5ZoomifyImage.py
View file @
d76fce32
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##############################################################################
from
__future__
import
print_function
import
os
,
sys
,
shutil
,
tempfile
import
os
,
sys
,
shutil
,
tempfile
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
from
zLOG
import
LOG
,
ERROR
,
INFO
,
WARNING
from
zLOG
import
LOG
,
ERROR
,
INFO
,
WARNING
...
@@ -28,7 +27,6 @@ try:
...
@@ -28,7 +27,6 @@ try:
except
ImportError
:
# BBB Zope2
except
ImportError
:
# BBB Zope2
from
Globals
import
package_home
from
Globals
import
package_home
import
PIL.Image
as
PIL_Image
import
PIL.Image
as
PIL_Image
import
thread
import
random
import
random
import
base64
import
base64
from
OFS.Folder
import
Folder
from
OFS.Folder
import
Folder
...
@@ -176,15 +174,12 @@ class ZoomifyBase:
...
@@ -176,15 +174,12 @@ class ZoomifyBase:
lr_y
=
ul_y
+
self
.
tileSize
lr_y
=
ul_y
+
self
.
tileSize
else
:
else
:
lr_y
=
self
.
originalHeight
lr_y
=
self
.
originalHeight
print
(
"Going to open image"
)
imageRow
=
image
.
crop
([
0
,
ul_y
,
self
.
originalWidth
,
lr_y
])
imageRow
=
image
.
crop
([
0
,
ul_y
,
self
.
originalWidth
,
lr_y
])
saveFilename
=
root
+
str
(
tier
)
+
'-'
+
str
(
row
)
+
ext
saveFilename
=
root
+
str
(
tier
)
+
'-'
+
str
(
row
)
+
ext
if
imageRow
.
mode
!=
'RGB'
:
if
imageRow
.
mode
!=
'RGB'
:
imageRow
=
imageRow
.
convert
(
'RGB'
)
imageRow
=
imageRow
.
convert
(
'RGB'
)
imageRow
.
save
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
saveFilename
),
imageRow
.
save
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
saveFilename
),
'JPEG'
,
quality
=
100
)
'JPEG'
,
quality
=
100
)
print
(
"os path exist : %r"
%
os
.
path
.
exists
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
saveFilename
)))
if
os
.
path
.
exists
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
saveFilename
)):
if
os
.
path
.
exists
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
saveFilename
)):
self
.
processRowImage
(
tier
=
tier
,
row
=
row
)
self
.
processRowImage
(
tier
=
tier
,
row
=
row
)
row
+=
1
row
+=
1
...
@@ -192,7 +187,6 @@ class ZoomifyBase:
...
@@ -192,7 +187,6 @@ class ZoomifyBase:
def
processRowImage
(
self
,
tier
=
0
,
row
=
0
):
def
processRowImage
(
self
,
tier
=
0
,
row
=
0
):
""" for an image, create and save tiles """
""" for an image, create and save tiles """
print
(
'*** processing tier: '
+
str
(
tier
)
+
' row: '
+
str
(
row
))
tierWidth
,
tierHeight
=
self
.
_v_scaleInfo
[
tier
]
tierWidth
,
tierHeight
=
self
.
_v_scaleInfo
[
tier
]
rowsForTier
=
tierHeight
/
self
.
tileSize
rowsForTier
=
tierHeight
/
self
.
tileSize
if
tierHeight
%
self
.
tileSize
>
0
:
if
tierHeight
%
self
.
tileSize
>
0
:
...
@@ -335,7 +329,7 @@ class ZoomifyZopeProcessor(ZoomifyBase):
...
@@ -335,7 +329,7 @@ class ZoomifyZopeProcessor(ZoomifyBase):
def
openImage
(
self
):
def
openImage
(
self
):
""" load the image data """
""" load the image data """
return
PIL_Image
.
open
(
self
.
_v_imageObject
.
name
)
return
PIL_Image
.
open
(
self
.
_v_imageObject
)
def
createDefaultViewer
(
self
):
def
createDefaultViewer
(
self
):
""" add the default Zoomify viewer to the Zoomify metadata """
""" add the default Zoomify viewer to the Zoomify metadata """
...
...
bt5/erp5_safeimage/SkinTemplateItem/portal_skins/erp5_safeimage/SeleniumSafeImage_uploadFile.py
View file @
d76fce32
#from Products.ERP5.Document.TileImageTransformed import TileImageTransformed
#from cStringIO import StringIO
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
data
=
portal
.
restrictedTraverse
(
"portal_skins/erp5_safeimage/img/image_test.jpg"
)
data
=
portal
.
restrictedTraverse
(
"portal_skins/erp5_safeimage/img/image_test.jpg"
)
print
(
data
.
data
)
print
(
data
.
data
)
return
printed
return
printed
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_fastInput.py
View file @
d76fce32
...
@@ -70,7 +70,6 @@ with ImmediateReindexContextManager() as immediate_reindex_context_manager:
...
@@ -70,7 +70,6 @@ with ImmediateReindexContextManager() as immediate_reindex_context_manager:
line_variation_base_category_list
=
line_variation_base_category_dict
.
keys
()
line_variation_base_category_list
=
line_variation_base_category_dict
.
keys
()
# construct new content (container_line)
# construct new content (container_line)
resource_url
=
resource_url
new_container_line_id
=
str
(
container
.
generateNewId
())
new_container_line_id
=
str
(
container
.
generateNewId
())
container_line
=
container
.
newContent
(
container_line
=
container
.
newContent
(
immediate_reindex
=
immediate_reindex_context_manager
,
immediate_reindex
=
immediate_reindex_context_manager
,
...
...
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testOrder.py
View file @
d76fce32
...
@@ -2838,11 +2838,11 @@ class TestOrder(TestOrderMixin, ERP5TypeTestCase):
...
@@ -2838,11 +2838,11 @@ class TestOrder(TestOrderMixin, ERP5TypeTestCase):
portal_type
=
'Organisation'
,
title
=
'Client'
,
portal_type
=
'Organisation'
,
title
=
'Client'
,
default_image_file
=
image
)
default_image_file
=
image
)
from
OFS.Image
import
Pdata
from
OFS.Image
import
Pdata
self
.
assert
True
(
isinstance
(
client
.
getDefaultImageValue
().
data
,
Pdata
)
)
self
.
assert
IsInstance
(
client
.
getDefaultImageValue
().
data
,
Pdata
)
vendor
=
self
.
portal
.
organisation_module
.
newContent
(
vendor
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Vendor'
,
portal_type
=
'Organisation'
,
title
=
'Vendor'
,
default_image_file
=
image
)
default_image_file
=
image
)
self
.
assert
True
(
isinstance
(
vendor
.
getDefaultImageValue
().
data
,
Pdata
)
)
self
.
assert
IsInstance
(
vendor
.
getDefaultImageValue
().
data
,
Pdata
)
order
=
self
.
portal
.
getDefaultModule
(
self
.
order_portal_type
).
newContent
(
order
=
self
.
portal
.
getDefaultModule
(
self
.
order_portal_type
).
newContent
(
portal_type
=
self
.
order_portal_type
,
portal_type
=
self
.
order_portal_type
,
specialise
=
self
.
business_process
,
specialise
=
self
.
business_process
,
...
...
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testPackingList.py
View file @
d76fce32
...
@@ -1799,7 +1799,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
...
@@ -1799,7 +1799,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
sale_packing_list2
.
getUid
()))]
sale_packing_list2
.
getUid
()))]
self
.
assertEqual
({
self
.
default_quantity
-
4
,
self
.
default_quantity
-
3
},
self
.
assertEqual
({
self
.
default_quantity
-
4
,
self
.
default_quantity
-
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
self
.
assertEqual
({
1
,
1
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
({
1
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
def
getSolverProcessStateList
(
delivery
):
def
getSolverProcessStateList
(
delivery
):
...
@@ -1811,7 +1811,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
...
@@ -1811,7 +1811,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
self
.
assertEqual
({
self
.
default_quantity
-
4
,
self
.
default_quantity
-
3
},
self
.
assertEqual
({
self
.
default_quantity
-
4
,
self
.
default_quantity
-
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
self
.
assertEqual
({
1
,
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
1
,
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
2
,
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
({
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
...
@@ -1822,7 +1822,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
...
@@ -1822,7 +1822,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
self
.
assertEqual
({
self
.
default_quantity
-
5
,
self
.
default_quantity
-
4
},
self
.
assertEqual
({
self
.
default_quantity
-
5
,
self
.
default_quantity
-
4
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
self
.
assertEqual
({
2
,
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
2
,
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
2
,
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
({
2
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
...
@@ -1837,7 +1837,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
...
@@ -1837,7 +1837,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
self
.
assertEqual
({
self
.
default_quantity
-
6
,
self
.
default_quantity
-
5
},
self
.
assertEqual
({
self
.
default_quantity
-
6
,
self
.
default_quantity
-
5
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list1
.
getMovementList
()]))
self
.
assertEqual
({
2
,
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
2
,
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list2
.
getMovementList
()]))
self
.
assertEqual
({
3
,
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
({
3
},
set
([
x
.
getQuantity
()
for
x
in
sale_packing_list3
.
getMovementList
()]))
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list1
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list2
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
self
.
assertEqual
(
"solved"
,
sale_packing_list3
.
getCausalityState
())
...
...
bt5/erp5_trade/TestTemplateItem/portal_components/test.erp5.testResource.py
View file @
d76fce32
...
@@ -1412,6 +1412,7 @@ class TestResource(ERP5TypeTestCase):
...
@@ -1412,6 +1412,7 @@ class TestResource(ERP5TypeTestCase):
self
.
assertEqual
(
resource
.
getInternalSupplyLineDestinationReference
(),
self
.
assertEqual
(
resource
.
getInternalSupplyLineDestinationReference
(),
'test_destination_reference_on_internal_supply_line'
)
'test_destination_reference_on_internal_supply_line'
)
@
expectedFailure
def
testQuantityUnitOnMovement
(
self
):
def
testQuantityUnitOnMovement
(
self
):
"""Make sure that changing default quantity unit on resource does not
"""Make sure that changing default quantity unit on resource does not
affect to movement.
affect to movement.
...
@@ -1464,7 +1465,8 @@ class TestResource(ERP5TypeTestCase):
...
@@ -1464,7 +1465,8 @@ class TestResource(ERP5TypeTestCase):
# Check existing movement again and make sure that quantity
# Check existing movement again and make sure that quantity
# unit is not changed.
# unit is not changed.
expectedFailure
(
self
.
assertEqual
)(
# XXX This is the expectedFailure
self
.
assertEqual
(
sale_order_line
.
getQuantityUnitValue
(),
sale_order_line
.
getQuantityUnitValue
(),
self
.
quantity_unit_gram
)
self
.
quantity_unit_gram
)
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testBlobSave.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testEmptyDivGeneration.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoad.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoadMultiline.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoadWithRelationField.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.zpt
View file @
d76fce32
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.zpt
View file @
d76fce32
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?start:int=3
;num:int=7
;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?start:int=3
&
num:int=7
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testComplexDomainTree.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category/foo_big_category%7CFoo%20and%20Big%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_category/foo_big_category%7CFoo%20and%20Big%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testConfigure.zpt
View file @
d76fce32
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<!-- XXX bug compatibility; all columns must be set explicitly -->
<!-- XXX bug compatibility; all columns must be set explicitly -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_all_columns=id%7CID%0Atitle%7CTitle%0Adelivery.quantity%7CQuantity;field_stat_method=portal_catalog
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_all_columns=id%7CID%0Atitle%7CTitle%0Adelivery.quantity%7CQuantity
&
;
field_stat_method=portal_catalog
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testCustomSort.zpt
View file @
d76fce32
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<!-- XXX bug compatibility; all_columns are used for sortable columns. -->
<!-- XXX bug compatibility; all_columns are used for sortable columns. -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_sort_columns=id%0Atitle;field_all_columns=id%0Atitle
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_sort_columns=id%0Atitle
&
;
field_all_columns=id%0Atitle
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainAndReportTrees.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<!-- Click on report tree -->
<!-- Click on report tree -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked;field_report_root_list=foo_category%7CFoo%20Category%0Afoo_empty_category%7CFoo%20Empty%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked
&
;
field_report_root_list=foo_category%7CFoo%20Category%0Afoo_empty_category%7CFoo%20Empty%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainTree.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDomainTreeObsoleteValue.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=parent_domain%7CParent
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=parent_domain%7CParent
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDynamicDomainTree.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_domain%7CFoo%20Domain
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_domain%7CFoo%20Domain
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testDynamicReportTree.zpt
View file @
d76fce32
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked;field_report_root_list=foo_domain%7CFoo%20Domain
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked
&
;
field_report_root_list=foo_domain%7CFoo%20Domain
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testMetaTypes.zpt
View file @
d76fce32
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=ERP5%20Delivery;field_portal_types=
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=ERP5%20Delivery
&
;
field_portal_types=
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=ERP5%20Toto;field_portal_types=
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=ERP5%20Toto
&
;
field_portal_types=
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPortalTypes.zpt
View file @
d76fce32
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=;field_portal_types=Foo
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=
&
;
field_portal_types=Foo
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
</tal:block>
</tal:block>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=;field_portal_types=Toto
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_meta_types=
&
;
field_portal_types=Toto
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.zpt
View file @
d76fce32
...
@@ -322,7 +322,7 @@
...
@@ -322,7 +322,7 @@
Don't forget to update the code below if listbox_zuite/testDomainTree change. -->
Don't forget to update the code below if listbox_zuite/testDomainTree change. -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/0/Foo_viewRelationField/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td>
${base_url}/foo_module/0/Foo_viewRelationField/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.zpt
View file @
d76fce32
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked;field_report_root_list=foo_category%7CFoo%20Category%0Afoo_empty_category%7CFoo%20Empty%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_report_tree=checked
&
;
field_report_root_list=foo_category%7CFoo%20Category%0Afoo_empty_category%7CFoo%20Empty%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.zpt
View file @
d76fce32
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_stat_method=portal_catalog
;field_report_tree=checked
;field_report_root_list=foo_domain%7CFoo%20Domain
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_stat_method=portal_catalog
&
field_report_tree=checked
&
;
field_report_root_list=foo_domain%7CFoo%20Domain
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.zpt
View file @
d76fce32
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_stat_columns=id%7CFooModule_statId%0Atitle%7CFooModule_statTitle;field_stat_method=portal_catalog
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_stat_columns=id%7CFooModule_statId%0Atitle%7CFooModule_statTitle
&
;
field_stat_method=portal_catalog
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionDomainTree.zpt
View file @
d76fce32
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked
&
;
field_domain_root_list=foo_category%7CFoo%20Category
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/planning_box_field_zuite/testPlanningBoxColumnHeaderLink.zpt
View file @
d76fce32
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str((DateTime().day()
/3)+
1)) "
></td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str((DateTime().day()
// 3) +
1)) "
></td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str(DateTime().dow()
+
1)) "
></td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str(DateTime().dow()
+
1)) "
></td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/planning_box_field_zuite/testPlanningBoxVerticalViewColumnHeaderLink.zpt
View file @
d76fce32
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str(DateTime().dow()
+1)) "
></td>
<td
tal:content=
"python: '//div[@id=\'group_lane_%s\']//a' % (str(DateTime().dow()
+ 1))"
></td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testModuleListboxDefaultMoreColumns.zpt
View file @
d76fce32
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/ListBoxZuite_CommonTemplate/macros/init"
/>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1;portal_type=Bar
</td>
<td>
${base_url}/bar_module/FooModule_createObjects?num:int=1
&
;
portal_type=Bar
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxDialogModeZuite_CommonTemplate.zpt
View file @
d76fce32
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</tr>
</tr>
<tr>
<tr>
<td>open</td>
<td>open</td>
<td>${base_url}/bar_module/FooModule_createObjects?num:int=3;portal_type=Bar</td>
<td>${base_url}/bar_module/FooModule_createObjects?num:int=3
&
;portal_type=Bar</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckCustomDialogWorkflowHistory.py
View file @
d76fce32
...
@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
...
@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
result
=
'OK'
result
=
'OK'
error_list
=
[]
error_list
=
[]
def
assertEqual
s
(
a
,
b
,
msg
=
''
):
def
assertEqual
(
a
,
b
,
msg
=
''
):
if
a
!=
b
:
if
a
!=
b
:
if
msg
:
if
msg
:
error_list
.
append
(
msg
)
error_list
.
append
(
msg
)
...
@@ -17,25 +17,25 @@ def assertEquals(a, b, msg=''):
...
@@ -17,25 +17,25 @@ def assertEquals(a, b, msg=''):
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
foo_2
=
foo_module
[
'2'
]
foo_2
=
foo_module
[
'2'
]
assertEqual
s
(
foo_2
.
getSimulationState
(),
'validated'
,
assertEqual
(
foo_2
.
getSimulationState
(),
'validated'
,
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
if
not
error_list
:
if
not
error_list
:
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
'Comment !'
)
'Comment !'
)
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'custom_workflow_variable'
],
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'custom_workflow_variable'
],
'Custom Workflow Variable'
)
'Custom Workflow Variable'
)
foo_3
=
foo_module
[
'3'
]
foo_3
=
foo_module
[
'3'
]
assertEqual
s
(
foo_3
.
getSimulationState
(),
'validated'
,
assertEqual
(
foo_3
.
getSimulationState
(),
'validated'
,
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
if
not
error_list
:
if
not
error_list
:
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
'Comment !'
)
'Comment !'
)
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'custom_workflow_variable'
],
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'custom_workflow_variable'
],
'Custom Workflow Variable'
)
'Custom Workflow Variable'
)
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.py
View file @
d76fce32
...
@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
...
@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
result
=
'OK'
result
=
'OK'
error_list
=
[]
error_list
=
[]
def
assertEqual
s
(
a
,
b
,
msg
=
''
):
def
assertEqual
(
a
,
b
,
msg
=
''
):
if
a
!=
b
:
if
a
!=
b
:
if
msg
:
if
msg
:
error_list
.
append
(
msg
)
error_list
.
append
(
msg
)
...
@@ -17,18 +17,18 @@ def assertEquals(a, b, msg=''):
...
@@ -17,18 +17,18 @@ def assertEquals(a, b, msg=''):
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
foo_2
=
foo_module
[
'2'
]
foo_2
=
foo_module
[
'2'
]
assertEqual
s
(
foo_2
.
getSimulationState
(),
'validated'
,
assertEqual
(
foo_2
.
getSimulationState
(),
'validated'
,
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
if
not
error_list
:
if
not
error_list
:
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
wtool
.
getInfoFor
(
foo_2
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
'Comment !'
)
'Comment !'
)
foo_3
=
foo_module
[
'3'
]
foo_3
=
foo_module
[
'3'
]
assertEqual
s
(
foo_3
.
getSimulationState
(),
'validated'
,
assertEqual
(
foo_3
.
getSimulationState
(),
'validated'
,
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
if
not
error_list
:
if
not
error_list
:
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
'Comment !'
)
'Comment !'
)
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.py
View file @
d76fce32
...
@@ -10,7 +10,7 @@ wtool = getToolByName(context, 'portal_workflow')
...
@@ -10,7 +10,7 @@ wtool = getToolByName(context, 'portal_workflow')
result
=
'OK'
result
=
'OK'
error_list
=
[]
error_list
=
[]
def
assertEqual
s
(
a
,
b
,
msg
=
''
):
def
assertEqual
(
a
,
b
,
msg
=
''
):
if
a
!=
b
:
if
a
!=
b
:
if
msg
:
if
msg
:
error_list
.
append
(
msg
)
error_list
.
append
(
msg
)
...
@@ -18,15 +18,15 @@ def assertEquals(a, b, msg=''):
...
@@ -18,15 +18,15 @@ def assertEquals(a, b, msg=''):
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
error_list
.
append
(
'%r != %r'
%
(
a
,
b
))
foo_2
=
foo_module
[
'2'
]
foo_2
=
foo_module
[
'2'
]
assertEqual
s
(
foo_2
.
getSimulationState
(),
'draft'
,
assertEqual
(
foo_2
.
getSimulationState
(),
'draft'
,
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
'Foo 2 state is %s'
%
foo_2
.
getSimulationState
())
foo_3
=
foo_module
[
'3'
]
foo_3
=
foo_module
[
'3'
]
assertEqual
s
(
foo_3
.
getSimulationState
(),
'validated'
,
assertEqual
(
foo_3
.
getSimulationState
(),
'validated'
,
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
'Foo 3 state is %s'
%
foo_3
.
getSimulationState
())
if
not
error_list
:
if
not
error_list
:
assertEqual
s
(
assertEqual
(
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
wtool
.
getInfoFor
(
foo_3
,
'history'
,
wf_id
=
'foo_workflow'
)[
-
2
][
'comment'
],
'Comment !'
)
'Comment !'
)
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
View file @
d76fce32
...
@@ -15,7 +15,7 @@ portal = context.getPortalObject()
...
@@ -15,7 +15,7 @@ portal = context.getPortalObject()
default_language
=
web_section
.
getLayoutProperty
(
"default_available_language"
,
default
=
'en'
)
default_language
=
web_section
.
getLayoutProperty
(
"default_available_language"
,
default
=
'en'
)
website_url_set
=
{}
website_url_set
=
{}
#
simplify code of Base_doLanguage, can't ues
Base_doLanguage directly
#
simplify code of Base_doLanguage, can't use
Base_doLanguage directly
root_website_url
=
web_section
.
getOriginalDocument
().
absolute_url
()
root_website_url
=
web_section
.
getOriginalDocument
().
absolute_url
()
website_url_pattern
=
r'^%s(?:%s)*(/|$)'
%
(
website_url_pattern
=
r'^%s(?:%s)*(/|$)'
%
(
re
.
escape
(
root_website_url
),
re
.
escape
(
root_website_url
),
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
View file @
d76fce32
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_columns=modification_date%7CModification%20Date;field_editable=checked
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_columns=modification_date%7CModification%20Date
&
;
field_editable=checked
</td>
<td></td>
<td></td>
</tr>
</tr>
...
...
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
View file @
d76fce32
...
@@ -45,7 +45,6 @@ class ShaDirMixin(object):
...
@@ -45,7 +45,6 @@ class ShaDirMixin(object):
Initialize the ERP5 site.
Initialize the ERP5 site.
"""
"""
self
.
login
()
self
.
login
()
self
.
portal
=
self
.
getPortal
()
self
.
key
=
'mykey'
+
str
(
random
.
random
())
self
.
key
=
'mykey'
+
str
(
random
.
random
())
self
.
file_content
=
'This is the content.'
self
.
file_content
=
'This is the content.'
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.TextDocument.py
View file @
d76fce32
...
@@ -366,8 +366,7 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin, TextContent
...
@@ -366,8 +366,7 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin, TextContent
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTextContent'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTextContent'
)
def
getTextContent
(
self
,
default
=
_MARKER
):
def
getTextContent
(
self
,
default
=
_MARKER
):
"""Overriden method to check
"""Overridden method to check permission to access content in raw format
permission to access content in raw format
"""
"""
self
.
_checkConversionFormatPermission
(
None
)
self
.
_checkConversionFormatPermission
(
None
)
if
default
is
_MARKER
:
if
default
is
_MARKER
:
...
...
product/ERP5/tests/utils.py
View file @
d76fce32
...
@@ -186,4 +186,5 @@ class BusinessTemplateInfoDir(BusinessTemplateInfoBase):
...
@@ -186,4 +186,5 @@ class BusinessTemplateInfoDir(BusinessTemplateInfoBase):
return
fileinfo
return
fileinfo
def
readFileInfo
(
self
,
fileinfo
):
def
readFileInfo
(
self
,
fileinfo
):
return
open
(
fileinfo
).
read
()
with
open
(
fileinfo
)
as
f
:
return
f
.
read
()
product/ERP5OOo/tests/TestFormPrintoutMixin.py
View file @
d76fce32
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
six
import
StringIO
class
TestFormPrintoutMixin
(
ERP5TypeTestCase
):
class
TestFormPrintoutMixin
(
ERP5TypeTestCase
):
run_all_test
=
1
run_all_test
=
1
...
...
product/ERP5OOo/tests/testIngestion.py
View file @
d76fce32
...
@@ -792,10 +792,10 @@ class TestIngestion(IngestionTestCase):
...
@@ -792,10 +792,10 @@ class TestIngestion(IngestionTestCase):
document
.
edit
(
file
=
f
)
document
.
edit
(
file
=
f
)
mime
,
text
=
document
.
convert
(
'text'
)
mime
,
text
=
document
.
convert
(
'text'
)
self
.
assertIn
(
'magic'
,
text
)
self
.
assertIn
(
'magic'
,
text
)
self
.
assert
True
(
mime
==
'text/plain'
)
self
.
assert
Equal
(
mime
,
'text/plain'
)
mime
,
html
=
document
.
convert
(
'html'
)
mime
,
html
=
document
.
convert
(
'html'
)
self
.
assertIn
(
'magic'
,
html
)
self
.
assertIn
(
'magic'
,
html
)
self
.
assert
True
(
mime
==
'text/html'
)
self
.
assert
Equal
(
mime
,
'text/html'
)
def
stepExportImage
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepExportImage
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""
"""
...
...
product/ERP5Type/patches/python.py
View file @
d76fce32
...
@@ -130,7 +130,7 @@ def patch_linecache():
...
@@ -130,7 +130,7 @@ def patch_linecache():
properly without requiring to create a temporary file on the filesystem
properly without requiring to create a temporary file on the filesystem
The filename is is always '<portal_components/*>' for ZODB Components,
The filename is is always '<portal_components/*>' for ZODB Components,
'(FILENAME)?Script
\
(Py
t
hon
\
)
'
for Zope Python Scripts and 'Python
'(FILENAME)?Script
\
\
(Python
\
\
)' for Zope Python Scripts and 'Python
Expression "CODE"' for TALES expressions.
Expression "CODE"' for TALES expressions.
linecache.cache filled by linecache.updatecache() called by the original
linecache.cache filled by linecache.updatecache() called by the original
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
d76fce32
...
@@ -9,7 +9,6 @@ __version__ = '0.3.0'
...
@@ -9,7 +9,6 @@ __version__ = '0.3.0'
import
base64
import
base64
import
errno
import
errno
import
httplib
import
os
import
os
import
random
import
random
import
re
import
re
...
@@ -18,7 +17,6 @@ import string
...
@@ -18,7 +17,6 @@ import string
import
sys
import
sys
import
time
import
time
import
traceback
import
traceback
import
urllib
import
ConfigParser
import
ConfigParser
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
io
import
BytesIO
from
io
import
BytesIO
...
@@ -32,7 +30,6 @@ from DateTime import DateTime
...
@@ -32,7 +30,6 @@ from DateTime import DateTime
import
mock
import
mock
import
Products.ZMySQLDA.DA
import
Products.ZMySQLDA.DA
from
Products.ZMySQLDA.DA
import
Connection
as
ZMySQLDA_Connection
from
Products.ZMySQLDA.DA
import
Connection
as
ZMySQLDA_Connection
from
zope.globalrequest
import
clearRequest
from
zope.globalrequest
import
getRequest
from
zope.globalrequest
import
getRequest
from
zope.globalrequest
import
setRequest
from
zope.globalrequest
import
setRequest
import
six
import
six
...
@@ -171,7 +168,8 @@ def _createTestPromiseConfigurationFile(promise_path, bt5_repository_path_list=N
...
@@ -171,7 +168,8 @@ def _createTestPromiseConfigurationFile(promise_path, bt5_repository_path_list=N
promise_config
.
set
(
'portal_certificate_authority'
,
'certificate_authority_path'
,
promise_config
.
set
(
'portal_certificate_authority'
,
'certificate_authority_path'
,
os
.
environ
[
'TEST_CA_PATH'
])
os
.
environ
[
'TEST_CA_PATH'
])
promise_config
.
write
(
open
(
promise_path
,
'w'
))
with
open
(
promise_path
,
'w'
)
as
f
:
promise_config
.
write
(
f
)
def
profile_if_environ
(
environment_var_name
):
def
profile_if_environ
(
environment_var_name
):
if
int
(
os
.
environ
.
get
(
environment_var_name
,
0
)):
if
int
(
os
.
environ
.
get
(
environment_var_name
,
0
)):
...
...
product/PortalTransforms/libtransforms/commandtransform.py
View file @
d76fce32
...
@@ -34,7 +34,8 @@ class commandtransform:
...
@@ -34,7 +34,8 @@ class commandtransform:
os
.
mkdir
(
tmpdir
)
os
.
mkdir
(
tmpdir
)
filename
=
kwargs
.
get
(
"filename"
,
''
)
filename
=
kwargs
.
get
(
"filename"
,
''
)
fullname
=
join
(
tmpdir
,
basename
(
filename
))
fullname
=
join
(
tmpdir
,
basename
(
filename
))
filedest
=
open
(
fullname
,
"wb"
).
write
(
data
)
with
open
(
fullname
,
"wb"
)
as
f
:
f
.
write
(
data
)
return
tmpdir
,
fullname
return
tmpdir
,
fullname
def
subObjects
(
self
,
tmpdir
):
def
subObjects
(
self
,
tmpdir
):
...
@@ -50,7 +51,8 @@ class commandtransform:
...
@@ -50,7 +51,8 @@ class commandtransform:
def
fixImages
(
self
,
path
,
images
,
objects
):
def
fixImages
(
self
,
path
,
images
,
objects
):
for
image
in
images
:
for
image
in
images
:
objects
[
image
]
=
open
(
join
(
path
,
image
),
'rb'
).
read
()
with
open
(
join
(
path
,
image
),
'rb'
)
as
f
:
objects
[
image
]
=
f
.
read
()
def
cleanDir
(
self
,
tmpdir
):
def
cleanDir
(
self
,
tmpdir
):
shutil
.
rmtree
(
tmpdir
)
shutil
.
rmtree
(
tmpdir
)
...
@@ -151,7 +153,7 @@ class subprocesstransform:
...
@@ -151,7 +153,7 @@ class subprocesstransform:
try
:
try
:
if
not
self
.
useStdin
:
if
not
self
.
useStdin
:
stdin_file
=
tempfile
.
NamedTemporaryFile
()
stdin_file
=
tempfile
.
NamedTemporaryFile
()
stdin_file
.
write
(
data
)
stdin_file
.
write
(
data
)
stdin_file
.
seek
(
0
)
stdin_file
.
seek
(
0
)
command
=
command
%
{
'infile'
:
stdin_file
.
name
}
# apply tmp name to command
command
=
command
%
{
'infile'
:
stdin_file
.
name
}
# apply tmp name to command
data
=
None
data
=
None
...
...
product/Zelenium/scripts/tinyWebServer.py
View file @
d76fce32
...
@@ -21,7 +21,6 @@ from __future__ import print_function
...
@@ -21,7 +21,6 @@ from __future__ import print_function
import
BaseHTTPServer
import
BaseHTTPServer
import
CGIHTTPServer
import
CGIHTTPServer
import
time
import
time
import
httplib
import
sys
import
sys
PORT
=
8000
PORT
=
8000
...
...
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