From 5c7ef54eead1477b9d49db9ed7dc625cdebc34c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 27 Oct 2015 15:26:35 +0100 Subject: [PATCH] DeliveryLine: let a type based method decide if this delivery line is moving item --- product/ERP5/Document/DeliveryLine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/DeliveryLine.py b/product/ERP5/Document/DeliveryLine.py index 4b172541f2..172ca2a0a5 100644 --- a/product/ERP5/Document/DeliveryLine.py +++ b/product/ERP5/Document/DeliveryLine.py @@ -107,8 +107,11 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement): return self.getParentValue().isAccountable() and (not self.hasCellContent()) security.declareProtected(Permissions.AccessContentsInformation, - 'isMovingItem') + 'isMovingItem') def isMovingItem(self, item): + type_based_script = self._getTypeBasedMethod('isMovingItem') + if type_based_script: + return type_based_script(item) return self.isAccountable() def _getTotalPrice(self, default=0.0, context=None, fast=0): -- 2.30.9