-
-
Notifications
You must be signed in to change notification settings - Fork 657
[16.0][MIG] pos customer required: Migration to 16.0 #1423
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
base: 16.0
Are you sure you want to change the base?
Conversation
Currently translated at 100.0% (14 of 14 strings) Translation: pos-12.0/pos-12.0-pos_customer_required Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_customer_required/ca/
Currently translated at 100.0% (12 of 12 strings) Translation: pos-12.0/pos-12.0-pos_customer_required Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_customer_required/es/
Currently translated at 100.0% (15 of 15 strings) Translation: pos-14.0/pos-14.0-pos_customer_required Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_customer_required/it/
4500b10
to
40ea630
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.
nice conversion to owl, @mihien! a few remarks, but mostly lgtm.
if i understand correctly, you added the improvement of preventing the user to close or confirm the partner selection screen if no partner has been selected, right? nice addition! does it also work from the payment screen when require_customer
is set to payment
(or should it not work at that point)?
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.
as the setting is now available from the general configuration, is it still needed here?
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.
Good question, it's probably not but I'll ask an analyst what he thinks
pos_customer_required/static/src/xml/Screens/PartnerListScreen/PartnerListScreen.xml
Show resolved
Hide resolved
pos_customer_required/static/src/js/Screens/ProductScreen/ProductScreen.esm.js
Outdated
Show resolved
Hide resolved
pos_customer_required/static/src/js/Screens/PartnerListScreen/PartnerListScreen.esm.js
Outdated
Show resolved
Hide resolved
|
||
const PosCustomerRequiredPartnerListScreen = (OriginalPartnerListScreen) => | ||
class extends OriginalPartnerListScreen { | ||
clickPartner(partner) { |
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.
a comment would help to understand why this is needed. i looked at the original function and if i understand it correctly, the goal is to prevent to call confirm()
if the partner is unselected, right? would it work by overriding confirm()
instead to avoid re-implementing the logic?
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.
Both your assumptions are correct, I've moved the change to confirm()
(and added a comment)
if( this.env.pos.config.require_customer === "order" ) { | ||
if (this.state.selectedPartner && this.state.selectedPartner.id === partner.id) { | ||
this.state.selectedPartner = null; | ||
this.render(true); |
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 should not be needed, should it?
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.render(true);
was needed to reload the screen to show the user had been unselected. But now that the logic is moved to confirm() this.state.selectedPartner = null;
will be handled in clickPartner already, so I've removed it.
pos_customer_required/static/src/js/Screens/PaymentScreen/PaymentScreen.esm.js
Outdated
Show resolved
Hide resolved
40ea630
to
bf006cf
Compare
No description provided.