-
-
Notifications
You must be signed in to change notification settings - Fork 723
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
[15.0][MIG] stock_change_qty_reason #1608
[15.0][MIG] stock_change_qty_reason #1608
Conversation
/ocabot migration stock_change_qty_reason |
Sorry @MiquelRForgeFlow you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
41fc231
to
8553eee
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.
You should extend the method _get_inventory_fields_write
for the stock.quant
model adding the two new fields. Otherwise, when applying the inventory adjustment it will fail.
/ocabot migration stock_change_qty_reason |
377be5f
to
3c563c0
Compare
@GuillemCForgeFlow ready |
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.
thank you 😄
Currently translated at 96.2% (25 of 26 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_change_qty_reason Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_change_qty_reason/fr/
Currently translated at 100.0% (25 of 25 strings) Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_change_qty_reason Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_change_qty_reason/it/
247a60b
to
4779479
Compare
4779479
to
51b9b0e
Compare
Why the reason is in both, the quants and the stock move lines? |
@AaronHForgeFlow In the quant, to be able to temporarily introduce the reason in the adjustment view. In the move line, because it's were it ends saved (inventory_history). |
@MiquelRForgeFlow Shouldn't it be located in stock move instead? As stock.move.line seems too volatile for me to be as safe as wanted. |
@rousseldenis inventory history is handled by move lines, not moves, see odoo code here. Have you tested functionally the module? |
Yes of course. But inventories entry point is stock.move: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_quant.py#L603 So, I would have put the reason fields on that level and relateds on move lines |
@rousseldenis Yes, I could do that. Doable. But, in my opinion, what you propose doesn't improve anything substantially, it's practically the same. I prefer in stock move lines for continuity reasons. In this module, in v14, you could have a different reason for each inventory line, independently of the global reason of the stock inventory. Although in v15 each inventory stock move only has a move line, I wanted to maintain that feature of v14 in some way, and thus, deciding to put the reason in the stock move line. Imagine if a custom module enables doing adjustments to two products at the same time, and thus, generating a move with two stock move lines. Then, what if one may want a different reason for each move line? |
It's impossible as it will generate one move per product. But ok, let's go forward with that. I wanted to highlight the fact that quite every stock reporting is done on move level and people should be aware to get the information from the line. |
Ok, thanks, could you approve? :) |
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
@MiquelRForgeFlow Ready ? |
Yes |
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 4968f45. Thanks a lot for contributing to OCA. ❤️ |
Standard migration (without using stock_inventory module).