Commit b0a3d750 authored by Jérome Perrin's avatar Jérome Perrin

use new name "GeneratedDeliveryBuilder" everywhere in this file


git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37502 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5851a089
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.OrderBuilder import OrderBuilder, \ from Products.ERP5.Document.GeneratedDeliveryBuilder import \
SelectMethodError GeneratedDeliveryBuilder, SelectMethodError
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.CopySupport import CopyError, tryMethodCallWithTemporaryPermission from Products.ERP5Type.CopySupport import CopyError, tryMethodCallWithTemporaryPermission
class SimulatedDeliveryBuilder(OrderBuilder): class SimulatedDeliveryBuilder(GeneratedDeliveryBuilder):
""" """
Delivery Builder objects allow to gather multiple Simulation Movements Delivery Builder objects allow to gather multiple Simulation Movements
into a single Delivery. into a single Delivery.
...@@ -104,7 +104,7 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -104,7 +104,7 @@ class SimulatedDeliveryBuilder(OrderBuilder):
defines how to query all Simulation Movements which meet certain criteria defines how to query all Simulation Movements which meet certain criteria
(including the above path path definition). (including the above path path definition).
First, select movement matching to criteria define on DeliveryBuilder First, select movement matching to criteria define on Delivery Builder
Then, call script simulation_select_method to restrict movement_list Then, call script simulation_select_method to restrict movement_list
""" """
movement_list = [] movement_list = []
...@@ -151,7 +151,7 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -151,7 +151,7 @@ class SimulatedDeliveryBuilder(OrderBuilder):
Create the relation between simulation movement Create the relation between simulation movement
and delivery movement. and delivery movement.
""" """
OrderBuilder._setDeliveryMovementProperties( GeneratedDeliveryBuilder._setDeliveryMovementProperties(
self, delivery_movement, self, delivery_movement,
simulation_movement, property_dict, simulation_movement, property_dict,
update_existing_movement=update_existing_movement, update_existing_movement=update_existing_movement,
...@@ -163,7 +163,7 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -163,7 +163,7 @@ class SimulatedDeliveryBuilder(OrderBuilder):
# Attributes of delivery_movement must not be modified here. # Attributes of delivery_movement must not be modified here.
# Because we can not change values modified by the user. # Because we can not change values modified by the user.
# Delivery will probably diverge now, but this is not the job of # Delivery will probably diverge now, but this is not the job of
# DeliveryBuilder to resolve such problem. # Delivery Builder to resolve such problem.
# Use Solver instead. # Use Solver instead.
simulation_movement.edit(delivery_ratio=0) simulation_movement.edit(delivery_ratio=0)
else: else:
...@@ -336,8 +336,8 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -336,8 +336,8 @@ class SimulatedDeliveryBuilder(OrderBuilder):
def _createDelivery(self, delivery_module, movement_list, activate_kw): def _createDelivery(self, delivery_module, movement_list, activate_kw):
""" """
Refer to the docstring in OrderBuilder. Refer to the docstring in GeneratedDeliveryBuilder.
Unlike OrderBuilder, DeliveryBuilder needs to respect Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
existing relationship. existing relationship.
""" """
try: try:
...@@ -372,8 +372,8 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -372,8 +372,8 @@ class SimulatedDeliveryBuilder(OrderBuilder):
def _createDeliveryLine(self, delivery, movement_list, activate_kw): def _createDeliveryLine(self, delivery, movement_list, activate_kw):
""" """
Refer to the docstring in OrderBuilder. Refer to the docstring in GeneratedDeliveryBuilder.
Unlike OrderBuilder, DeliveryBuilder needs to respect Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
existing relationship. existing relationship.
""" """
try: try:
...@@ -411,8 +411,8 @@ class SimulatedDeliveryBuilder(OrderBuilder): ...@@ -411,8 +411,8 @@ class SimulatedDeliveryBuilder(OrderBuilder):
def _createDeliveryCell(self, delivery_line, movement, activate_kw, def _createDeliveryCell(self, delivery_line, movement, activate_kw,
base_id, cell_key): base_id, cell_key):
""" """
Refer to the docstring in OrderBuilder. Refer to the docstring in GeneratedDeliveryBuilder.
Unlike OrderBuilder, DeliveryBuilder needs to respect Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
existing relationship. existing relationship.
""" """
try: try:
......
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