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
[12.0][MIG] stock_cycle_count: Migration to 12.0 #625
[12.0][MIG] stock_cycle_count: Migration to 12.0 #625
Conversation
3a1aeb2
to
1836db8
Compare
0c78e87
to
c12e41a
Compare
c12e41a
to
794928e
Compare
5e33471
to
acec4c5
Compare
@@ -40,8 +39,7 @@ def get_horizon_date(self): | |||
@api.model | |||
def _get_cycle_count_locations_search_domain( | |||
self, parent): | |||
domain = [('parent_left', '>=', parent.parent_left), | |||
('parent_right', '<=', parent.parent_right), | |||
domain = [('parent_path', '=like', parent.parent_path + '%'), |
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.
I'm wondering why child of/parent of would not works here ?
See https://github.com/odoo/odoo/blob/12.0/odoo/osv/expression.py#L755
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.
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.
Yeah, that's weird because it's in the same commit that implements parent_path to optimize queries...
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.
Additionally, parent_left and parent_right fields are removed from stock.location object.
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.
Yes, that was the aim of parent_path: to optimize child of/parent of search operators, so, normally, you should use them as before.
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.
so what do you recommend on these ?
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.
Code review
@bodedra Could you squash your commits ? |
@rousseldenis Sure. |
acec4c5
to
f76efd9
Compare
@rousseldenis @mreficent Thanks for your review and suggestion. @lreficent can you update your review ? |
* Update README. * Fixes: DEFAULT_SERVER_DATETIME_FORMAT, PERCENT variables and sale price calculation.
* simplify fetching latest inventory date * use api.depends where needed * add hook for cycle count creation * take advantage of api.multi on check_zero_confirmation method
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
For avoiding an error validating pickings.
f76efd9
to
8387920
Compare
Now zero-qty quants are not removed straight away but by a cron job. Therefore, we have to also check that the quants are not zero-qty ones.
8387920
to
e19fd84
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.
LGTM (just fixed history a little to recover my contribution to the migration)
Let's merge after travis goes green.
/ocabot merge |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 476dd50. Thanks a lot for contributing to OCA. ❤️ PS: Don't worry if GitHub says there are unmerged commits: it is due to a rebase before merge. All commits of this PR have been merged into |
Depends on: