From e7d501d5a9aa4864a6d7ae97c745862949311d47 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Wed, 29 Sep 2010 10:04:35 +0000
Subject: [PATCH] DeliveryLine portal type does not exist: it will soon be
 impossible to create temporary objects if the portal type does not exist. Try
 to use a Movement instead; and if things break we will have to use a
 concrete, real portal type here

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38746 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Inventory.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/Inventory.py b/product/ERP5/Document/Inventory.py
index 44d2d52e67..38f370a27f 100644
--- a/product/ERP5/Document/Inventory.py
+++ b/product/ERP5/Document/Inventory.py
@@ -145,8 +145,8 @@ class Inventory(Delivery):
       
 
     if temp_constructor is None:
-      from Products.ERP5Type.Document import newTempDeliveryLine
-      temp_constructor = newTempDeliveryLine
+      from Products.ERP5Type.Document import newTempMovement
+      temp_constructor = newTempMovement
     stop_date = self.getStopDate()
 
     stock_object_list = []
@@ -238,6 +238,7 @@ class Inventory(Delivery):
                  'start_date': stop_date}
           temp_delivery_line = temp_constructor(self,
                                                 inventory_id)
+          
           # set category on it only if quantity not null
           # thus line with same uid will be deleted but we
           # don't insert line with null quantity as we test
-- 
2.30.9