diff --git a/product/ERP5/Document/DeliveryLine.py b/product/ERP5/Document/DeliveryLine.py index 4924dc1c6eae395e863e6289bef0aa2cad25c89d..d24e57ae7987dc09ace88729004badb5a5a09e12 100755 --- a/product/ERP5/Document/DeliveryLine.py +++ b/product/ERP5/Document/DeliveryLine.py @@ -83,7 +83,9 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated): """ Explicitly acquire simulation_state from parent """ - return self.aq_parent.getSimulationState() + if hasattr(self.getParent(),'getSimulationState'): + return self.getParent().getSimulationState() + return None # Force in _edit to modify variation_base_category_list first security.declarePrivate( '_edit' ) @@ -141,15 +143,6 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated): aggregate = self.DeliveryLine_zGetTotal()[0] return aggregate.total_quantity or 0.0 - # Cell Related - security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' ) - def newCellContent(self, id, **kw): - """ - This method can be overriden - """ - self.invokeFactory(type_name="Delivery Cell",id=id) - return self.get(id) - security.declareProtected( Permissions.ModifyPortalContent, 'hasCellContent' ) def hasCellContent(self, base_id='movement'): """