From 6b0350e9c504aeb194a7925e6311c07135159ff1 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Thu, 14 Oct 2010 14:45:57 +0000
Subject: [PATCH] amount_generator: add backward compatibility for intermediate
 lines

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@39173 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/mixin/amount_generator.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/product/ERP5/mixin/amount_generator.py b/product/ERP5/mixin/amount_generator.py
index ad82140d5f..b342d7be57 100644
--- a/product/ERP5/mixin/amount_generator.py
+++ b/product/ERP5/mixin/amount_generator.py
@@ -289,6 +289,9 @@ class AmountGeneratorMixin:
             break
         if not quantity:
           continue
+        # Backward compatibility
+        if getattr(aq_base(self), 'create_line', None) == 0:
+          property_dict['resource'] = None
         # Create an Amount object
         amount = newTempAmount(portal,
           # we only want the id to be unique so we pick a random causality
-- 
2.30.9