Skip to content

Commit 29f2a58

Browse files
committed
Merge PR OCA#741 into 14.0
Signed-off-by AaronHForgeFlow
2 parents a5b4022 + e4d0cf2 commit 29f2a58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stock_operating_unit/model/stock_warehouse.py

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class StockWarehouseOrderPoint(models.Model):
5151
)
5252
def _check_location(self):
5353
for rec in self:
54+
# Fix: do not check OU on locations that do not have a warehouse at all
55+
# Odoo's base `stock` module will still fill the `warehouse_id` field
56+
# incorrectly with the company's default warehouse
57+
if not rec.location_id.get_warehouse():
58+
continue
5459
if (
5560
rec.warehouse_id.operating_unit_id
5661
and rec.warehouse_id

0 commit comments

Comments
 (0)