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
[14.0][ADD] stock_location_warehouse #1258
Conversation
e6942f3
to
e6fdcb9
Compare
|
||
_inherit = "stock.location" | ||
warehouse_id = fields.Many2one( | ||
comodel_name="stock.warehouse", compute="_compute_warehouse_id" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
7121fb9
to
846a4d3
Compare
846a4d3
to
f318134
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful addition.
f318134
to
563fdcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review, LGTM
@LoisRForgeFlow can you merge? |
I'm waiting travis to see that tests go green. |
563fdcb
to
d3bc17a
Compare
d3bc17a
to
394a73a
Compare
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
This PR has the |
Congratulations, your PR was merged at 0e51aa1. Thanks a lot for contributing to OCA. ❤️ |
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