OCA / operating-unit

Manage Operating Units in Odoo
GNU Affero General Public License v3.0
72 stars 237 forks source link

[15.0][FW][FIX] operating_unit: default operating unit more multi-company friendly #643

Closed aleuffre closed 7 months ago

aleuffre commented 7 months ago

FW of https://github.com/OCA/operating-unit/pull/642

This PR fixes an issue with the method operating_unit_default_get where it would return an operating unit even for a company that was not active, which would cause all sorts of issues

Steps to reproduce on runboat, taking as example purchase_operating_unit:

The issue arises because the operating_unit field is pre-compiled on the PO with an Operating Unit whose company is inactive, and the onchanges cannot find or access related data.

AaronHForgeFlow commented 7 months ago

/ocabot merge patch

Merging to keep branches even

OCA-git-bot commented 7 months ago

What a great day to merge this nice PR. Let's do it! Prepared branch 15.0-ocabot-merge-pr-643-by-AaronHForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 7 months ago

Congratulations, your PR was merged at 955b2060cf875fac4f59eae7511d39f22db80dbd. Thanks a lot for contributing to OCA. ❤️