Skip to content

[16.0][IMP] stock_quantity_history_location: invisible location except from stock.quant view - #423

Merged
OCA-git-bot merged 3 commits into
OCA:16.0from
qrtl:16.0-imp-history_location
Jul 15, 2026
Merged

OCA-git-bot merged 3 commits into
OCA:16.0from
qrtl:16.0-imp-history_location

Conversation

@AungKoKoLin1997

Copy link
Copy Markdown

This PR makes the location field invisible when the model is not stock.quant (locations view), because the location context is not used in other models (e.g., stock.valuation.layer) and choosing location will not effect the functionality. So, displaying this field in the pop-up of other models (e.g., Stock Valuation Layer) may confuse users.

@qrtl QT4756

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@yostashiro yostashiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think include_child_locations should be removed. See odoo/odoo#78078.

Can you please also update the README accordingly, as the usage seems outdated.

@AungKoKoLin1997

Copy link
Copy Markdown
Author

I think include_child_locations should be removed. See odoo/odoo#78078.

Can you please also update the README accordingly, as the usage seems outdated.

@yostashiro Done!

@AungKoKoLin1997
AungKoKoLin1997 force-pushed the 16.0-imp-history_location branch from d839983 to 1e16800 Compare July 14, 2025 04:44

@yostashiro yostashiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Comment thread stock_quantity_history_location/tests/test_stock_quantity_history_location.py Outdated

@nobuQuartile nobuQuartile left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Functional review
LGTM

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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). 🤖

@AungKoKoLin1997

Copy link
Copy Markdown
Author

@oca/stock-logistics-reporting-maintainers
Can we get this PR merged?

attrs="{'invisible': [('location_id', '=', False)]}"
name="location_id"
groups="stock.group_stock_multi_locations"
invisible="context.get('active_model') != 'stock.quant'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does this work on Odoo 16.0? I think it should be attrs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@rolandojduartem
It works on odoo 16.0. You can see how odoo standard field inventory_datetime displays in view depends on model.
https://github.com/odoo/odoo/blob/1adee2b7452c072bcce51cd75641a9e4c2b7f219/addons/stock_account/wizard/stock_quantity_history.xml#L9-L19.

@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 30, 2025
@AungKoKoLin1997
AungKoKoLin1997 force-pushed the 16.0-imp-history_location branch from 3a1bd02 to 0c1063e Compare December 1, 2025 01:52

@kanda999 kanda999 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Functional review: it works in prod server

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 7, 2025
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 12, 2026
Odoo core behavior has changed, so this module’s redundant code can be removed:
- Drop the include_child_locations flag: child locations are now included by default (see odoo/odoo#78078).
- Remove the company_owned context: it was removed upstream in commit odoo/odoo@6fd0575#diff-2f7d1a089caccb39f6dcaf4afe19af96ebf382886e382b22e1e956ba94a927c9.
@AungKoKoLin1997
AungKoKoLin1997 force-pushed the 16.0-imp-history_location branch from 0c1063e to ea33bd3 Compare April 13, 2026 02:08
@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 19, 2026
@AungKoKoLin1997
AungKoKoLin1997 marked this pull request as draft May 19, 2026 01:18
@AungKoKoLin1997
AungKoKoLin1997 marked this pull request as ready for review May 25, 2026 01:31
@rousseldenis

Copy link
Copy Markdown
Contributor

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-423-by-rousseldenis-bump-minor, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 819a2d6 into OCA:16.0 Jul 15, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants