diff --git a/product/CMFCategory/Category.py b/product/CMFCategory/Category.py index 2998be0b5493cbe9ffc36d706293f26d127f381f..bf3e2321c22867339cac93e546ce31d92e0dee07 100644 --- a/product/CMFCategory/Category.py +++ b/product/CMFCategory/Category.py @@ -375,7 +375,7 @@ class Category(Folder): given list of base categories. Uses translated_compact_title as default method """ return self.getCategoryChildItemList(recursive=recursive, - display_id='translated_compact_title', + display_id='compact_translated_title', base=base, **kw) security.declareProtected(Permissions.AccessContentsInformation, diff --git a/product/CMFCategory/tests/testCMFCategory.py b/product/CMFCategory/tests/testCMFCategory.py index d7e381c9457e7753a27bafd4dd68f47d559f4053..e534012335c67ffabdf1497fdf065c9fac508d4b 100644 --- a/product/CMFCategory/tests/testCMFCategory.py +++ b/product/CMFCategory/tests/testCMFCategory.py @@ -753,6 +753,17 @@ class TestCMFCategory(ERP5TypeTestCase): self.assertEquals([['', ''], ['The Title (the_id)', 'the_id']], base_cat.getCategoryChildTitleAndIdItemList()) + def test_20_CategoryChildCompactTitleItemList(self): + # Tests getCategoryChildCompactTitleItemList + base_cat = self.getCategoryTool().newContent(portal_type='Base Category') + cat = base_cat.newContent(portal_type='Category', + id='the_id', title='The Title', short_title='The T.') + self.assertEquals([['', ''], ['The T.', 'the_id']], + base_cat.getCategoryChildCompactTitleItemList()) + self.assertEquals([['', ''], ['The T.', 'the_id']], + base_cat.getCategoryChildTranslatedCompactTitleItemList()) + + def test_21_AcquiredPortalType(self, quiet=quiet, run=run_all_test): """Test if acquired_portal_type works correctly.""" if not run : return