diff --git a/product/ERP5/tests/testBusinessTemplate.py b/product/ERP5/tests/testBusinessTemplate.py index 190f06a7d363c133c8778439d7d426137c84ef86..f45b02950ad232e60b71069f8f87bd95d250ab58 100644 --- a/product/ERP5/tests/testBusinessTemplate.py +++ b/product/ERP5/tests/testBusinessTemplate.py @@ -1834,6 +1834,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): sequence.edit(dependency_bt=template) # tests + def test_Title(self): + """Tests the Title of the Template Tool.""" + self.assertEquals('Template Tool', self.getTemplateTool().Title()) + def test_01_checkNewSite(self, quiet=quiet, run=run_all_test): if not run: return if not quiet: diff --git a/product/ERP5Form/tests/testPreferences.py b/product/ERP5Form/tests/testPreferences.py index d7171ea38f41a84aa0b344e5b323ef31190ce4a1..3a8c021d97af794a8e1b9671d07ab76b782614eb 100644 --- a/product/ERP5Form/tests/testPreferences.py +++ b/product/ERP5Form/tests/testPreferences.py @@ -96,6 +96,11 @@ class TestPreferences(ERP5TypeTestCase): self.assertEquals(group.getPreferenceState(), 'disabled') self.assertEquals(site.getPreferenceState(), 'disabled') + def test_PreferenceToolTitle(self): + """Tests that the title of the preference tool is correct. + """ + self.assertEquals('Preferences', self.getPreferenceTool().Title()) + def test_AllowedContentTypes(self, quiet=quiet, run=run_all_tests): """Tests Preference can be added in Preference Tool. """ diff --git a/product/ERP5Type/Tool/BaseTool.py b/product/ERP5Type/Tool/BaseTool.py index 7ea657e4cc64c7762eb01220fd096f0038a6f391..74d323af9b85ca1d0e8ced5216665422cd2974dc 100644 --- a/product/ERP5Type/Tool/BaseTool.py +++ b/product/ERP5Type/Tool/BaseTool.py @@ -60,7 +60,8 @@ class BaseTool (UniqueObject, Folder): # Filter content (ZMI)) def __init__(self): - return Folder.__init__(self, self.__class__.id) + return Folder.__init__(self, self.__class__.id, + getattr(self.__class__, 'title', '')) # Filter content (ZMI)) def filtered_meta_types(self, user=None):