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

[16.0][IMP] pos_order_remove_line: set orderline to quantity before delete #1262

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

LuisAlejandroS
Copy link

@LuisAlejandroS LuisAlejandroS commented Nov 12, 2024

Description:

In some cases, like order lines with down payments added by pos_sale, it’s necessary to force the numpad mode to "quantity" for the trash can action button to work. This PR ensures the correct mode is set before triggering deletion, ensuring that it completes correctly.

Cases covered with this improvement:

  • Order lines, including down payments added with pos_sale, are now properly deleted without errors.
  • Ensures compatibility with other modules that require specific modes when deleting order lines.

Reproduction Steps (in runboat):

  1. Create an order in Sales > Orders > Quotation.
  2. Open the order from the list in the POS.
  3. Apply a down payment.
  4. Attempt to delete the line with the trash button: it now deletes as expected.

Solution:

To resolve this issue, we modified the removeLine method in the PosOrderline class to switch to "quantity mode" (this.env.pos.numpadMode = "quantity") before initiating the delete action. This adjustment sets the correct mode, allowing the order line to be deleted without conflicts, even if it's a down payment.

FL-556-4557

@OCA-git-bot
Copy link
Contributor

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

@LuisAlejandroS LuisAlejandroS changed the title [IMP] pos_remove_order_line: set orderline to quantity before delete [16.0][IMP] pos_remove_order_line: set orderline to quantity before delete Nov 12, 2024
@LuisAlejandroS LuisAlejandroS changed the title [16.0][IMP] pos_remove_order_line: set orderline to quantity before delete [16.0][IMP] pos_order_remove_line: set orderline to quantity before delete Nov 12, 2024
Ensure the order line is switched to quantity mode before activating delete to prevent errors.
Copy link

@Pablocce Pablocce left a comment

Choose a reason for hiding this comment

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

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