From 5548b2ff7abdf808c81f963d691cc8d6ec58e0fc Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 23 Nov 2017 14:59:36 +0100 Subject: [PATCH] [FIX] pos_discount: missing translation opw-783101 --- addons/pos_discount/i18n/pos_discount.pot | 3 +++ addons/pos_discount/static/src/js/discount.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/pos_discount/i18n/pos_discount.pot b/addons/pos_discount/i18n/pos_discount.pot index a09701bbbcd..bf6956ca4ef 100644 --- a/addons/pos_discount/i18n/pos_discount.pot +++ b/addons/pos_discount/i18n/pos_discount.pot @@ -28,7 +28,10 @@ msgid "Discount" msgstr "" #. module: pos_discount +#. openerp-web +#: code:addons/pos_discount/static/src/js/discount.js:14 #: model:ir.model.fields,field_description:pos_discount.field_pos_config_discount_pc +#, python-format msgid "Discount Percentage" msgstr "" diff --git a/addons/pos_discount/static/src/js/discount.js b/addons/pos_discount/static/src/js/discount.js index 497573f5107..7ef38d6ffdb 100644 --- a/addons/pos_discount/static/src/js/discount.js +++ b/addons/pos_discount/static/src/js/discount.js @@ -1,14 +1,17 @@ odoo.define('pos_discount.pos_discount', function (require) { "use strict"; +var core = require('web.core'); var screens = require('point_of_sale.screens'); +var _t = core._t; + var DiscountButton = screens.ActionButtonWidget.extend({ template: 'DiscountButton', button_click: function(){ var self = this; this.gui.show_popup('number',{ - 'title': 'Discount Percentage', + 'title': _t('Discount Percentage'), 'value': this.pos.config.discount_pc, 'confirm': function(val) { val = Math.round(Math.max(0,Math.min(100,val)));