diff --git a/product/ERP5/tests/testTaskReporting.py b/product/ERP5/tests/testTaskReporting.py index c6bf43c89b2287faae86af2d8096c6c323bdb561..65d88b05a12d1de8104635fc62421fbf4e52590c 100644 --- a/product/ERP5/tests/testTaskReporting.py +++ b/product/ERP5/tests/testTaskReporting.py @@ -208,7 +208,7 @@ class TestTaskReporting(ERP5ReportTestCase): report_section_list = self.getReportSectionList( self.portal.project_module.Project_1, 'Project_viewMonthlyReport') - self.assertEquals(2, len(report_section_list)) + self.assertEquals(1, len(report_section_list)) line_list = self.getListBoxLineList(report_section_list[0]) data_line_list = [l for l in line_list if l.isDataLine()] diff --git a/product/ERP5Type/id_as_reference.py b/product/ERP5Type/id_as_reference.py index 042d18b76da7d70298a09bdb5e972c3625036839..65589cd6fd4ad44ac8b1ca1936a20c344617dc06 100644 --- a/product/ERP5Type/id_as_reference.py +++ b/product/ERP5Type/id_as_reference.py @@ -77,4 +77,11 @@ def IdAsReferenceMixin(suffix): return reference return default + def _setReference(self, value): + self.__dict__.pop('default_reference', None) # BBB + self.setId(value + suffix) + + security.declareProtected(Permissions.ModifyPortalContent, 'setReference') + setReference = _setReference + return IdAsReferenceMixin