-
-
Notifications
You must be signed in to change notification settings - Fork 354
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][FIX] delivery_auto_refresh #849
base: 14.0
Are you sure you want to change the base?
Conversation
Hi @aleuffre, @PicchiSeba, @renda-dev, |
dc63c8f
to
f73c08e
Compare
Steps to reproduce: - Create a delivery method (delivery.carrier) with a fixed rate. - Enable the system parameter "delivery_auto_refresh.refresh_after_picking". - Create a sales order with such delivery method and storable products. - Confirm the sales order. - Validate the picking. Result: It can't be validated with the message "There is no matching delivery rule.". Explanation: Previous code computes the shipping values and call directly to `_get_price_from_picking`, which uses rules and doesn't take into account the rest of possibilities (integration or fixed price). We keep such computation for carriers based on rules, as they are not properly updated, but added the possibility of writing back the price for other carriers with fixed price or integrations, using the `carrier_price` field that contains it. TT43533
Don't modify standard method docstring
Limit change of write to calling the auto refresh feature Prevent to call auto refresh multiple times Don't pass discount variable in context
Create or delete line only if necessary Update existing line if necessary
This commit can be reverted in the migration to 17.0
Move config to company level Prefix config settings by sale
4f5855f
to
f59bc69
Compare
@jbaudoux would you mind reviewing this backporting? thanks! |
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:
That's a lot of work. Kudos. The changes to adapt to 14.0
look fine 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.
LGTM
cc @pedrobaeza |
This PR has the |
f59bc69
to
e6214da
Compare
@pedrobaeza |
Or rather, which commits to squash together |
I would say commits should remain as it is. They reflect development flow and are the same on the other main branch (even if they should have been a little bit enhanced in their messages). |
No, they don't add value when merged. The commit "delivery_auto_refresh: fix create in batch" is not adding value to have it separated. The code itself speaks by itself. And they are not following commit message guidelines: |
@pedrobaeza can you please tell us in detail which ones should be squashed in your opinion, so we can proceed? |
@pedrobaeza I would say you had merged it yousrself like this : #799 (review) |
IMO, you can pack together improvements which code speaks by itself, summarizing in the commit message all of them. At the end, what we want when we do a blame, is to identify the reason of the change. But if there are several commits touching the same lines of code, at the end, the blame operation is a hell. The same way, a commit that is not telling the reason behind, doesn't have value too much value. Take this commit: With the commit message I know that it seems comfortable to do continuously For reference, what I do to save the work is usually |
Yes, as said in other thread, I don't fight all the possible battles. I have to resign in some of them. In this case, it was my fault to block the PR a lot of time and I already asked for a lot of changes, so I didn't want to be even more picky about that. In this case, it's also not the most important thing, as this is an old branch, but the number of commits have increased (from 11 to 16), and it can be an opportunity to converge in commit strategies. |
@pedrobaeza in the case of commit |
Good that you have arisen this, as I wasn't really aware (didn't check this PR in content yet). Starting with, you can't do that, as this module is AGPL, and the original code is LGPL. More in the formal aspect, you are putting that method, but not indicating anything in the commit message saying that this is copied from Odoo code, and not putting in the same commit the changes on the README About the code itself, I don't think the prepare method is bringing too much value, and even if so, you can just put it without that attribution concern, as at the end, it's not a specific secret technique to do the code, and the lines are obvious even and will be the same if you do it by hand, and for sure you need later adjustments for version 14. |
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: Remove all references of the 17.0
migration. This should not be a concern to us because this is a backport and this matter should be resolved upstream
delivery_auto_refresh/tests/test_sale_order_carrier_auto_assign.py
Outdated
Show resolved
Hide resolved
317f776
to
2ac73e8
Compare
2ac73e8
to
ba54be3
Compare
57c63ff
to
408a0c0
Compare
@pedrobaeza I'd appreciate any advice or suggestions on how to handle this more efficiently, or if there's a better approach to resolve this circular dependency. I'm currently facing a circular dependency issue between two PRs: #849: delivery_auto_refresh The issue arises because To resolve this, my idea is to:
Does this approach make sense, or would you recommend a different solution? I’d appreciate your input! |
Yes, remove here the temporary dependency, as I don't see too much sense in adding it while the target module is not being used here. |
Thanks for the suggestion! I'll go ahead and remove the temporary dependency. |
408a0c0
to
ba54be3
Compare
backport of #799