Commit b65951d7 authored by Rafael Monnerat's avatar Rafael Monnerat

Use ConfiguratorItemSpreadsheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42138 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 642eaeba
......@@ -61,7 +61,7 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.CategoriesSpreadsheetConfiguratorItem
, PropertySheet.ConfiguratorItemSpreadsheet
)
def build(self, business_configuration):
......@@ -102,19 +102,19 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
# TODO use a invalid_spreadsheet_error_handler to report invalid
# spreadsheet messages (see http://svn.erp5.org?rev=24908&view=rev )
aq_self._category_cache = self.Base_getCategoriesSpreadSheetMapping(
UnrestrictedStringIO(self.getDefaultCategoriesSpreadsheetData()))
UnrestrictedStringIO(self.getDefaultConfigurationSpreadsheetData()))
security.declareProtected(Permissions.ModifyPortalContent,
'setDefaultCategoriesSpreadsheetFile')
def setDefaultCategoriesSpreadsheetFile(self, *args, **kw):
'setDefaultConfigurationSpreadsheetFile')
def setDefaultConfigurationSpreadsheetFile(self, *args, **kw):
"""Reset the spreadsheet cache."""
self._setDefaultCategoriesSpreadsheetFile(*args, **kw)
self._setDefaultConfigurationSpreadsheetFile(*args, **kw)
self._category_cache = None
self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent,
'setCategoriesSpreadsheetFile')
setCategoriesSpreadsheetFile = setDefaultCategoriesSpreadsheetFile
'setConfigurationSpreadsheetFile')
setConfigurationSpreadsheetFile = setDefaultConfigurationSpreadsheetFile
security.declareProtected(Permissions.AccessContentsInformation,
'getCategoryTitleItemList')
......
......@@ -35,7 +35,7 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.PortalTypeRolesSpreadsheetConfiguratorItem
, PropertySheet.ConfiguratorItemSpreadsheet
)
def build(self, business_configuration):
......@@ -83,7 +83,7 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
role_dict = dict()
info_dict = self.ConfigurationTemplate_readOOCalcFile(
"portal_roles_spreadsheet.ods",
data=self.getDefaultPortalTypeRolesSpreadsheetData())
data=self.getDefaultConfigurationSpreadsheetData())
for sheet_name, table in info_dict.items():
for line in table:
if 'Portal_Type' in line:
......@@ -93,14 +93,14 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
aq_self._spreadsheet_cache = role_dict
security.declareProtected(Permissions.ModifyPortalContent,
'setDefaultPortalTypeRolesSpreadsheetFile')
def setDefaultPortalTypeRolesSpreadsheetFile(self, *args, **kw):
'setDefaultConfigurationSpreadsheetFile')
def setDefaultConfigurationSpreadsheetFile(self, *args, **kw):
"""Reset the spreadsheet cache."""
self._setDefaultPortalTypeRolesSpreadsheetFile(*args, **kw)
self._setDefaultConfigurationSpreadsheetFile(*args, **kw)
self._spreadsheet_cache = None
self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent,
'setPortalTypeRolesSpreadsheetFile')
setPortalTypeRolesSpreadsheetFile = setDefaultPortalTypeRolesSpreadsheetFile
'setConfigurationSpreadsheetFile')
setConfigurationSpreadsheetFile = setDefaultConfigurationSpreadsheetFile
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment