OCA / operating-unit

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

[16.0][FW][FIX] operating_unit: default operating unit more multi-company friendly #644

Closed aleuffre closed 7 months ago

aleuffre commented 7 months ago

FW of #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

OCA-git-bot commented 7 months ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-644-by-AaronHForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 7 months ago

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