Commit 595accf1 authored by Jérome Perrin's avatar Jérome Perrin

fixup! Movement: Add isMovingItem method to be possible check if the object is...

fixup! Movement: Add isMovingItem method to be possible check if the object is moving physically or not

Delivery Cell follow the same logic as Deliver Line to decide if a
movement is moving item. There is no "Delivery Movement" class yet, so I
duplicate the method for now.

Without this fix, item tracking no longer work when using variations.

(cherry picked from commit d561dd5b)
!70
parent 48a1e042
......@@ -160,6 +160,14 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
def isMovement(self):
return 1
security.declareProtected(Permissions.AccessContentsInformation,
'isMovingItem')
def isMovingItem(self, item):
type_based_script = self._getTypeBasedMethod('isMovingItem')
if type_based_script:
return type_based_script(item)
return self.isAccountable()
# Override getQuantityUnitXXX to negate same methods defined in
# Amount class. Because cell must acquire quantity unit from line
# not from resource.
......
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