diff --git a/product/ERP5/Document/Movement.py b/product/ERP5/Document/Movement.py index bde6775f9727c05b65f517e1f44a4fe283c821ae..4d4c1a84d8e6d4b29c32658967d74954be2fc499 100644 --- a/product/ERP5/Document/Movement.py +++ b/product/ERP5/Document/Movement.py @@ -962,3 +962,20 @@ class Movement(XMLObject, Amount): # For accounting, returns the quantity converted in a default unit # """ # return self.getStandardInventoriatedQuantity() + + security.declareProtected( Permissions.AccessContentsInformation, + 'asMovementList') + def asMovementList(self): + """ + Placeholder method called when indexing a movement. + + It can be overloaded to generate multiple movements + from a single one. + It is used for cataloging a movement multiple time in + the movement/stock tables. + + Ex: a movement have multiple destinations. + asMovementList returns a list a movement context with different + single destination. + """ + return (self, )