Repository navigation
[19.0][FIX] sales_team_operating_unit: default company from operating unit - #878
Open
parabol123654 wants to merge 1 commit into
Open
parabol123654 wants to merge 1 commit into
parabol123654 wants to merge 1 commit into
Conversation
AaronHForgeFlow
approved these changes
Oct 30, 2026
AaronHForgeFlow
left a comment
Contributor
There was a problem hiding this comment.
👍 thanks for the FW port
A new sales team gets the user's default operating unit, but no company. Users without multi-company access do not see the company field, so saving the team failed with "company inconsistencies" between the team and its operating unit. Default the company to the one of the operating unit, as done in 18.0 (OCA#856). Assisted-by: Claude Opus 5.5
parabol123654
force-pushed
the
19.0-fix-sales_team_operating_unit-default-company
branch
from
November 14, 2026 17:54
7fa9407 to
c066e13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of #856 (18.0) to 19.0.
Problem: a new sales team gets the user's default operating unit (
operating_unit_iddefault) but no company. Users without multi-company access do not seecompany_id, so when such a sales manager creates a team, saving fails:Fix: in
default_get, defaultcompany_idto the company of the default operating unit, as in 18.0.Test:
test_create_team_single_company_usercreates a team through aFormas a single-company sales manager (the 18.0 test runs as admin, which has the multi-company group). Without the fix it fails with the error above; with the fix the module's tests pass, as do those ofcrm_operating_unit(Odoo 19.0).Assisted-by: Claude Opus 5.5