diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index c8e2367984823f7bbdfcc16bbbd5ca07f2da338a..1ecab14ca8922523434e47879eacd5d16905e894 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -605,10 +605,8 @@ class TestInvoiceMixin(TestPackingListMixin, portal_type=self.invoice_portal_type) self.assertEquals(len(related_invoice_list), 1) invoice = related_invoice_list[0] - self.assertEquals(packing_list.getSourceAdministration(), - invoice.getSource()) - self.assertEquals(packing_list.getDestinationAdministration(), - invoice.getDestination()) + self.assertEquals(packing_list.getSource(), invoice.getSource()) + self.assertEquals(packing_list.getDestination(), invoice.getDestination()) self.assertEquals(packing_list.getDestinationSection(), \ invoice.getDestinationSection()) self.assertEquals(packing_list.getSourceSection(), \ diff --git a/product/ERP5Legacy/Document/InvoicingRule.py b/product/ERP5Legacy/Document/InvoicingRule.py index f81433ee0aae1d03eff397333a63f8c9566707ad..be76f6231d020a8a0fcbe854c67881a66c5dc50c 100644 --- a/product/ERP5Legacy/Document/InvoicingRule.py +++ b/product/ERP5Legacy/Document/InvoicingRule.py @@ -74,19 +74,6 @@ class InvoicingRule(Rule): def isDeliverable(self, movement): return movement.getResource() is not None - def _getExpandablePropertyUpdateDict(self, applied_rule, movement, - business_path, current_property_dict): - """ - In Invoice Simulation Rule, source should be source_administration - of the input movement or its order's source. Same for destination. - """ - root_simulation_movement = movement.getRootSimulationMovement() - source = movement.getSourceAdministration() or \ - root_simulation_movement.getSource() - destination = movement.getDestinationAdministration() or \ - root_simulation_movement.getDestination() - return {'source':source, 'destination':destination} - security.declareProtected(Permissions.AccessContentsInformation, 'getExpandablePropertyList') def getExpandablePropertyList(self, default=None): diff --git a/product/ERP5Legacy/tests/testLegacyInvoice.py b/product/ERP5Legacy/tests/testLegacyInvoice.py index aaa5150cf0f4e2463a35a8c66b44d740cca6af8f..856d8d72c7f6b64be8bae197d5c07ca07f78da8a 100644 --- a/product/ERP5Legacy/tests/testLegacyInvoice.py +++ b/product/ERP5Legacy/tests/testLegacyInvoice.py @@ -1964,10 +1964,8 @@ class TestSaleInvoiceMixin(TestInvoiceMixin, portal_type=self.invoice_portal_type) self.assertEquals(len(related_invoice_list), 1) invoice = related_invoice_list[0] - self.assertEquals(packing_list.getSourceAdministration(), - invoice.getSource()) - self.assertEquals(packing_list.getDestinationAdministration(), - invoice.getDestination()) + self.assertEquals(packing_list.getSource(), invoice.getSource()) + self.assertEquals(packing_list.getDestination(), invoice.getDestination()) self.assertEquals(packing_list.getDestinationSection(), \ invoice.getDestinationSection()) self.assertEquals(packing_list.getSourceSection(), \