From f35c012759708e5f0f424798f2d6b3e584b31092 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 22 Apr 2010 17:10:56 +0000
Subject: [PATCH] Since r34722, source should be source_administration of the
 input movement (or its order's source). Same for destination.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34728 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testInvoice.py             | 6 ++++--
 product/ERP5Legacy/tests/testLegacyInvoice.py | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py
index 1ecab14ca8..c8e2367984 100644
--- a/product/ERP5/tests/testInvoice.py
+++ b/product/ERP5/tests/testInvoice.py
@@ -605,8 +605,10 @@ 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.getSource(), invoice.getSource())
-    self.assertEquals(packing_list.getDestination(), invoice.getDestination())
+    self.assertEquals(packing_list.getSourceAdministration(),
+                                       invoice.getSource())
+    self.assertEquals(packing_list.getDestinationAdministration(),
+                                       invoice.getDestination())
     self.assertEquals(packing_list.getDestinationSection(), \
                                        invoice.getDestinationSection())
     self.assertEquals(packing_list.getSourceSection(), \
diff --git a/product/ERP5Legacy/tests/testLegacyInvoice.py b/product/ERP5Legacy/tests/testLegacyInvoice.py
index 856d8d72c7..aaa5150cf0 100644
--- a/product/ERP5Legacy/tests/testLegacyInvoice.py
+++ b/product/ERP5Legacy/tests/testLegacyInvoice.py
@@ -1964,8 +1964,10 @@ 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.getSource(), invoice.getSource())
-    self.assertEquals(packing_list.getDestination(), invoice.getDestination())
+    self.assertEquals(packing_list.getSourceAdministration(),
+                                       invoice.getSource())
+    self.assertEquals(packing_list.getDestinationAdministration(),
+                                       invoice.getDestination())
     self.assertEquals(packing_list.getDestinationSection(), \
                                        invoice.getDestinationSection())
     self.assertEquals(packing_list.getSourceSection(), \
-- 
2.30.9