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_loyalty_delivery: fix reward for multiple delivery lines #159584

Closed

Conversation

vava-odoo
Copy link
Contributor

@vava-odoo vava-odoo commented Mar 27, 2024

The method _get_reward_values_free_shipping assumes there is only one delivery line per sale order. But it is not always the case. This commit therefore makes sure the method does not raise an error in case of multiple lines by taking into account only the first delivery line.

Fixes #136395

@vava-odoo vava-odoo requested a review from Feyensv March 27, 2024 20:53
@robodoo
Copy link
Contributor

robodoo commented Mar 27, 2024

@C3POdoo C3POdoo added the RD research & development, internal work label Mar 27, 2024
@vava-odoo vava-odoo changed the base branch from 15.0 to 17.0 March 28, 2024 07:42
@vava-odoo vava-odoo force-pushed the 15.0-fix-several-delivery-lines-vava branch from a99b742 to 3a612a5 Compare March 28, 2024 07:42
@vava-odoo vava-odoo changed the title [FIX] sale_coupon_delivery: fix coupon in case of multiple delivery l… [FIX] sale_loyalty_delivery: fix reward for multiple delivery lines Mar 28, 2024
@vava-odoo vava-odoo force-pushed the 15.0-fix-several-delivery-lines-vava branch from 3a612a5 to 68c3ebb Compare March 28, 2024 08:42
The method `_get_reward_values_free_shipping` assumes there is only one
delivery line per sale order. But it is not always the case. This commit
therefore makes sure the method does not raise an error in case of
multiple lines by taking into account only the first delivery line.

Fixes odoo#136395
@vava-odoo vava-odoo force-pushed the 15.0-fix-several-delivery-lines-vava branch from 68c3ebb to e41b5c2 Compare March 28, 2024 15:28
@vava-odoo vava-odoo marked this pull request as ready for review March 28, 2024 15:29
Copy link
Contributor

@Feyensv Feyensv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robodoo delegate+

@vava-odoo
Copy link
Contributor Author

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Mar 28, 2024

@vava-odoo you may want to rebuild or fix this PR as it has failed CI.

@vava-odoo vava-odoo marked this pull request as draft March 28, 2024 15:49
@vava-odoo vava-odoo marked this pull request as ready for review March 28, 2024 15:49
@C3POdoo C3POdoo requested a review from a team March 28, 2024 16:13
@Feyensv Feyensv removed the request for review from a team March 28, 2024 16:36
@robodoo robodoo closed this in 2ce67da Mar 28, 2024
@fw-bot fw-bot deleted the 15.0-fix-several-delivery-lines-vava branch April 11, 2024 20:47
willylohws pushed a commit to willylohws/odoo that referenced this pull request May 1, 2024
The method `_get_reward_values_free_shipping` assumes there is only one
delivery line per sale order. But it is not always the case. This commit
therefore makes sure the method does not raise an error in case of
multiple lines by taking into account only the first delivery line.

Fixes odoo#136395

closes odoo#159584

Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[15.0][16.0] _get_reward_values_free_shipping() expects only one delivery line
4 participants