Most Powerful Open Source ERP

How To Configure Movement Group

showing how to group simulation movements and update values on Delivery/Line/Cell.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

Movement Group is used for grouping simulation movements and updating values on Delivery/Line/Cell.

Table of Contents

how to create a custom Movement Group class

The following methods are used. See some Products/ERP5/Document/* files for example.

_getPropertyDict(self, movement, **kw):

(mandatory) This method returns a dict, that will be used to update values on Delivery/Line/Cell, and that will be used to determine which simulation movements can be merged.

test(self, object, property_dict, **kw):

(mandatory) This method returns if object can be used for updating according to property_dict. Its return value is [updatable? (True or False), property_dict that is used to update values]. If you want to create a new Delivery/Line/Cell instead of updating existing one, return [False, property_dict].

_separate(self, movement_list):

(optional) This method defines how simulation movements are grouped. If you don't define this method, simulation movements that have the same _getPropertyDict() value are merged.

how to register a new Movement Group in ERP5

  • register the Movement Group in portal_types as 'ERP5 Type Information'.
  • specify 'movement_group' in its Groups.
  • modify its View action to MovementGroup_view (w/o tested_property) or PropertyMovementGroup_view (w/tested_property), or create an appropriate view.
  • add the Movement Group into 'Allowed content types' field of Delivery Builder and Order Builder portal type.

Movement group to divergence relation

One Movement Group might be related to many divergences (many properties or categories). On the other hand one divergence (property or category) have to be related to only one Movement Group.

Movement Group ------- start_date
                 ----- stop_date

Related Articles