From c6456ce48eef52d721ecb9e1d59ad540325dcae3 Mon Sep 17 00:00:00 2001 From: Martronic SA Date: Thu, 24 Jan 2019 09:55:50 +0100 Subject: [PATCH] Update the commit with the appropriate fix --- pos_pricelist/static/src/js/models.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pos_pricelist/static/src/js/models.js b/pos_pricelist/static/src/js/models.js index fe70f215..619f8072 100644 --- a/pos_pricelist/static/src/js/models.js +++ b/pos_pricelist/static/src/js/models.js @@ -206,8 +206,11 @@ odoo.define("pos_pricelist.models", function (require) { models.Orderline.prototype.initialize = function (attr, options) { _Orderline_initialize.apply(this, arguments); if (options.product) { - var unit_price = this.order.pricelist ? this.product.get_price(this.order.pricelist,this.get_quantity()) : options.product.price; - this.set_unit_price(unit_price); + options.price || + this.product.get_price( + this.order.pricelist, + this.get_quantity() + ) } }; models.Orderline.prototype.init_from_JSON = function () {