-
-
Notifications
You must be signed in to change notification settings - Fork 790
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
[16.0][MIG] purchase_delivery_split_date: Migration to 16.0 #1687
[16.0][MIG] purchase_delivery_split_date: Migration to 16.0 #1687
Conversation
Use v8 API Follow the OCA guidelines for manifest and README PEP8 Extend _create_stock_move because the method we used to extend in v7 doesn't exist anymore.
Currently translated at 100.0% (2 of 2 strings) Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_delivery_split_date/zh_CN/
Currently translated at 100.0% (2 of 2 strings) Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_delivery_split_date/pt_BR/
This changeset implements a missing part in the module description. If you have a purchase order with several lines, confirmed, then you change the dates on some of the line, this would be reflected in the related stock moves but not in the stock pickings which would not be split or merged by date.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_delivery_split_date/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_delivery_split_date/de/
3bc85c3
to
79a192b
Compare
79a192b
to
210ffd0
Compare
@FernandoRomera Some things seem weird to me. I will do a PR on your branch soon. |
@gurneyalex Do you remember why you did this and why in this module (it seems functionally out of scope)? |
@FernandoRomera I did this : MallorcaSoft#1
|
I think I will also modify the code on purchase order as there are some operations that can be done by batch |
Done in PR mentionned above. I think that one is ready |
@rousseldenis |
And functionally works as expected |
self.mapped("order_id")._check_split_pickings() | ||
return res | ||
|
||
def create(self, values): |
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.
@api.model_create_multi
def create(self, values): | ||
line = super().create(values) | ||
if line.order_id.state == "purchase": | ||
line.order_id._check_split_pickings() | ||
return line |
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.
def create(self, values): | |
line = super().create(values) | |
if line.order_id.state == "purchase": | |
line.order_id._check_split_pickings() | |
return line | |
@api.model_create_multi | |
def create(self, vals_list): | |
lines = super().create(vals_list) | |
lines.order_id.filtered(lambda l: l.state == "purchase")._check_split_pickings() | |
return lines |
This does not seem to be out of scope to me. Change 1: consider this scenario:
Change 2: scenario:
Please keep both in migrations of this module. |
hello @FernandoRomera is this PR close to be merged? |
merge? |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 6d6a02a. Thanks a lot for contributing to OCA. ❤️ |
No description provided.