Skip to content
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

[FIX] sale_product_pack: _get_update_prices_lines refactor #192

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

jue-adhoc
Copy link

@jue-adhoc jue-adhoc commented Nov 27, 2024

This PR was created because we found and issue when changing the pricelist on packs that have been modified. When an user modifies some of the components of the pack, the index calculated on the _get_update_prices_lines remains with a previous value and the price is not updated correctly (the last line on the pack is not updated).
We based our refactor on this PR made a few weeks ago on version 17 which resolves another issues apart from this one and it is already reviewed and merged.

Steps to reproduce the error:

  • Add a pack "detailled" to a sale order
  • Add one extra product (which is not a pack)
  • Edit the pack adding a new component to pack line
  • On the previous sale order, change the pricelist (be sure that on the new pricelist all items should change the price. Set for example a discount to all products)
    Result: the pack should change the price of every component, but the last order line will not be updated due to a difference in the index inside the while loop (it would not take into account the last item).

@OCA-git-bot
Copy link
Contributor

Hi @ernestotejeda,
some modules you are maintaining are being modified, check this out!

@augusto-weiss
Copy link

Please @jue-adhoc add steps to reproduce the error!

@jue-adhoc
Copy link
Author

Please @jue-adhoc add steps to reproduce the error!

steps added! thanks @augusto-weiss

@augusto-weiss
Copy link

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants