From 752833d97da9dd702333d06a06c8fc68570f3d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 15 Jul 2020 16:20:47 +0900 Subject: [PATCH] configurator: address pylint messages and enable coding style test --- .../document.erp5.AccountConfiguratorItem.py | 5 ++- .../document.erp5.AccountConfiguratorItem.xml | 31 +++++++++++--- ...t.erp5.AccountingPeriodConfiguratorItem.py | 5 ++- ....erp5.AccountingPeriodConfiguratorItem.xml | 4 +- ...dPurchaseTradeConditionConfiguratorItem.py | 7 ++-- ...PurchaseTradeConditionConfiguratorItem.xml | 31 +++++++++++--- ...ancedSaleTradeConditionConfiguratorItem.py | 7 ++-- ...ncedSaleTradeConditionConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.AlarmConfiguratorItem.py | 5 ++- .../document.erp5.AlarmConfiguratorItem.xml | 4 +- ...cument.erp5.BankAccountConfiguratorItem.py | 5 ++- ...ument.erp5.BankAccountConfiguratorItem.xml | 31 +++++++++++--- ...nt.erp5.BusinessProcessConfiguratorItem.py | 5 ++- ...t.erp5.BusinessProcessConfiguratorItem.xml | 4 +- ....erp5.CatalogKeywordKeyConfiguratorItem.py | 5 ++- ...erp5.CatalogKeywordKeyConfiguratorItem.xml | 4 +- ...5.CategoriesSpreadsheetConfiguratorItem.py | 5 ++- ....CategoriesSpreadsheetConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.CategoryConfiguratorItem.py | 6 +-- ...document.erp5.CategoryConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.CurrencyConfiguratorItem.py | 6 +-- ...document.erp5.CurrencyConfiguratorItem.xml | 31 +++++++++++--- ...cument.erp5.CustomerBT5ConfiguratorItem.py | 7 ++-- ...ument.erp5.CustomerBT5ConfiguratorItem.xml | 31 +++++++++++--- ...ument.erp5.OrganisationConfiguratorItem.py | 5 ++- ...ment.erp5.OrganisationConfiguratorItem.xml | 31 +++++++++++--- ...ocument.erp5.PermissionConfiguratorItem.py | 6 +-- ...cument.erp5.PermissionConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.PersonConfiguratorItem.py | 5 ++- .../document.erp5.PersonConfiguratorItem.xml | 4 +- ...ocument.erp5.PortalTypeConfiguratorItem.py | 5 ++- ...cument.erp5.PortalTypeConfiguratorItem.xml | 31 +++++++++++--- ...talTypeRolesSpreadsheetConfiguratorItem.py | 5 ++- ...alTypeRolesSpreadsheetConfiguratorItem.xml | 31 +++++++++++--- ...ocument.erp5.PreferenceConfiguratorItem.py | 5 ++- ...cument.erp5.PreferenceConfiguratorItem.xml | 31 +++++++++++--- ....PurchaseTradeConditionConfiguratorItem.py | 5 ++- ...PurchaseTradeConditionConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.RoleConfiguratorItem.py | 5 ++- .../document.erp5.RoleConfiguratorItem.xml | 31 +++++++++++--- .../document.erp5.RuleConfiguratorItem.py | 4 +- .../document.erp5.RuleConfiguratorItem.xml | 31 +++++++++++--- ...erp5.SaleTradeConditionConfiguratorItem.py | 5 ++- ...rp5.SaleTradeConditionConfiguratorItem.xml | 31 +++++++++++--- ...SecurityCategoryMappingConfiguratorItem.py | 6 +-- ...ecurityCategoryMappingConfiguratorItem.xml | 32 +++++++++++---- .../document.erp5.ServiceConfiguratorItem.py | 5 ++- .../document.erp5.ServiceConfiguratorItem.xml | 4 +- ...ument.erp5.SitePropertyConfiguratorItem.py | 17 ++++---- ...ment.erp5.SitePropertyConfiguratorItem.xml | 32 +++++++++++---- .../document.erp5.SolverConfiguratorItem.py | 8 ++-- .../document.erp5.SolverConfiguratorItem.xml | 32 +++++++++++---- ...cument.erp5.StandardBT5ConfiguratorItem.py | 5 ++- ...ument.erp5.StandardBT5ConfiguratorItem.xml | 31 +++++++++++--- ...t.erp5.SystemPreferenceConfiguratorItem.py | 5 ++- ....erp5.SystemPreferenceConfiguratorItem.xml | 31 +++++++++++--- .../mixin.erp5.SkinConfiguratorItemMixin.py | 3 +- .../mixin.erp5.SkinConfiguratorItemMixin.xml | 31 +++++++++++--- ...usinessConfiguration_getISOCurrencyList.py | 2 +- ...sinessConfiguration_getISOCurrencyList.xml | 2 +- .../BusinessConfiguration_getUIDescription.py | 2 +- ...sConfiguration_validateCustomerPassword.py | 7 +--- ...sConfiguration_validateCustomerUsername.py | 4 +- .../ConfiguratorTool_generateJavaScript.py | 1 - ...atorTool_viewRunningInstallationMessage.py | 2 - .../test.erp5.testConfiguratorItem.py | 25 ++--------- .../test.erp5.testConfiguratorItem.xml | 41 +++++++++++-------- .../tool.erp5.ConfiguratorTool.py | 13 +++--- .../tool.erp5.ConfiguratorTool.xml | 34 +++++++++++---- .../bt/skip_coding_style_test | 1 - 70 files changed, 741 insertions(+), 300 deletions(-) delete mode 100644 bt5/erp5_configurator/bt/skip_coding_style_test diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py index 274f18fc2e..f9ee4e8da7 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.py @@ -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) diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml index 4004927f6a..3fc53447bc 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py index aca132beab..78a776ceaf 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.py @@ -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.\ diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml index dd05e37cf2..43d46d4184 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AccountingPeriodConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py index 6aa4a4c0c6..3d03c00696 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.py @@ -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 Rules. """ + """ Setup Purchase Trade Conditions. """ 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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml index 16b411bea8..370d842eb4 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedPurchaseTradeConditionConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py index e1eff86605..03715170a8 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.py @@ -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 Rules. """ + """ Setup Sale Trade Conditions. """ 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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml index a428afe934..f2b0e4f356 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AdvancedSaleTradeConditionConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py index 38154fea00..90a9831efb 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.py @@ -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 = { diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml index d7be543093..ab7193351d 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.AlarmConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py index 1fe5217efd..cc7621f4ef 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.py @@ -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 = [] diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml index d94ce33295..95e008cae5 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BankAccountConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py index d4fc61c604..623b377b1b 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml index 765e591765..152506fba6 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessProcessConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py index 409db1d868..e335427ee2 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml index f817ee17a3..00fb2092e3 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CatalogKeywordKeyConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py index 2c850affc2..ccbb6a13ee 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.py @@ -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 diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml index 35212ca43d..a3d89dd58e 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoriesSpreadsheetConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py index 69d0dfdedd..1f29d11e5f 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.py @@ -1,6 +1,5 @@ ############################################################################## # - # 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] diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml index a57f85c69d..56c28e0e05 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CategoryConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py index ba151a3930..dddea762da 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.py @@ -1,6 +1,5 @@ ############################################################################## # - # 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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml index e2259e2935..f750e24dd5 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CurrencyConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py index 0d5e7a63c1..3a480de56b 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.py @@ -1,6 +1,4 @@ ############################################################################## -# - # 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(): diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml index 511b44b9c4..2fb1f22758 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.CustomerBT5ConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py index fa179c3021..4edb4066d4 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml index 5cbb3e1c32..aeeb8cc480 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.OrganisationConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py index 16d3be7fe8..e62aaec1c8 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.py @@ -1,6 +1,5 @@ ############################################################################## # - # 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 = {} diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml index 9f374facaf..88efaa9b5a 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PermissionConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py index 53b93a6f3a..a14c5596d0 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.py @@ -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: diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml index b63dc77ace..3d2e24c827 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PersonConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py index aa347b4c97..52046718e8 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.py @@ -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. diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml index ffb111f7f3..8f1d266d96 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py index 553e93d8f0..4959dc1b47 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.py @@ -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 = [] diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml index c2fed02f3f..4bd23a9fd0 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PortalTypeRolesSpreadsheetConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py index f092c38344..60274a1b80 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.py @@ -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) diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml index 38e76534fd..628a644c47 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PreferenceConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py index 59766f8595..6ccc773a6c 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml index e6c98ce99b..8767680ded 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.PurchaseTradeConditionConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py index 19a3ae19bf..07acfa75a3 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml index db84917166..92f32887da 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RoleConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py index cb0ad30e8c..d590a2b89c 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml index a2f4d5f032..f9482e8704 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.RuleConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py index 8178dfcead..4873e2cc46 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.py @@ -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() diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml index 86d5559570..02044ea0a7 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SaleTradeConditionConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py index 2d748eaf3d..f5780bb7e2 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.py @@ -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']), diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml index 162e841128..42f92a4402 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SecurityCategoryMappingConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py index 41b602f641..7f3eece26e 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.py @@ -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()): diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml index f52223060c..da7abf4bb7 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.ServiceConfiguratorItem.xml @@ -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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py index 4462debeac..61b9033f86 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.py @@ -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] diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml index 3b4341a7c7..70d7c6ee06 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SitePropertyConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py index bf2a7ecff4..2f7266f319 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.py @@ -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) diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml index bdfad59583..9fce8a9903 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SolverConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py index c3f4587831..da3734ee75 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.py @@ -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] diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml index 189a649181..ee1ca4137c 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.StandardBT5ConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py index 07374cc2af..0445870960 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.py @@ -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) diff --git a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml index 94540abc32..5a3e13a05b 100644 --- a/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml +++ b/bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.SystemPreferenceConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py b/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py index 5ac797dbb0..1226d41192 100644 --- a/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py +++ b/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.py @@ -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() diff --git a/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml b/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml index 1c6cbf7c24..2ea611f750 100644 --- a/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml +++ b/bt5/erp5_configurator/MixinTemplateItem/portal_components/mixin.erp5.SkinConfiguratorItemMixin.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py index d5f68ebfbe..443c1b1ee7 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.py @@ -1,6 +1,6 @@ from Products.ERP5Type.Cache import CachingMethod result = [] -if empty_first_element==True: +if empty_first_element: result = [['', ''],] filename = "standard_currency_list.ods" diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml index cec504bde9..db22eab611 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getISOCurrencyList.xml @@ -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> diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py index e8a77c4f6e..930260e2d0 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_getUIDescription.py @@ -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()}) diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py index 5a80a5810a..a04a4b38d4 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerPassword.py @@ -1,7 +1,4 @@ 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 diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py index 82b438d3ad..bc6ad97830 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.py @@ -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_users 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 diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py index 43ad21b55b..3e7f1cc5e8 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_generateJavaScript.py @@ -1,6 +1,5 @@ REQUEST = context.REQUEST active_process_id = REQUEST.get('active_process_id', None) -erp5_site_id = context.getPortalObject().getId() js_string = """ // Initialisation diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py index 88f2c7c8cc..984a45a52f 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wizard/ConfiguratorTool_viewRunningInstallationMessage.py @@ -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']) diff --git a/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py b/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py index d2807615c0..ec3bf087d6 100644 --- a/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py +++ b/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.py @@ -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( diff --git a/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml b/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml index f94d23296c..bfa6881eb7 100644 --- a/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml +++ b/bt5/erp5_configurator/TestTemplateItem/portal_components/test.erp5.testConfiguratorItem.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py b/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py index e436be4a25..f87b72eb31 100644 --- a/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py +++ b/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py @@ -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 diff --git a/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml b/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml index d71bea657e..6db5a9dac4 100644 --- a/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml +++ b/bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.xml @@ -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">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</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">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</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> diff --git a/bt5/erp5_configurator/bt/skip_coding_style_test b/bt5/erp5_configurator/bt/skip_coding_style_test deleted file mode 100644 index 56a6051ca2..0000000000 --- a/bt5/erp5_configurator/bt/skip_coding_style_test +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file -- 2.30.9