Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX] stock_operating_unit: orderpoint OU check for ext locations #743

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions stock_operating_unit/model/stock_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
)
def _check_location(self):
for rec in self:
# Fix: do not check OU on locations that do not have a warehouse at all
# Odoo's base `stock` module will still fill the `warehouse_id` field
# incorrectly with the company's default warehouse
if not rec.location_id.warehouse_id:
continue

Check warning on line 56 in stock_operating_unit/model/stock_warehouse.py

View check run for this annotation

Codecov / codecov/patch

stock_operating_unit/model/stock_warehouse.py#L56

Added line #L56 was not covered by tests
if (
rec.warehouse_id.operating_unit_id
and rec.warehouse_id
Expand Down