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] website_sale_loyalty: Fix coupon deletion #161817

Conversation

mathysPaul
Copy link
Contributor

@mathysPaul mathysPaul commented Apr 15, 2024

Resolves a problem when removing a coupon from an order containing different tax applications.

If an order is composed of products with varying tax rates, the coupon applied generates separate lines for each unique tax situation. This includes non-taxed products, products with individual taxes, and combinations thereof.

The purpose of this commit is to fix the management of coupon deletion in cases where the coupon generates multiple lines for different tax scenarios. Adjusting the recovery process to select the first coupon line identifier, ensuring that the correct line is targeted for deletion in scenarios with multiple tax-related coupon lines.

Example:

  • Product A (non-taxed)
  • Product B (Tax A)
  • Product C (Tax B)
  • Product D (Tax A and B)

The coupon would generate four separate lines for non-taxed, Tax A, Tax B, and Tax A & B scenarios, respectively.

opw-3693319

@mathysPaul mathysPaul self-assigned this Apr 15, 2024
@robodoo
Copy link
Contributor

robodoo commented Apr 15, 2024

@mathysPaul mathysPaul requested a review from a team April 15, 2024 06:37
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 15, 2024
@Demesmaeker Demesmaeker marked this pull request as ready for review April 15, 2024 09:33
@Feyensv
Copy link
Contributor

Feyensv commented Apr 16, 2024

red runbot seems maybe related to the scope, can you take a look?

@mathysPaul mathysPaul force-pushed the 16.0-website_sale-error-remove-promo-from-cart-matp branch 4 times, most recently from 78c3f13 to 1d4a293 Compare April 18, 2024 06:47
Resolves a problem when removing a coupon from an order
containing different tax applications.

If an order is composed of products with varying tax rates, the
coupon applied generates separate lines for each unique tax
situation. This includes non-taxed products, products with individual
taxes, and combinations thereof.

The purpose of this commit is to fix the management of coupon
deletion in cases where the coupon generates multiple lines for
different tax scenarios. Adjusting the recovery process to select
the first coupon line identifier, ensuring that the correct line
is targeted for deletion in scenarios with multiple tax-related
coupon lines.

Example:
- Product A (non-taxed)
- Product B (Tax A)
- Product C (Tax B)
- Product D (Tax A and B)
The coupon would generate four separate lines for non-taxed, Tax A,
Tax B, and Tax A & B scenarios, respectively.

opw-3693319
@Feyensv Feyensv force-pushed the 16.0-website_sale-error-remove-promo-from-cart-matp branch from 1d4a293 to 77b2af3 Compare April 25, 2024 09:39
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.

little push to use the solution of #163052 which seemed even better ;).
Thanks for the test 👍

@robodoo r+

robodoo pushed a commit that referenced this pull request Apr 25, 2024
Resolves a problem when removing a coupon from an order
containing different tax applications.

If an order is composed of products with varying tax rates, the
coupon applied generates separate lines for each unique tax
situation. This includes non-taxed products, products with individual
taxes, and combinations thereof.

The purpose of this commit is to fix the management of coupon
deletion in cases where the coupon generates multiple lines for
different tax scenarios. Adjusting the recovery process to select
the first coupon line identifier, ensuring that the correct line
is targeted for deletion in scenarios with multiple tax-related
coupon lines.

Example:
- Product A (non-taxed)
- Product B (Tax A)
- Product C (Tax B)
- Product D (Tax A and B)
The coupon would generate four separate lines for non-taxed, Tax A,
Tax B, and Tax A & B scenarios, respectively.

opw-3693319

closes #161817

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
@robodoo robodoo closed this Apr 25, 2024
@fw-bot
Copy link
Contributor

fw-bot commented Apr 29, 2024

@mathysPaul @Feyensv this pull request has forward-port PRs awaiting action (not merged or closed):

MohammedBasioni pushed a commit to odoo-dev/odoo that referenced this pull request Apr 29, 2024
Resolves a problem when removing a coupon from an order
containing different tax applications.

If an order is composed of products with varying tax rates, the
coupon applied generates separate lines for each unique tax
situation. This includes non-taxed products, products with individual
taxes, and combinations thereof.

The purpose of this commit is to fix the management of coupon
deletion in cases where the coupon generates multiple lines for
different tax scenarios. Adjusting the recovery process to select
the first coupon line identifier, ensuring that the correct line
is targeted for deletion in scenarios with multiple tax-related
coupon lines.

Example:
- Product A (non-taxed)
- Product B (Tax A)
- Product C (Tax B)
- Product D (Tax A and B)
The coupon would generate four separate lines for non-taxed, Tax A,
Tax B, and Tax A & B scenarios, respectively.

opw-3693319

closes odoo#161817

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
@fw-bot
Copy link
Contributor

fw-bot commented Apr 30, 2024

@mathysPaul @Feyensv this pull request has forward-port PRs awaiting action (not merged or closed):

2 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented May 1, 2024

@mathysPaul @Feyensv this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented May 2, 2024

@mathysPaul @Feyensv this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented May 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants