Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
erp5
Commits
9c7d959f
Commit
9c7d959f
authored
Jul 29, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Enable coding style on configurator business templates
See merge request
nexedi/erp5!1212
parents
165870a2
56ddd874
Changes
87
Hide whitespace changes
Inline
Side-by-side
Showing
87 changed files
with
768 additions
and
711 deletions
+768
-711
bt5/erp5_configurator/ActionTemplateItem/portal_types/Workflow%20Security%20Configurator%20Item/view.xml
..._types/Workflow%20Security%20Configurator%20Item/view.xml
+0
-79
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py
...ortal_components/document.erp5.AccountConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml
...rtal_components/document.erp5.AccountConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py
...ponents/document.erp5.AccountingPeriodConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml
...onents/document.erp5.AccountingPeriodConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py
...nt.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py
+4
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml
...t.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py
...cument.erp5.AdvancedSaleTradeConditionConfiguratorItem.py
+4
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml
...ument.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py
.../portal_components/document.erp5.AlarmConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml
...portal_components/document.erp5.AlarmConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py
...l_components/document.erp5.BankAccountConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml
..._components/document.erp5.BankAccountConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py
...mponents/document.erp5.BusinessProcessConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml
...ponents/document.erp5.BusinessProcessConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py
...onents/document.erp5.CatalogKeywordKeyConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml
...nents/document.erp5.CatalogKeywordKeyConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py
...ts/document.erp5.CategoriesSpreadsheetConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml
...s/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py
...rtal_components/document.erp5.CategoryConfiguratorItem.py
+3
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml
...tal_components/document.erp5.CategoryConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py
...rtal_components/document.erp5.CurrencyConfiguratorItem.py
+3
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml
...tal_components/document.erp5.CurrencyConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py
...l_components/document.erp5.CustomerBT5ConfiguratorItem.py
+3
-4
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml
..._components/document.erp5.CustomerBT5ConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py
..._components/document.erp5.OrganisationConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml
...components/document.erp5.OrganisationConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py
...al_components/document.erp5.PermissionConfiguratorItem.py
+3
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml
...l_components/document.erp5.PermissionConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py
...portal_components/document.erp5.PersonConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml
...ortal_components/document.erp5.PersonConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py
...al_components/document.erp5.PortalTypeConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml
...l_components/document.erp5.PortalTypeConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py
...cument.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml
...ument.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py
...al_components/document.erp5.PreferenceConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml
...l_components/document.erp5.PreferenceConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py
...s/document.erp5.PurchaseTradeConditionConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml
.../document.erp5.PurchaseTradeConditionConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py
...m/portal_components/document.erp5.RoleConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml
.../portal_components/document.erp5.RoleConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py
...m/portal_components/document.erp5.RuleConfiguratorItem.py
+2
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml
.../portal_components/document.erp5.RuleConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py
...nents/document.erp5.SaleTradeConditionConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml
...ents/document.erp5.SaleTradeConditionConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py
.../document.erp5.SecurityCategoryMappingConfiguratorItem.py
+3
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml
...document.erp5.SecurityCategoryMappingConfiguratorItem.xml
+25
-7
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py
...ortal_components/document.erp5.ServiceConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml
...rtal_components/document.erp5.ServiceConfiguratorItem.xml
+1
-3
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py
..._components/document.erp5.SitePropertyConfiguratorItem.py
+9
-8
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml
...components/document.erp5.SitePropertyConfiguratorItem.xml
+25
-7
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py
...portal_components/document.erp5.SolverConfiguratorItem.py
+4
-4
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml
...ortal_components/document.erp5.SolverConfiguratorItem.xml
+25
-7
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py
...l_components/document.erp5.StandardBT5ConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml
..._components/document.erp5.StandardBT5ConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py
...ponents/document.erp5.SystemPreferenceConfiguratorItem.py
+3
-2
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml
...onents/document.erp5.SystemPreferenceConfiguratorItem.xml
+25
-6
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WorkflowSecurityConfiguratorItem.py
...ponents/document.erp5.WorkflowSecurityConfiguratorItem.py
+0
-130
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WorkflowSecurityConfiguratorItem.xml
...onents/document.erp5.WorkflowSecurityConfiguratorItem.xml
+0
-113
bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py
...portal_components/mixin.erp5.SkinConfiguratorItemMixin.py
+2
-1
bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml
...ortal_components/mixin.erp5.SkinConfiguratorItemMixin.xml
+25
-6
bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+0
-1
bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Workflow%20Security%20Configurator%20Item.xml
...ortal_types/Workflow%20Security%20Configurator%20Item.xml
+0
-32
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/Base_viewConfiguratorFieldLibrary/my_view_mode_configuration_class_dict.xml
...torFieldLibrary/my_view_mode_configuration_class_dict.xml
+6
-28
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py
..._configurator/BusinessConfiguration_getISOCurrencyList.py
+1
-1
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml
...configurator/BusinessConfiguration_getISOCurrencyList.xml
+1
-1
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py
...p5_configurator/BusinessConfiguration_getUIDescription.py
+1
-1
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py
...gurator/BusinessConfiguration_validateCustomerPassword.py
+2
-5
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py
...gurator/BusinessConfiguration_validateCustomerUsername.py
+2
-2
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_displayBusinessConfigurationList.zpt
...ard/ConfiguratorTool_displayBusinessConfigurationList.zpt
+8
-10
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py
...onfigurator_wizard/ConfiguratorTool_generateJavaScript.py
+0
-1
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_view/my_header.xml
...5_configurator_wizard/ConfiguratorTool_view/my_header.xml
+2
-4
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py
...wizard/ConfiguratorTool_viewRunningInstallationMessage.py
+0
-2
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/wizard.css.css
...Item/portal_skins/erp5_configurator_wizard/wizard.css.css
+2
-2
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/wizard_template_erp5_xhtml_style.zpt
..._configurator_wizard/wizard_template_erp5_xhtml_style.zpt
+1
-3
bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py
...eItem/portal_components/test.erp5.testConfiguratorItem.py
+4
-21
bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml
...Item/portal_components/test.erp5.testConfiguratorItem.xml
+25
-16
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py
...plateItem/portal_components/tool.erp5.ConfiguratorTool.py
+5
-8
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml
...lateItem/portal_components/tool.erp5.ConfiguratorTool.xml
+25
-9
bt5/erp5_configurator/bt/skip_coding_style_test
bt5/erp5_configurator/bt/skip_coding_style_test
+0
-1
bt5/erp5_configurator/bt/template_action_path_list
bt5/erp5_configurator/bt/template_action_path_list
+0
-1
bt5/erp5_configurator/bt/template_document_id_list
bt5/erp5_configurator/bt/template_document_id_list
+1
-2
bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list
...gurator/bt/template_portal_type_allowed_content_type_list
+0
-1
bt5/erp5_configurator/bt/template_portal_type_id_list
bt5/erp5_configurator/bt/template_portal_type_id_list
+1
-2
bt5/erp5_configurator_standard_solver/SkinTemplateItem/portal_skins/erp5_configurator_standard_solver/UnifySolver_getConfigurationPropertyListDict.py
...rd_solver/UnifySolver_getConfigurationPropertyListDict.py
+0
-1
bt5/erp5_configurator_standard_solver/bt/skip_coding_style_test
...p5_configurator_standard_solver/bt/skip_coding_style_test
+0
-1
product/ERP5Type/CodingStyle.py
product/ERP5Type/CodingStyle.py
+6
-1
No files found.
bt5/erp5_configurator/ActionTemplateItem/portal_types/Workflow%20Security%20Configurator%20Item/view.xml
deleted
100644 → 0
View file @
165870a2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ConfiguratorItem_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
AccountConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup an Accounting Account. """
...
...
@@ -57,7 +58,7 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
Account
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
account_module
=
self
.
getPortalObject
().
account_module
account
=
None
account_id
=
getattr
(
self
,
'account_id'
,
None
)
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
AccountConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 59, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
AccountingPeriodConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup an Accounting Period. """
...
...
@@ -56,7 +57,7 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
Task
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
business_configuration
=
self
.
getBusinessConfigurationValue
()
organisation_id
=
business_configuration
.
\
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 58, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,14 +28,15 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
AdvancedPurchaseTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup
Rule
s. """
""" Setup
Purchase Trade Condition
s. """
meta_type
=
'ERP5 Advanced Purchase Trade Condition Configurator Item'
portal_type
=
'Advanced Purchase Trade Condition Configurator Item'
...
...
@@ -58,7 +59,7 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
AdvancedPurchaseTradeConditionConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,14 +28,15 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
AdvancedSaleTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup
Rule
s. """
""" Setup
Sale Trade Condition
s. """
meta_type
=
'ERP5 Advanced Sale Trade Condition Configurator Item'
portal_type
=
'Advanced Sale Trade Condition Configurator Item'
...
...
@@ -58,7 +59,7 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
AdvancedSaleTradeConditionConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
from
DateTime
import
DateTime
class
AlarmConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup an Alarm """
...
...
@@ -59,7 +60,7 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
Periodicity
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal_alarms
=
self
.
getPortalObject
().
portal_alarms
error_list
=
[]
property_dict
=
{
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 61, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,12 +29,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
DateTime
import
DateTime
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
BankAccountConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup bank account. """
...
...
@@ -58,7 +59,7 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
BankAccount
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
organisation_module
=
self
.
getPortalObject
().
organisation_module
error_list
=
[]
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
BankAccountConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
BusinessProcessConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup Rules. """
...
...
@@ -59,7 +60,7 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[
"Business Process %s should be created"
%
self
.
getReference
(),]
if
fixit
:
portal
=
self
.
getPortalObject
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 61, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
CatalogKeywordKeyConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""Set up catalog keyword keys."""
...
...
@@ -56,7 +57,7 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[]
portal
=
self
.
getPortalObject
()
catalog
=
portal
.
portal_catalog
.
getSQLCatalog
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 58, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -30,11 +30,12 @@ import zope.interface
from
StringIO
import
StringIO
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
UnrestrictedStringIO
(
StringIO
):
__allow_access_to_unprotected_subobjects__
=
1
...
...
@@ -64,7 +65,7 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
ConfiguratorItem
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
ctool
=
portal
.
portal_categories
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
CategoriesSpreadsheetConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 67, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py
View file @
9c7d959f
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
...
...
@@ -29,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
CategoryConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""This class is meta build step for customization of ERP5 site."""
...
...
@@ -56,7 +56,7 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
category_root
=
portal
.
portal_categories
[
self
.
category_root
]
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
CategoryConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 58, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py
View file @
9c7d959f
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
...
...
@@ -29,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
CurrencyConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup currency. """
...
...
@@ -60,7 +60,7 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
Resource
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
currency_module
=
self
.
getPortalObject
().
currency_module
error_list
=
[]
title
=
self
.
getTitle
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
CurrencyConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 62, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py
View file @
9c7d959f
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
...
...
@@ -29,11 +27,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
CustomerBT5ConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Create a new bt5 for customer configuration.
...
...
@@ -59,7 +58,7 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
template_tool
=
self
.
getPortalObject
().
portal_templates
error_list
=
[]
if
self
.
bt5_title
not
in
template_tool
.
getBuiltBusinessTemplateList
():
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
CustomerBT5ConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 61, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,12 +29,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
OrganisationConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" This class install a Organisation."""
...
...
@@ -58,7 +59,7 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
Organisation
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
""" Setup organisation. """
if
fixit
:
portal
=
self
.
getPortalObject
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
OrganisationConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py
View file @
9c7d959f
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
...
...
@@ -29,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PermissionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Set permission matrix on module."""
...
...
@@ -56,7 +56,7 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
template_module_id_list
=
[]
error_list
=
[]
module_permissions_map
=
{}
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
PermissionConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 58, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,13 +29,14 @@
import
zope.interface
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
DateTime
import
DateTime
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PersonConfiguratorItem
(
XMLObject
,
ConfiguratorItemMixin
):
""" Setup user. """
...
...
@@ -61,7 +62,7 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
,
PropertySheet
.
Person
,
PropertySheet
.
Login
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[]
person_list
=
self
.
acl_users
.
searchUsers
(
id
=
self
.
Person_getUserId
(),
exact_match
=
True
)
if
not
person_list
:
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 63, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PortalTypeConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""Configure Portal Type."""
...
...
@@ -55,7 +56,7 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
# Support adding new property sheet to portal type information.
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
PortalTypeConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 57, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
zLOG
import
LOG
,
INFO
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PortalTypeRolesSpreadsheetConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""Import a portal type roles spreadsheet.
"""
...
...
@@ -57,7 +58,7 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
,
PropertySheet
.
DublinCore
,
PropertySheet
.
ConfiguratorItem
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
portal_type_role_dict
=
self
.
_getPortalTypeRoleDict
()
error_list
=
[]
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
PortalTypeRolesSpreadsheetConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 61, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PreferenceConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup preference. """
...
...
@@ -72,7 +73,7 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
property_id_list
.
append
(
'%s%s'
%
(
prop
.
getReference
(),
list_prefix
))
return
property_id_list
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[]
portal
=
self
.
getPortalObject
()
preference
=
portal
.
portal_preferences
.
_getOb
(
self
.
object_id
,
None
)
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
PreferenceConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 74, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
PurchaseTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup Rules. """
...
...
@@ -58,7 +59,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
PurchaseTradeConditionConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,12 +29,13 @@
import
zope.interface
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
from
zLOG
import
LOG
,
INFO
class
RoleConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup role per module basis. """
...
...
@@ -57,7 +58,7 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[
'Roles should imported and created'
,]
if
fixit
:
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
RoleConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 59, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,7 +29,7 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
...
...
@@ -57,7 +57,7 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
template_id
=
self
.
getId
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
RuleConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 59, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
SaleTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup Rules. """
...
...
@@ -58,7 +59,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
Reference
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SaleTradeConditionConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,12 +28,13 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.SkinConfiguratorItemMixin
import
\
SkinConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
SecurityCategoryMappingConfiguratorItem
(
SkinConfiguratorItemMixin
,
XMLObject
):
""" Setup the ERP5Type_getSecurityCategoryMapping Python Script which
...
...
@@ -58,11 +59,10 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
script_id
=
'ERP5Type_getSecurityCategoryMapping'
error_list
=
[
'%s should be created'
%
script_id
,]
if
fixit
:
portal_alarms
=
self
.
getPortalObject
().
portal_alarms
script_content
=
"""return (
('ERP5Type_getSecurityCategoryFromAssignmentStrict', ['function']),
('ERP5Type_getSecurityCategoryFromAssignmentStrict', ['follow_up']),
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SecurityCategoryMappingConfiguratorItem
</string>
</value>
...
...
@@ -43,10 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
<string>
W: 64, 6: Unused variable \'portal_alarms\' (unused-variable)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -56,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -75,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -84,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -29,12 +29,13 @@
from
warnings
import
warn
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
ServiceConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""Create default service documents."""
...
...
@@ -58,7 +59,7 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
ConfiguratorItem
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
error_list
=
[]
for
service_id
,
service_dict
in
iter
(
self
.
getConfigurationListList
()):
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -49,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
SitePropertyConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
"""Set up site properties."""
...
...
@@ -56,19 +57,19 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
DublinCore
,
PropertySheet
.
ConfiguratorItem
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
portal
=
self
.
getPortalObject
()
id_list
=
[]
for
id
,
value
,
prop_type
in
self
.
getConfigurationList
():
for
id
_
,
value
,
prop_type
in
self
.
getConfigurationList
():
if
fixit
:
if
portal
.
hasProperty
(
id
):
portal
.
_delProperty
(
id
)
portal
.
_setProperty
(
id
,
value
,
type
=
prop_type
)
id_list
.
append
(
id
)
if
portal
.
hasProperty
(
id
_
):
portal
.
_delProperty
(
id
_
)
portal
.
_setProperty
(
id
_
,
value
,
type
=
prop_type
)
id_list
.
append
(
id
_
)
if
fixit
:
business_configuration
=
self
.
getBusinessConfigurationValue
()
bt
=
business_configuration
.
getSpecialiseValue
()
bt
.
edit
(
template_site_property_id_list
=
id_list
)
return
[
"The property %s should set on portal"
%
id
for
id
in
id_list
]
return
[
"The property %s should set on portal"
%
id
_
for
id_
in
id_list
]
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SitePropertyConfiguratorItem
</string>
</value>
...
...
@@ -43,10 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 58, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
<string>
W: 61, 8: Redefining built-in \'id\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -56,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -75,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -84,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
SolverConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup Solvers. """
...
...
@@ -55,7 +56,7 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
if
fixit
:
portal
=
self
.
getPortalObject
()
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
@@ -77,8 +78,7 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
for
information_dict
in
self
.
content_list
:
portal_type
=
information_dict
.
pop
(
'portal_type'
)
id
=
information_dict
.
pop
(
'id'
)
action
=
solver
.
newContent
(
portal_type
=
portal_type
,
id
=
id
)
action
=
solver
.
newContent
(
portal_type
=
portal_type
,
id
=
information_dict
.
pop
(
'id'
))
action
.
edit
(
**
information_dict
)
self
.
install
(
solver
,
business_configuration
)
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SolverConfiguratorItem
</string>
</value>
...
...
@@ -43,10 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 79, 10: Redefining built-in \'id\' (redefined-builtin)
</string>
<string>
W: 57, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -56,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -75,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -84,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,13 +28,14 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
from
Products.ERP5Type.Cache
import
CachingMethod
from
zLOG
import
LOG
,
INFO
class
StandardBT5ConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" This class will install standard ERP5 template from a repository to
fake site. """
...
...
@@ -60,7 +61,7 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
,
PropertySheet
.
StandardBT5ConfiguratorItem
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
template_tool
=
self
.
getPortalObject
().
portal_templates
bt5_id
=
self
.
getBt5Id
().
split
(
'.'
)[
0
]
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
StandardBT5ConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 62, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -28,11 +28,12 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
SystemPreferenceConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup System preference. """
...
...
@@ -73,7 +74,7 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
property_id_list
.
append
(
'%s%s'
%
(
prop
.
getReference
(),
list_prefix
))
return
property_id_list
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
def
_checkConsistency
(
self
,
fixit
=
False
,
**
kw
):
error_list
=
[]
portal
=
self
.
getPortalObject
()
preference
=
portal
.
portal_preferences
.
_getOb
(
self
.
object_id
,
None
)
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SystemPreferenceConfiguratorItem
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 75, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WorkflowSecurityConfiguratorItem.py
deleted
100644 → 0
View file @
165870a2
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
WorkflowSecurityConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" Setup workflow for different roles. Use passed OO file. """
meta_type
=
'ERP5 Workflow Security Configurator Item'
portal_type
=
'Workflow Security Configurator Item'
add_permission
=
Permissions
.
AddPortalContent
isPortalContent
=
1
isRADContent
=
1
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# Declarative interfaces
zope
.
interface
.
implements
(
IConfiguratorItem
)
# Declarative properties
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
XMLObject
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
return
[]
if
fixit
:
## NOT TESTED
business_configuration
=
self
.
getBusinessConfigurationValue
()
table_dict
=
business_configuration
.
ConfigurationTemplate_readOOCalcFile
(
self
.
filename
)
portal
=
self
.
getPortalObject
()
suffix
=
'_security'
suffix_len
=
len
(
suffix
)
if
self
.
filename
[
-
suffix_len
:]
==
suffix
:
workflow_id
=
self
.
filename
[:
-
suffix_len
]
else
:
raise
"NoValidName"
# Configure state permission
view_permission_list
=
[
'View'
]
access_permission_list
=
[
'Access contents information'
]
modify_permission_list
=
[
'Modify portal content'
]
add_content_permission_list
=
[
'Add portal content'
]
# Configure list of variable on the workflow
permission_list
=
view_permission_list
+
\
access_permission_list
+
\
modify_permission_list
+
\
add_content_permission_list
# Remove permission list
workflow
=
portal
.
portal_workflow
[
workflow_id
]
workflow
.
delManagedPermissions
(
workflow
.
permissions
)
# Add new permission list
for
permission
in
permission_list
:
workflow
.
addManagedPermission
(
permission
)
# Configure state permission matrix
state_list
=
table_dict
[
'state'
]
for
state_config
in
state_list
:
state_id
=
state_config
.
pop
(
'state'
)
state
=
workflow
.
states
[
state_id
]
# Clean the state matrix
for
permission
in
permission_list
:
state
.
setPermission
(
permission
,
0
,
[])
# Update state matrix
permission_dict
=
{
x
:
[]
for
x
in
permission_list
}
for
role
,
perm_symbol
in
state_config
.
items
():
managed_permission_list
=
[]
if
'A'
in
perm_symbol
:
managed_permission_list
.
extend
(
access_permission_list
)
if
'V'
in
perm_symbol
:
managed_permission_list
.
extend
(
view_permission_list
)
if
'C'
in
perm_symbol
:
managed_permission_list
.
extend
(
add_content_permission_list
)
if
'M'
in
perm_symbol
:
managed_permission_list
.
extend
(
modify_permission_list
)
for
permission
in
managed_permission_list
:
permission_dict
[
permission
].
append
(
role
.
capitalize
())
for
permission
,
roles
in
permission_dict
.
items
():
state
.
setPermission
(
permission
,
0
,
roles
)
# XXX To be deleted
# for permission in permission_list:
# module.manage_permission(permission, ['Manager'], 0)
# Configure transition guard
transition_list
=
table_dict
[
'transition'
]
for
transition_conf
in
transition_list
:
transition_id
=
transition_conf
.
pop
(
'transition'
)
transition
=
workflow
.
transitions
[
transition_id
]
guard
=
transition
.
getGuard
()
role_list
=
[
x
.
capitalize
()
for
x
in
transition_conf
.
keys
()]
role_string
=
';'
.
join
(
role_list
)
guard
.
changeFromProperties
({
'guard_roles'
:
role_string
})
# Update business template
bt5_obj
=
business_configuration
.
getSpecialiseValue
()
template_workflow_id_list
=
list
(
bt5_obj
.
getTemplateWorkflowIdList
())
if
workflow_id
not
in
template_workflow_id_list
:
template_workflow_id_list
.
append
(
workflow_id
)
bt5_obj
.
edit
(
template_workflow_id_list
=
template_workflow_id_list
,)
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WorkflowSecurityConfiguratorItem.xml
deleted
100644 → 0
View file @
165870a2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
WorkflowSecurityConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5Configurator.Document.WorkflowSecurityConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.WorkflowSecurityConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 57, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
<string>
W: 59, 4: Unreachable code (unreachable)
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py
View file @
9c7d959f
...
...
@@ -31,12 +31,13 @@
from
zLOG
import
LOG
,
INFO
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
class
SkinConfiguratorItemMixin
(
ConfiguratorItemMixin
):
""" Mixin which allows to create python scripts and/or skin
elements during the configuration.
"""
def
install
(
self
,
skinfolder
,
business_configuration
):
def
install
(
self
,
skinfolder
,
business_configuration
,
prefix
=
''
):
"""
"""
bt5_obj
=
business_configuration
.
getSpecialiseValue
()
...
...
bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SkinConfiguratorItemMixin
</string>
</value>
...
...
@@ -43,9 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 39, 2: Arguments number differs from overridden \'install\' method (arguments-differ)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
9c7d959f
...
...
@@ -44,7 +44,6 @@
<item>
Solver Configurator Item
</item>
<item>
Standard BT5 Configurator Item
</item>
<item>
System Preference Configurator Item
</item>
<item>
Workflow Security Configurator Item
</item>
</portal_type>
<portal_type
id=
"Organisation Configurator Item"
>
<item>
Address
</item>
...
...
bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Workflow%20Security%20Configurator%20Item.xml
deleted
100644 → 0
View file @
165870a2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<string>
document.gif
</string>
</value>
</item>
<item>
<key>
<string>
content_meta_type
</string>
</key>
<value>
<string>
ERP5 Workflow Security Configurator Item
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Setup workflow for different roles. Use passed OO file.
</string>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addWorkflowSecurityConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Workflow Security Configurator Item
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/Base_viewConfiguratorFieldLibrary/my_view_mode_configuration_class_dict.xml
View file @
9c7d959f
...
...
@@ -10,12 +10,10 @@
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
css_class
</string>
<string>
default
</string>
<string>
editable
</string>
<string>
extra
</string>
<string>
height
</string>
<string>
title
</string>
<string>
whitespace_preserve
</string>
</list>
</value>
</item>
...
...
@@ -67,10 +65,6 @@
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -79,10 +73,6 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -91,10 +81,6 @@
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -102,6 +88,10 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
pre
</string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -110,10 +100,6 @@
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_editor_field
</string>
</value>
...
...
@@ -122,10 +108,6 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
10
</int>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
...
...
@@ -134,10 +116,6 @@
<key>
<string>
title
</string>
</key>
<value>
<string>
Configuration __dict__
</string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -152,7 +130,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
here.Base_viewDict(
)
</string>
</value>
<value>
<string>
python:
modules[\'pprint\'].pformat(here.showDict()
)
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py
View file @
9c7d959f
from
Products.ERP5Type.Cache
import
CachingMethod
result
=
[]
if
empty_first_element
==
True
:
if
empty_first_element
:
result
=
[[
''
,
''
],]
filename
=
"standard_currency_list.ods"
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml
View file @
9c7d959f
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
empty_first_element
= True, filter="world"
</string>
</value>
<value>
<string>
empty_first_element
=True
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py
View file @
9c7d959f
...
...
@@ -19,7 +19,7 @@ while state not in previous_state_list:
break
if
transition
.
getTransitionFormId
()
not
in
(
None
,
""
):
result
.
append
({
'state'
:
state
.
getTitle
(),
result
.
append
({
'state'
:
state
.
getTitle
(),
'description'
:
state
.
getDescription
(),
'title'
:
state
.
getTitle
()})
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py
View file @
9c7d959f
password_confirm
=
request
.
get
(
'field_your_password_confirm'
,
None
)
try
:
if
editor
.
encode
(
'ascii'
,
'ignore'
)
!=
editor
:
return
0
except
:
return
0
if
editor
.
encode
(
'ascii'
,
'ignore'
)
!=
editor
:
return
False
return
password_confirm
==
editor
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py
View file @
9c7d959f
...
...
@@ -8,9 +8,9 @@ for reference in reference_list:
portal
=
context
.
getPortalObject
()
reference
=
editor
# check this is a not a reference from acl_user
# check this is a not a reference from acl_user
s
if
portal
.
acl_users
.
searchUsers
(
login
=
reference
,
exact_match
=
True
):
return
0
return
0
# first check if a Business Configuration has not already "reserved" it
# through a Person Configuration Item which when build will create a real
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_displayBusinessConfigurationList.zpt
View file @
9c7d959f
...
...
@@ -17,22 +17,20 @@
bc_default_image python: bc.getResourceValue().getDefaultImageValue();
bc_default_image_absolute_url python: bc.getResourceValue().getDefaultImageAbsoluteUrl();">
<td>
<div tal:attributes="id python: 'business_configuration_%s' % bc_id;
class string:box;">
<div class="box" tal:attributes="id python: 'business_configuration_%s' % bc_id;">
<span
tal:attributes="id string:
business-configuration-title" tal:content="bc_title" />
<span
class="
business-configuration-title" tal:content="bc_title" />
<img tal:condition="bc_default_image"
tal:attributes="src python: '%s?format=png' % bc_default_image_absolute_url" />
tal:attributes="alt bc_title;
src python: '%s?format=png' % bc_default_image_absolute_url" />
<span
tal:condition="bc_
description"
tal:
attributes="id string:span-business-configuration-description;
title bc_description;
"
<span
class="span-business-configuration-
description"
tal:
condition="bc_description"
tal:attributes="title bc_description
"
tal:content="bc_description" />
<button id="dialog-submit-button"
accesskey="V"
tal:attributes="value python: bc.getRelativeUrl()"
<button tal:attributes="value python: bc.getRelativeUrl()"
type="submit"
name="field_your_business_configuration">Configure</button>
</div>
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py
View file @
9c7d959f
REQUEST
=
context
.
REQUEST
active_process_id
=
REQUEST
.
get
(
'active_process_id'
,
None
)
erp5_site_id
=
context
.
getPortalObject
().
getId
()
js_string
=
"""
// Initialisation
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_view/my_header.xml
View file @
9c7d959f
...
...
@@ -93,11 +93,9 @@
<key>
<string>
default
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<h2 i18n:translate=""\n
i18n:domain="ui">
Welcome to Configurator
</h2>
\n
<h2>
Welcome to Configurator
</h2>
\n
\n
<p
i18n:translate=
""
\n
i18n:domain=
"ui"
>
This tool will help you configure your fresh ERP5
</p>
<p>
This tool will help you configure your fresh ERP5
</p>
]]>
</string>
</value>
</item>
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py
View file @
9c7d959f
...
...
@@ -7,8 +7,6 @@ calc_percentage = 0.0
is_activities_running
=
len
(
installation_status
[
'activity_list'
])
!=
0
is_bt5_building_running
=
installation_status
[
'bt5'
][
'all'
]
==
0
and
\
not
is_activities_running
is_bt5_installation_running
=
installation_status
[
'bt5'
][
'all'
]
!=
0
and
\
not
is_activities_running
if
not
is_bt5_building_running
:
all_bt5s
=
float
(
installation_status
[
'bt5'
][
'all'
])
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/wizard.css.css
View file @
9c7d959f
...
...
@@ -22,7 +22,7 @@
overflow
:
hidden
;
/* Clear floats */
}
.box
span
#business-configuration-title
,
span
#
business-configuration-title
:hover
{
.box
span
.business-configuration-title
,
span
.
business-configuration-title
:hover
{
display
:
block
;
background-color
:
transparent
;
width
:
100%
;
...
...
@@ -59,7 +59,7 @@
border
:
2px
solid
#d4e8ec
;
}
.box
span
#
span-business-configuration-description
{
.box
span
.
span-business-configuration-description
{
background-color
:
transparent
;
font-size
:
10px
;
float
:
left
;
...
...
bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/wizard_template_erp5_xhtml_style.zpt
View file @
9c7d959f
...
...
@@ -10,7 +10,7 @@ IDEAS:
<tal:block
metal:define-macro=
"master"
>
<tal:block>
<tal:block
metal:use-macro=
"here/global_definitions/macros/header_definitions"
/>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"en"
lang=
"en"
>
<head>
<base
tal:attributes=
"href python: '%s/' % (url, )"
/>
...
...
@@ -21,8 +21,6 @@ IDEAS:
tal:attributes=
"content python:', '.join(here.getProperty('subject_list', []) or [])"
/>
<meta
name=
"robots"
content=
"index, follow"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Script-Type"
content=
"text/javascript"
/>
<meta
http-equiv=
"Content-Style-Type"
content=
"text/css"
/>
<title
tal:define=
"title title | string:ERP5"
tal:content=
"python: '%s | %s' % (title, here.getPortalObject().title_or_id())"
></title>
<tal:block
tal:replace=
"nothing"
>
...
...
bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py
View file @
9c7d959f
...
...
@@ -120,7 +120,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testCategoryConfiguratorItem
(
self
):
""" Test Category Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
category_id_0
=
"test_category_%s"
%
self
.
newUniqueUID
()
item0
=
configuration_save
.
addConfigurationItem
(
...
...
@@ -173,7 +172,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testCurrencyConfiguratorItem
(
self
):
""" Test Category Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
eur_currency_id
=
"EUR"
eur_currency_title
=
"Euro"
...
...
@@ -224,7 +222,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
be used for the script oucome. For now it does the minimum.
"""
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
expect_script_outcome
=
(
(
'ERP5Type_getSecurityCategoryFromAssignmentStrict'
,
[
'function'
]),
...
...
@@ -251,7 +248,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testAccountConfiguratorItem
(
self
):
""" Test Account Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
account_module
=
self
.
portal
.
account_module
account_dict
=
{
...
...
@@ -303,7 +299,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testAlarmConfiguratorItem
(
self
):
""" Test Alarm Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
property_map
=
{
"active_sense_method_id"
:
"Base_setDummy"
,
...
...
@@ -354,7 +349,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testPortalTypeRolesSpreadsheetConfiguratorItem
(
self
):
""" Test Portal Type Roles Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
category_tool
=
self
.
portal
.
portal_categories
test_folder_path
=
'/'
.
join
(
test_folder
.
__file__
.
split
(
'/'
)[:
-
1
])
...
...
@@ -430,17 +424,13 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testCategoriesSpreadsheetConfiguratorItem
(
self
):
""" Test Portal Type Roles Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
category_tool
=
self
.
portal
.
portal_categories
test_folder_path
=
'/'
.
join
(
test_folder
.
__file__
.
split
(
'/'
)[:
-
1
])
f
=
open
(
"%s/test_data/test_standard_categories.ods"
\
%
test_folder_path
,
"r"
)
try
:
with
open
(
"%s/test_data/test_standard_categories.ods"
\
%
test_folder_path
,
"r"
)
as
f
:
data
=
f
.
read
()
finally
:
f
.
close
()
item
=
configuration_save
.
addConfigurationItem
(
"Categories Spreadsheet Configurator Item"
,
...
...
@@ -481,7 +471,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testRuleConfiguratorItem
(
self
):
""" Test Rules Configurator Item """
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
category_tool
=
self
.
portal
.
portal_categories
rule_tool
=
self
.
portal
.
portal_rules
...
...
@@ -510,7 +499,6 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
item
.
fixConsistency
()
self
.
tic
()
template_id
=
item
.
getId
()
rule_list
=
rule_tool
.
searchFolder
(
portal_type
=
self
.
portal
.
getPortalRuleTypeList
(),
validation_state
=
"validated"
,
reference
=
rule_reference
)
...
...
@@ -520,17 +508,12 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
testBusinessProcessConfiguratorItem
(
self
):
configuration_save
=
self
.
createConfigurationSave
()
bc
=
configuration_save
.
getParentValue
()
category_tool
=
self
.
portal
.
portal_categories
test_folder_path
=
'/'
.
join
(
test_folder
.
__file__
.
split
(
'/'
)[:
-
1
])
f
=
open
(
"%s/test_data/test_standard_business_process.ods"
\
%
test_folder_path
,
"r"
)
try
:
with
open
(
"%s/test_data/test_standard_business_process.ods"
\
%
test_folder_path
,
"r"
)
as
f
:
data
=
f
.
read
()
finally
:
f
.
close
()
reference
=
"testing_business_process_%s"
%
self
.
newUniqueUID
()
item
=
configuration_save
.
addConfigurationItem
(
...
...
bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testConfiguratorItem
</string>
</value>
...
...
@@ -43,19 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:123, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:176, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:227, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:254, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:306, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:357, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:433, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:484, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:513, 4: Unused variable \'template_id\' (unused-variable)
</string>
<string>
W:523, 4: Unused variable \'bc\' (unused-variable)
</string>
<string>
W:524, 4: Unused variable \'category_tool\' (unused-variable)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -65,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -84,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -93,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py
View file @
9c7d959f
...
...
@@ -53,10 +53,10 @@ def _validateFormToRequest(form, REQUEST, **kw):
form
.
validate_all_to_request
(
REQUEST
)
validation_status
=
0
validation_errors
=
None
except
FormValidationError
,
validation_errors
:
except
FormValidationError
as
validation_errors
:
## not all fields valid
validation_status
=
1
except
Exception
,
validation_errors
:
except
Exception
as
validation_errors
:
## missing fields
validation_status
=
2
## extract form arguments and remove leading prefixes
...
...
@@ -75,6 +75,7 @@ def _validateFormToRequest(form, REQUEST, **kw):
pass
return
validation_status
,
form_kw
,
validation_errors
class
ConfiguratorTool
(
BaseTool
):
"""This tool provides a Configurator Tool.
"""
...
...
@@ -159,7 +160,7 @@ class ConfiguratorTool(BaseTool):
failed_forms_counter
=
0
transition
=
business_configuration
.
getNextTransition
()
form
=
getattr
(
business_configuration
,
transition
.
getTransitionFormId
())
for
form_key
in
filter
(
lambda
x
:
x
.
startswith
(
'field_'
),
kw
.
keys
())
:
for
form_key
in
[
x
for
x
in
kw
.
keys
()
if
x
.
startswith
(
'field_'
)]
:
form_kw
[
form_key
]
=
kw
[
form_key
]
## iterate all forms
for
form_counter
in
range
(
0
,
isMultiEntryTransition
):
...
...
@@ -184,9 +185,7 @@ class ConfiguratorTool(BaseTool):
## clean up REQUEST from traces from validate_all_to_request
## otherwise next form will use previous forms details
cleanup_keys
=
filter
(
lambda
x
:
x
.
startswith
(
'my_'
)
or
x
.
startswith
(
'your_'
),
self
.
REQUEST
.
other
.
keys
())
cleanup_keys
=
[
x
for
x
in
self
.
REQUEST
.
other
.
keys
()
if
x
.
startswith
(
'my_'
)
or
x
.
startswith
(
'your_'
)]
for
key
in
cleanup_keys
:
self
.
REQUEST
.
other
.
pop
(
key
,
None
)
## render HTML code
...
...
@@ -324,7 +323,6 @@ class ConfiguratorTool(BaseTool):
If installation is over the installation activities and reindexing
activities should not exists.
"""
global
installation_status
portal_activities
=
self
.
getPortalObject
().
portal_activities
if
0
==
len
(
portal_activities
.
getMessageList
()):
...
...
@@ -346,7 +344,6 @@ class ConfiguratorTool(BaseTool):
download/install bt5 template files and meanwhile offer
user a nice GUI to observe what's happening. """
global
installation_status
# init installation status
installation_status
[
'bt5'
][
'all'
]
=
1
installation_status
[
'bt5'
][
'current'
]
=
0
...
...
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml
View file @
9c7d959f
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ConfiguratorTool
</string>
</value>
...
...
@@ -43,12 +49,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:162, 22: map/filter on lambda could be replaced by comprehension (deprecated-lambda)
</string>
<string>
W:187, 23: map/filter on lambda could be replaced by comprehension (deprecated-lambda)
</string>
<string>
W:327, 4: Using global for \'installation_status\' but no assignment is done (global-variable-not-assigned)
</string>
<string>
W:349, 4: Using global for \'installation_status\' but no assignment is done (global-variable-not-assigned)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -58,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -77,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -86,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_configurator/bt/skip_coding_style_test
deleted
100644 → 0
View file @
165870a2
1
\ No newline at end of file
bt5/erp5_configurator/bt/template_action_path_list
View file @
9c7d959f
...
...
@@ -27,7 +27,6 @@ Site Property Configurator Item | view
Solver Configurator Item | view
Standard BT5 Configurator Item | view
System Preference Configurator Item | view
Workflow Security Configurator Item | view
Workflow | configurator_settings
Workflow | launch_configuration
portal_actions | use_configurator
\ No newline at end of file
bt5/erp5_configurator/bt/template_document_id_list
View file @
9c7d959f
...
...
@@ -27,5 +27,4 @@ document.erp5.ServiceConfiguratorItem
document.erp5.SitePropertyConfiguratorItem
document.erp5.SolverConfiguratorItem
document.erp5.StandardBT5ConfiguratorItem
document.erp5.SystemPreferenceConfiguratorItem
document.erp5.WorkflowSecurityConfiguratorItem
\ No newline at end of file
document.erp5.SystemPreferenceConfiguratorItem
\ No newline at end of file
bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list
View file @
9c7d959f
...
...
@@ -34,7 +34,6 @@ Configuration Save | Site Property Configurator Item
Configuration Save | Solver Configurator Item
Configuration Save | Standard BT5 Configurator Item
Configuration Save | System Preference Configurator Item
Configuration Save | Workflow Security Configurator Item
Organisation Configurator Item | Address
Organisation Configurator Item | Email
Organisation Configurator Item | Telephone
...
...
bt5/erp5_configurator/bt/template_portal_type_id_list
View file @
9c7d959f
...
...
@@ -29,5 +29,4 @@ Service Configurator Item
Site Property Configurator Item
Solver Configurator Item
Standard BT5 Configurator Item
System Preference Configurator Item
Workflow Security Configurator Item
\ No newline at end of file
System Preference Configurator Item
\ No newline at end of file
bt5/erp5_configurator_standard_solver/SkinTemplateItem/portal_skins/erp5_configurator_standard_solver/UnifySolver_getConfigurationPropertyListDict.py
View file @
9c7d959f
...
...
@@ -11,7 +11,6 @@ for property_id in tester.getTestedPropertyList():
value
=
movement
.
getProperty
(
property_id
)
if
value
not
in
value_list
:
value_list
.
append
(
value
)
simulation_movement_list
=
movement
.
getDeliveryRelatedValueList
()
value
=
simulation_movement
.
getProperty
(
property_id
)
if
value
not
in
value_list
:
value_list
.
append
(
value
)
...
...
bt5/erp5_configurator_standard_solver/bt/skip_coding_style_test
deleted
100644 → 0
View file @
165870a2
1
\ No newline at end of file
product/ERP5Type/CodingStyle.py
View file @
9c7d959f
...
...
@@ -64,7 +64,12 @@ def getSkinPrefixList(self):
skin_prefix_list
.
extend
((
'ERP5Type'
,
'Module'
,
'Brain'
,
# Catalog brains
# Catalog brains
'Brain'
,
'InventoryListBrain'
,
'TrackingListBrain'
,
'MovementHistoryListBrain'
,
'DCWorkflow'
,
# some workflow script use this, not sure it's correct.
'SkinsTool'
,
...
...
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