diff --git a/product/ERP5/Document/AccountingTransaction.py b/product/ERP5/Document/AccountingTransaction.py index bcd7d33889b710e5190af13222170c12c56c362e..e4262336d424d8dca72a4db1ca9b86ea31932124 100644 --- a/product/ERP5/Document/AccountingTransaction.py +++ b/product/ERP5/Document/AccountingTransaction.py @@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.CMFCore.utils import getToolByName from Products.ERP5.Document.Delivery import Delivery +from Acquisition import aq_base class AccountingTransaction(Delivery): """ @@ -112,7 +113,15 @@ class AccountingTransaction(Delivery): if prop: text_list.append(str(prop)) return ' '.join(text_list) - + + def manage_afterClone(self, transaction): + Delivery.manage_afterClone(self, transaction) + #Clean some properties + if getattr(aq_base(self), 'source_reference', None) is not None: + delattr(self, 'source_reference') + if getattr(aq_base(self), 'destination_reference', None) is not None: + delattr(self, 'destination_reference') + # Compatibility # It may be necessary to create an alias after removing the Transaction class # Products.ERP5Type.Document.Transaction = AccountingTransaction