Commit 1761194e authored by Yoshinori Okuji's avatar Yoshinori Okuji

Make it sure to prevent a builder from creating a new delivery when it is not allowed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e96a334
......@@ -440,6 +440,9 @@ class OrderBuilder(XMLObject, Amount, Predicate):
delivery = delivery_to_update_list[0]
if delivery is None:
if not self.getDeliveryCreatable():
raise SelectMethodError('No updatable delivery found with %s' \
% (self.getPath(),))
delivery = self._createDelivery(delivery_module,
movement_group_node.getMovementList(),
activate_kw)
......
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