diff --git a/product/ERP5/Document/AmortisationRule.py b/product/ERP5/Document/AmortisationRule.py index 9d6ff524d65f8e30212fe3d1a1b50b85d06d38f4..9cdccf3315f05a6dc43f3710ddf1b376a834af1a 100644 --- a/product/ERP5/Document/AmortisationRule.py +++ b/product/ERP5/Document/AmortisationRule.py @@ -113,7 +113,6 @@ class AmortisationRule(RuleMixin): setter = getattr(simulation_movement, setter_name) setter(value) simulation_movement.edit(start_date=simulation_movement.getStopDate()) - #simulation_movement.immediateReindexObject() return modified_properties def updateSimulationMovement(aggregated_movement, calculated_movement, diff --git a/product/ERP5/Tool/SimulationTool.py b/product/ERP5/Tool/SimulationTool.py index a460f77b8a67712dd94853081ad3dcaa93ac1442..4fe3bd1c8f9fa849df3b8fd1989428626de82aec 100644 --- a/product/ERP5/Tool/SimulationTool.py +++ b/product/ERP5/Tool/SimulationTool.py @@ -2642,9 +2642,7 @@ class SimulationTool(BaseTool): # m.Movement_zSetDestinationTotalAssetPrice(uid=m.getUid(), total_asset_price = total_asset_price) # Global reindexing required afterwards in any case: so let us do it now # Until we get faster methods (->reindexObject()) - #m.immediateReindexObject() m.reindexObject() - #m.activate(priority=7).immediateReindexObject() # Too slow return result @@ -2870,7 +2868,6 @@ class SimulationTool(BaseTool): ) else: raise self.MergeDeliveryListError, "Unknown portal type %s" % str(object_to_update.getPortalType()) - #object_to_update.immediateReindexObject() else: raise self.MergeDeliveryListError, "No object to update" diff --git a/product/ERP5/tests/testAccounting.py b/product/ERP5/tests/testAccounting.py index 0c48b0e46413ab5a85ffdb4256df6d9d18360abb..3ff00c407bffe0df19592f048f7572db47986104 100644 --- a/product/ERP5/tests/testAccounting.py +++ b/product/ERP5/tests/testAccounting.py @@ -1659,7 +1659,7 @@ class TestClosingPeriod(AccountingTestCase): # now check content of stock table testStockTableContent() - balance_transaction.immediateReindexObject() + balance_transaction.reindexObject() self.tic() testStockTableContent() diff --git a/product/ERP5/tests/testAccountingRulesSimulationLegacy.py b/product/ERP5/tests/testAccountingRulesSimulationLegacy.py index f174ca323129ed00c752bba211dffa15f5e7cf94..75f8c385eb689bebc4dee986d1bee3f9938c37a5 100644 --- a/product/ERP5/tests/testAccountingRulesSimulationLegacy.py +++ b/product/ERP5/tests/testAccountingRulesSimulationLegacy.py @@ -787,7 +787,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): # getTotalPrice uses mysql, so we must make sure the invoice is cataloged # to have correct results - invoice_line.getParentValue().recursiveImmediateReindexObject() + self.tic() self.assertEqual(invoice_line.getTotalPrice(), 100) self.assertEqual(invoice_line.getTotalQuantity(), 10) diff --git a/product/ERP5/tests/testAccounting_l10n_fr_m9.py b/product/ERP5/tests/testAccounting_l10n_fr_m9.py index 0a0b205ca441b1ef77e3d10e243a187faddaa65a..a552da99efede6b93cca9a668e880299bcc2a34f 100644 --- a/product/ERP5/tests/testAccounting_l10n_fr_m9.py +++ b/product/ERP5/tests/testAccounting_l10n_fr_m9.py @@ -149,7 +149,7 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase): self.assertEqual(transmission_sheet.getValidationState(), 'draft') # add an invoice to the transamission sheet invoice.setAggregateValue(transmission_sheet) - invoice.recursiveImmediateReindexObject() + self.tic() self.getWorkflowTool().doActionFor( transmission_sheet, 'emit_action') diff --git a/product/ERP5/tests/testBusinessTemplate.py b/product/ERP5/tests/testBusinessTemplate.py index 1ca44aecc4a3fbb9b0f08e1a46354ae6f1e8e607..c3d30236276207680a0036ed65163ea419251676 100644 --- a/product/ERP5/tests/testBusinessTemplate.py +++ b/product/ERP5/tests/testBusinessTemplate.py @@ -6808,7 +6808,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): self.assertEqual(initial___ac_local_roles_group_id_dict__, path.__ac_local_roles_group_id_dict__) # make sure we can reindexing the object works - path.recursiveImmediateReindexObject() + path.recursiveReindexObject() self.tic() finally: # restore state diff --git a/product/ERP5/tests/testInventory.py b/product/ERP5/tests/testInventory.py index 4cb927598f080ac180033a8ad9884153e074f7d9..80ceee5dad0cd5d7634a0a22adef67a88d11140f 100644 --- a/product/ERP5/tests/testInventory.py +++ b/product/ERP5/tests/testInventory.py @@ -1336,7 +1336,6 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): action = transition_step['action'] LOG("Transiting '%s' on packing list %s" % (action, transition_step['id']), 0, '') workflow_tool.doActionFor(transited_pl, action, packing_list_workflow) - transited_pl.recursiveImmediateReindexObject() # XXX self.tic() for omit_transit in (0,1): diff --git a/product/ERP5/tests/testPackingList.py b/product/ERP5/tests/testPackingList.py index 7e70e5ed28c6fb7441ecea160af56e2b9a8aa83c..b53c4dbba2dd40a2b67861622f203a58166cadd5 100644 --- a/product/ERP5/tests/testPackingList.py +++ b/product/ERP5/tests/testPackingList.py @@ -861,7 +861,7 @@ class TestPackingListMixin(TestOrderMixin): if quantity is None: quantity = sequence.get('line_quantity',self.default_quantity) container_line.edit(quantity=quantity) - container_line.immediateReindexObject() + self.tic() def stepSetContainerFullQuantity(self,sequence=None, sequence_list=None, quantity=None,**kw): @@ -882,7 +882,7 @@ class TestPackingListMixin(TestOrderMixin): if not line.hasCellContent(): quantity = line.getQuantity() container_line.edit(quantity=quantity) - container_line.immediateReindexObject() + self.tic() self.assertEqual(quantity, container_line.getQuantity()) self.assertEqual(quantity, container_line.getTotalQuantity()) # with variation @@ -903,7 +903,7 @@ class TestPackingListMixin(TestOrderMixin): quantity=old_cell.getQuantity(), predicate_category_list=cell_key, variation_category_list=cell_key) - cell.immediateReindexObject() + self.tic() self.assertEqual(old_cell.getQuantity(), cell.getQuantity()) self.assertEqual(old_cell.getTotalQuantity(), cell.getTotalQuantity()) diff --git a/product/ERP5Catalog/tests/testERP5Catalog.py b/product/ERP5Catalog/tests/testERP5Catalog.py index 1a4fcc7bfd0769bc3a979290f087514706e83811..fb027fb1ac42eaff987bc20ca3e06f3f0e32bcea 100644 --- a/product/ERP5Catalog/tests/testERP5Catalog.py +++ b/product/ERP5Catalog/tests/testERP5Catalog.py @@ -257,7 +257,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): self.assertEqual([],folder_object_list) person = person_module.newContent(id='4',portal_type='Person') - person_module.recursiveImmediateReindexObject() + self.tic() folder_object_list = [x.getObject().getId() for x in person_module.searchFolder()] self.assertEqual(['4'],folder_object_list) @@ -286,7 +286,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): portal_catalog.manage_catalogClear() person = person_module.newContent(id='4',portal_type='Person') - person_module.recursiveImmediateReindexObject() + self.tic() folder_object_list = [x.getObject().getId() for x in person_module.searchFolder()] self.assertEqual(['4'],folder_object_list) @@ -1364,8 +1364,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): # and then delete it self.deleted_organisation = module.newContent(portal_type='Organisation', title="GreatTitle2") - self.deleted_organisation.immediateReindexObject() - self.commit() + self.tic() deleted_url = self.deleted_organisation.getRelativeUrl() module.manage_delObjects(ids=[self.deleted_organisation.getId()]) self.commit() @@ -1722,7 +1721,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): """ org_a = self._makeOrganisation(title='abc',default_address_city='abc') module = self.getOrganisationModule() - module.immediateReindexObject() + self.tic() # First try without aliases query1 = Query(parent_portal_type="Organisation") query2 = Query(grand_parent_portal_type="Organisation Module") diff --git a/product/ERP5Form/tests/testListBox.py b/product/ERP5Form/tests/testListBox.py index 26dfc0e90a60ce45b4016bbcd3d31559f6375c42..ab20a97a95dcb028e417d5a44bb6d84580e69873 100644 --- a/product/ERP5Form/tests/testListBox.py +++ b/product/ERP5Form/tests/testListBox.py @@ -298,7 +298,7 @@ class TestListBox(ERP5TypeTestCase): foo_module = portal.foo_module o = foo_module.newContent(title=u'\xe9lisa') - o.immediateReindexObject() + self.tic() request = get_request() request['here'] = portal.foo_module @@ -332,7 +332,7 @@ class TestListBox(ERP5TypeTestCase): foo_module = portal.foo_module o = foo_module.newContent(title=u'\xe9lisa') - o.immediateReindexObject() + self.tic() request = get_request() request['here'] = portal.foo_module @@ -389,7 +389,7 @@ class TestListBox(ERP5TypeTestCase): self.assertEqual(word in o.getSubjectList(), True) # Reindex - o.immediateReindexObject() + self.tic() # Render the module in html request = get_request() @@ -485,7 +485,7 @@ class TestListBox(ERP5TypeTestCase): o = foo_module.newContent() # Reindex - o.immediateReindexObject() + self.tic() # Render the module in html request = get_request() @@ -570,7 +570,7 @@ class TestListBox(ERP5TypeTestCase): o = foo_module.newContent() # Reindex - o.immediateReindexObject() + self.tic() # Render the module in html request = get_request()