Commit 5fb4e5fe authored by Jean-Paul Smets's avatar Jean-Paul Smets

added methods isOrderable and isDeliverable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@771 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0962f70d
......@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.Rule import Rule
from Products.ERP5.ERP5Globals import movement_type_list, order_movement_type_list, reserved_inventory_state_list, current_inventory_state_list
from Products.ERP5.ERP5Globals import movement_type_list, order_movement_type_list, reserved_inventory_state_list, current_inventory_state_list, draft_order_state
from zLOG import LOG
......@@ -243,3 +243,12 @@ An ERP5 Rule..."""
"""
Returns a list Divergence solvers
"""
# Deliverability / orderability
def isOrderable(self, m):
return 1
def isDeliverable(self, m):
if m.getSimulationState() in draft_order_state:
return 0
return 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment