Skip move with no quantity to allocate cost
This prevents a division by zero. issue7229 review40181002
This commit is contained in:
1 parent
81f7646b85
commit
33ac928ad8
1 file changed
+1
-1
+1
-1
@@ -237,7 +237,7 @@ class LandedCost(Workflow, ModelSQL, ModelView):
|
||||
cost = self.cost
|
||||
currency = self.company.currency
|
||||
moves = [m for s in self.shipments for m in s.incoming_moves
|
||||
if m.state != 'cancel']
|
||||
if m.state != 'cancel' and m.quantity]
|
||||
|
||||
costs = []
|
||||
digit = Move.unit_price.digits[1]
|
||||
|
||||
Reference in new issue
Block a user