Skip to content

[14.0][IMP] stock_operating_unit_access_all: add stock views for all operating units access#849

Closed
GSLabIt wants to merge 1 commit intoOCA:14.0from
GSLabIt:14.0-imp-stock_operating_unit_access_all-add_views
Closed

[14.0][IMP] stock_operating_unit_access_all: add stock views for all operating units access#849
GSLabIt wants to merge 1 commit intoOCA:14.0from
GSLabIt:14.0-imp-stock_operating_unit_access_all-add_views

Conversation

@GSLabIt
Copy link
Copy Markdown
Contributor

@GSLabIt GSLabIt commented Apr 27, 2026

No description provided.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @kittiu,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added mod:stock_operating_unit_access_all Module stock_operating_unit_access_all series:14.0 labels Apr 27, 2026
…ing units access

Co-authored-by: Copilot <copilot@github.com>
@GSLabIt GSLabIt force-pushed the 14.0-imp-stock_operating_unit_access_all-add_views branch from 086d262 to 96c59a3 Compare April 27, 2026 10:00
Copy link
Copy Markdown
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional ok!

Copy link
Copy Markdown
Contributor

@HekkiMelody HekkiMelody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. it's usually best to avoid using replace unless absolutely necessary. In this case, it'd be more compatible to simply operate on the domain attribute, I think. All other field customizations are lost otherwise.
  2. The issue being fixed here is that a user with "Manage all OUs" doesn't seems to be able to select any OUs.
  3. Checking the field user_ids to limit the visible operating units is obsolete and unnecessary because the available operating units are already filtered by record rules automatically based on what the user has available. Additionally people who have all operating units available don't appear in the user_ids field, which is what causes the underlying issue. (This was already raised in this PR.) So I think these changes shouldn't go here, but rather in stock_operating_unit. See this PR for an example of the same fix. Most modules in operating-unit could potentially benefit from the same fix.

@HekkiMelody
Copy link
Copy Markdown
Contributor

Can you check if this PR fixes the issue?

@GSLabIt
Copy link
Copy Markdown
Contributor Author

GSLabIt commented Apr 27, 2026

  1. it's usually best to avoid using replace unless absolutely necessary. In this case, it'd be more compatible to simply operate on the domain attribute, I think. All other field customizations are lost otherwise.
  2. The issue being fixed here is that a user with "Manage all OUs" doesn't seems to be able to select any OUs.
  3. Checking the field user_ids to limit the visible operating units is obsolete and unnecessary because the available operating units are already filtered by record rules automatically based on what the user has available. Additionally people who have all operating units available don't appear in the user_ids field, which is what causes the underlying issue. (This was already raised in this PR.) So I think these changes shouldn't go here, but rather in stock_operating_unit. See this PR for an example of the same fix. Most modules in operating-unit could potentially benefit from the same fix.

Thanks for the review, you has been faster than me to apply changes. Closing this one in favor of #850

@GSLabIt GSLabIt closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:stock_operating_unit_access_all Module stock_operating_unit_access_all series:14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants