OCA / operating-unit

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

[14.0][FIX] operating_unit: default operating unit more multi-company friendly #642

Closed aleuffre closed 7 months ago

aleuffre commented 8 months ago

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 8 months ago

The change seems legit

OCA-git-bot commented 7 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

AaronHForgeFlow commented 7 months ago

/ocabot merge patch

AaronHForgeFlow commented 7 months ago

can you please do the forward port to newer versions?

OCA-git-bot commented 7 months ago

This PR looks fantastic, let's merge it! Prepared branch 14.0-ocabot-merge-pr-642-by-AaronHForgeFlow-bump-patch, awaiting test results.

OCA-git-bot commented 7 months ago

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