X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Fpos_discount%2Fstatic%2Fsrc%2Fjs%2Fdiscount.js;fp=addons%2Fpos_discount%2Fstatic%2Fsrc%2Fjs%2Fdiscount.js;h=d68eb59f8bfdc48c10349ec12815da580dddfc80;hb=fcd06145dda957a83e687fd033ff294c407da5f4;hp=5eaab362d2093e06ef8c4f2dfee2ccb56e99533e;hpb=d9610efd979c974e540353716f8d0b9ecdb9d952;p=odoo%2Fodoo.git diff --git a/addons/pos_discount/static/src/js/discount.js b/addons/pos_discount/static/src/js/discount.js index 5eaab36..d68eb59 100644 --- a/addons/pos_discount/static/src/js/discount.js +++ b/addons/pos_discount/static/src/js/discount.js @@ -17,11 +17,11 @@ openerp.pos_discount = function(instance){ var discount = $(QWeb.render('DiscountButton')); discount.click(function(){ - var order = self.pos.get('selectedOrder'); + var order = self.pos.get_order(); var product = self.pos.db.get_product_by_id(self.pos.config.discount_product_id[0]); - var discount = - self.pos.config.discount_pc/ 100.0 * order.getTotalTaxIncluded(); + var discount = - self.pos.config.discount_pc/ 100.0 * order.get_total_tax_included(); if( discount < 0 ){ - order.addProduct(product, { price: discount }); + order.add_product(product, { price: discount }); } });