diff --git a/pos_pricelist/static/src/js/models.js b/pos_pricelist/static/src/js/models.js index bf87dae9..e5715dd1 100644 --- a/pos_pricelist/static/src/js/models.js +++ b/pos_pricelist/static/src/js/models.js @@ -113,7 +113,7 @@ function pos_pricelist_models(instance, module) { var qty = this.compute_qty(options.order, options.product); var partner = options.order.get_client(); var product = options.product; - var db = self.posmodel.db; + var db = this.pos.db; var price = this.compute_price_all(db, product, partner, qty); if (price !== false && price !== 0.0) { this.price = price; diff --git a/pos_pricelist/static/src/js/screens.js b/pos_pricelist/static/src/js/screens.js index b2d674ec..830d9fcf 100644 --- a/pos_pricelist/static/src/js/screens.js +++ b/pos_pricelist/static/src/js/screens.js @@ -27,7 +27,7 @@ function pos_pricelist_screens(instance, module) { var line = orderLines[i]; var partner = currentOrder.get_client(); var product = line.product; - var db = self.posmodel.db; + var db = this.pos.db; var quantity = line.quantity; var price = line.compute_price_all(db, product, partner, quantity); if (price !== false && price !== 0.0) {