Skip to content

Commit

Permalink
[FIX] l10n_es_pos: validation
Browse files Browse the repository at this point in the history
Change made in 1baf50b avoids showing customer popup on orders above
limit (invoiced). Moving back logic to `validateOrder` fixes this
problem.
  • Loading branch information
danielduqma committed Apr 10, 2023
1 parent 9270da5 commit 8b6615c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions l10n_es_pos/static/src/js/PaymentScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ odoo.define("l10n_es_pos.PaymentScreen", function (require) {
// eslint-disable-next-line no-shadow
const L10nEsPosPaymentScreen = (PaymentScreen) =>
class extends PaymentScreen {
async _finalizeValidation() {
async validateOrder(isForceValidate) {
const below_limit =
this.currentOrder.get_total_with_tax() <=
this.env.pos.config.l10n_es_simplified_invoice_limit;
Expand All @@ -26,7 +26,7 @@ odoo.define("l10n_es_pos.PaymentScreen", function (require) {
order.to_invoice = true;
}
}
super._finalizeValidation();
super.validateOrder(isForceValidate);
}
};

Expand Down

0 comments on commit 8b6615c

Please sign in to comment.