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] point_of_sale: restrict refund button until qty selected on ticket screen #165180
[FIX] point_of_sale: restrict refund button until qty selected on ticket screen #165180
Conversation
c5c4c8d
to
f3b720d
Compare
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.
This is not a bad change but can you we have a method getHasItemsToRefund
in the ticket_screen
. Maybe a good change would be to use it at the start of the method. If this returns false, you just return without doing anything. This in addition with not putting the class bg-primary
if the isActionButtonHighlighted
props on the action_pad
is false would lead to the user knowing if he can or not click on the refund button. What do you think ?
Hello @adgu-odoo , yes i agree with your suggestion , we can use Also for |
Yeah that seems to be a good change. I do not understand why we cannot disable the button. However, if this button cannot be disabled, we should remove the |
Hello @adgu-odoo , we can make the button from |
f3b720d
to
4403691
Compare
Hello @adgu-odoo |
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.
I like what you did, can you just address my comment and it should be good to r+
@@ -12,7 +12,8 @@ | |||
partner="partner" | |||
actionName="constructor.numpadActionName" | |||
actionType="'payment'" | |||
onClickMore.bind="displayAllControlPopup" /> | |||
onClickMore.bind="displayAllControlPopup" | |||
isActionButtonHighlighted="items"/> |
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.
Putting items there is not the best. Try with refunding a product: when clicking on refund, an order will be created with an orderline of quantity -1. If you click on a product, it will add a line with quantity 1 and the items getter will return 0 so the button will not be highlighted but it should be.
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.
Thank you for bringing to my attention that I missed this particular case.
…ket screen Before this commit: =================== When clicking the refund button without selecting the quantity for the selected order lines, the ticket screen would redirect to the product screen, resulting in empty order lines. After this commit: The refund button will not redirect the ticket screen to the product screen until a quantity is selected for the selected order line. Task ID: 3922007
4403691
to
07f4e7e
Compare
@robodoo r+ |
…ket screen Before this commit: =================== When clicking the refund button without selecting the quantity for the selected order lines, the ticket screen would redirect to the product screen, resulting in empty order lines. After this commit: The refund button will not redirect the ticket screen to the product screen until a quantity is selected for the selected order line. Task ID: 3922007 closes #165180 Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
@jipr-odoo @adgu-odoo this pull request has forward-port PRs awaiting action (not merged or closed): |
@jipr-odoo @adgu-odoo this pull request has forward-port PRs awaiting action (not merged or closed): |
Before this commit:
When clicking the refund button without selecting the quantity for the selected
order lines, the ticket screen would redirect to the product screen, resulting
in empty order lines.
After this commit:
The refund button will not redirect the ticket screen to the product screen
until a quantity is selected for the selected order line.
Task ID: 3922007