Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][ADD] stock_location_warehouse #1258

Merged
merged 1 commit into from Nov 9, 2021

Conversation

BernatPForgeFlow
Copy link
Member

This module adds the associated warehouse to every location. If we have a tree of locations and sublocations, this module will update the associated warehouse every time we modify a location parent.
If a location changes its father location, it will change its associated warehouse and all its childs too.

@ForgeFlow

@BernatPForgeFlow
Copy link
Member Author

@ForgeFlow

@BernatPForgeFlow BernatPForgeFlow force-pushed the 14.0-rfc-stock_location_warehouse branch 2 times, most recently from e6942f3 to e6fdcb9 Compare November 2, 2021 09:03

_inherit = "stock.location"
warehouse_id = fields.Many2one(
comodel_name="stock.warehouse", compute="_compute_warehouse_id"

Choose a reason for hiding this comment

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

@BernatPForgeFlow Nice module!!

Any reason why you didn't make the field stored? Think it would be easy to have the field available in the database and UI thing like grouping?

Copy link
Member Author

Choose a reason for hiding this comment

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

@CasVissers-360ERP Yes, nice observation. I deleted the stored value because the previous function had nested loops with locations. Now we have exactly backported just what odoo15 does and it works fine. If I put store=True, then code stops working and it would need to be refactored again, and it doesn't seem trivial to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

@CasVissers-360ERP Finally the code is refactored and the field warehouse_id is stored. How do you see it?

@BernatPForgeFlow BernatPForgeFlow force-pushed the 14.0-rfc-stock_location_warehouse branch 2 times, most recently from 7121fb9 to 846a4d3 Compare November 8, 2021 09:55
Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

Useful addition.

@BernatPForgeFlow BernatPForgeFlow changed the title [14.0][RFC][stock_location_warehouse] [14.0][ADD][stock_location_warehouse] Nov 9, 2021
@BernatPForgeFlow BernatPForgeFlow changed the title [14.0][ADD][stock_location_warehouse] [14.0][ADD] stock_location_warehouse Nov 9, 2021
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional review, LGTM

@JordiBForgeFlow
Copy link
Sponsor Member

@LoisRForgeFlow can you merge?

@LoisRForgeFlow
Copy link
Contributor

@LoisRForgeFlow can you merge?

I'm waiting travis to see that tests go green.

@LoisRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-1258-by-LoisRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
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). 🤖

@OCA-git-bot OCA-git-bot merged commit fd015ad into OCA:14.0 Nov 9, 2021
@OCA-git-bot
Copy link
Contributor

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

@MiquelRForgeFlow MiquelRForgeFlow deleted the 14.0-rfc-stock_location_warehouse branch November 9, 2021 15:59
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.

None yet

6 participants