From ec2493cdd4ead2b87653afb26874f8c03fc6e8b7 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Mon, 5 Jul 2010 11:19:03 +0000
Subject: [PATCH] change the way to detect if new simulation API is used or
 not.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36859 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testInvoice.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py
index 1ecab14ca8..9872c42e21 100644
--- a/product/ERP5/tests/testInvoice.py
+++ b/product/ERP5/tests/testInvoice.py
@@ -3456,7 +3456,8 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
           invoice_line.getDeliveryRelatedValue(portal_type='Simulation Movement'
               ).getQuantity())
 
-    if self.portal._getOb('portal_solvers', None) is not None:
+    if invoice_line.getDeliveryRelatedValue().getParentValue().getSpecialiseId() == \
+        'new_invoice_simulation_rule':
       # With new simulation solvers, changes on simulation movements will
       # not backtrack.
       pass
-- 
2.30.9