diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index a5d409f3d86527ab74af31367f8d56e78d059fc0..429d2802c26f81f3241392924faf2235c91cfeb8 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -941,7 +941,7 @@ class ObjectTemplateItem(BaseTemplateItem): This situation triggers a FATAL problem on SQLCatalog.catalogObjectList when upgrading a broken path by ObjectTemplateItem with BusinessTemplate. We often get this problem when we are upgrading a quite old ERP5 site - to new one, as several old classes may be already removed/replaced + to new one, as several old classes may be already removed/replaced in the file system, thus several objects tend to be broken. Keyword arguments: @@ -958,10 +958,10 @@ class ObjectTemplateItem(BaseTemplateItem): class fakeobject: def __init__(self, path): - self._physical_path = tuple(path.split('/')) + self._physical_path = tuple(path.split('/')) def getPhysicalPath(self): return self._physical_path - + def recursiveUnindex(catalog, item_path, root_document_path): # search the object + sub-objects result = catalog(relative_url=(item_path, diff --git a/product/ERP5/tests/testBusinessTemplate.py b/product/ERP5/tests/testBusinessTemplate.py index 17d5ac8de491ba11746f058eac91cdb564a2dc18..865e6726e528595d719ff7916af91776808ac855 100644 --- a/product/ERP5/tests/testBusinessTemplate.py +++ b/product/ERP5/tests/testBusinessTemplate.py @@ -7053,41 +7053,41 @@ class TestBusinessTemplate(BusinessTemplateMixin): self.organisation_amount = 2 self.email_amount = 2 sequence_list = SequenceList() - sequence_string = '\ - CreateOrganisation \ - CreateNewBusinessTemplate \ - UseExportBusinessTemplate \ - AddOrganisationToBusinessTemplate \ - Tic \ - BuildBusinessTemplate \ - SaveBusinessTemplate \ - Tic \ - RemoveOrganisation \ - RemoveBusinessTemplate \ - RemoveAllTrashBins \ - Tic \ - ImportBusinessTemplate \ - UseImportBusinessTemplate \ - InstallBusinessTemplate \ - Tic \ - CheckOrganisationRestored\ - ModifyOrganisation \ - CreateNewBusinessTemplate \ - UseExportBusinessTemplate \ - AddOrganisationToBusinessTemplate \ - BuildBusinessTemplate \ - SaveBusinessTemplate \ - RevertOrganisation \ - Tic \ - CheckOrganisationRestored \ - RewriteWithBrokenOrganisation \ - Tic \ - ImportBusinessTemplate \ - UseImportBusinessTemplate \ - InstallBusinessTemplate \ - Tic \ - CheckOrganisationModified \ - ' + sequence_string = """ + CreateOrganisation + CreateNewBusinessTemplate + UseExportBusinessTemplate + AddOrganisationToBusinessTemplate + Tic + BuildBusinessTemplate + SaveBusinessTemplate + Tic + RemoveOrganisation + RemoveBusinessTemplate + RemoveAllTrashBins + Tic + ImportBusinessTemplate + UseImportBusinessTemplate + InstallBusinessTemplate + Tic + CheckOrganisationRestored + ModifyOrganisation + CreateNewBusinessTemplate + UseExportBusinessTemplate + AddOrganisationToBusinessTemplate + BuildBusinessTemplate + SaveBusinessTemplate + RevertOrganisation + Tic + CheckOrganisationRestored + RewriteWithBrokenOrganisation + Tic + ImportBusinessTemplate + UseImportBusinessTemplate + InstallBusinessTemplate + Tic + CheckOrganisationModified + """ sequence_list.addSequenceString(sequence_string) sequence_list.play(self)