mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Remove implicit fallback when rules are used
When rules are configured and have been applied, we should not have an implicit fallback on the base location, as it would kind of cancel the benefits of the rules (as it would then take whatever it wants anywhere in all the locations).
This commit is contained in:
@@ -103,16 +103,7 @@ class StockMove(models.Model):
|
||||
break
|
||||
|
||||
reserved = need - still_need
|
||||
# Implicit fallback on the original location
|
||||
return reserved + super()._update_reserved_quantity(
|
||||
still_need,
|
||||
available_quantity - reserved,
|
||||
location_id=location_id,
|
||||
lot_id=lot_id,
|
||||
package_id=package_id,
|
||||
owner_id=owner_id,
|
||||
strict=strict,
|
||||
)
|
||||
return reserved
|
||||
|
||||
# We fall here if there is no rule or they have all been
|
||||
# excluded by 'rule._is_rule_applicable'
|
||||
|
||||
Reference in New Issue
Block a user