From d8fe83d73dd4390f79b628047b6b0d0a654b43f8 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Mon, 22 Mar 2004 21:36:12 +0000
Subject: [PATCH] Added deliverability API

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@604 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/SimulationMovement.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/product/ERP5/Document/SimulationMovement.py b/product/ERP5/Document/SimulationMovement.py
index d9aab201ee..6268ae5617 100755
--- a/product/ERP5/Document/SimulationMovement.py
+++ b/product/ERP5/Document/SimulationMovement.py
@@ -414,3 +414,21 @@ a service in a public administration)."""
       its direct consequences. (ex. we do not calculate again a transformation)
     """
     return 0
+
+  # Deliverability / orderability
+  security.declareProtected(Permissions.AccessContentsInformation, 'isOrderable')
+  def isOrderable(self):
+    applied_rule = self.aq_parent
+    rule = applied_rule.getSpecialiseValue()
+    if rule is not None:
+      return rule.isOrderable(m)
+    return 0
+
+  security.declareProtected(Permissions.AccessContentsInformation, 'isDeliverable')
+  def isDeliverable(self):
+    applied_rule = self.aq_parent
+    rule = applied_rule.getSpecialiseValue()
+    if rule is not None:
+      return rule.isDeliverable(m)
+    return 0
+
-- 
2.30.9