diff --git a/pos_tare/__manifest__.py b/pos_tare/__manifest__.py index 0f374eeb..6c6d86bf 100644 --- a/pos_tare/__manifest__.py +++ b/pos_tare/__manifest__.py @@ -10,10 +10,11 @@ "author": "GRAP, " "Odoo Community Association (OCA)", "maintainers": ["legalsylvain"], - "website": "https://www.github.com/pos", + "website": "https://www.github.com/OCA/pos", "license": "AGPL-3", "depends": ["point_of_sale"], "data": ["views/assets.xml"], "qweb": ["static/src/xml/pos_tare.xml"], "installable": True, + "images": ["static/description/pos_tare.png"], } diff --git a/pos_tare/static/src/css/pos_tare.css b/pos_tare/static/src/css/pos_tare.css index 0c72e7ed..ff7af4bd 100644 --- a/pos_tare/static/src/css/pos_tare.css +++ b/pos_tare/static/src/css/pos_tare.css @@ -21,19 +21,19 @@ margin-bottom: 0px; } -.pos .scale-screen .weight-value-gross-weight { +.pos .scale-screen .weight-value-fixed { border-radius: 3px; box-shadow: 0px 2px 0px rgb(225,225,225) inset; text-align: right; background: white; } -.pos .scale-screen .weight-value-tare { +.pos .scale-screen .weight-value-alterable { text-align: left; padding-bottom: 0px; padding-left: 0px; } -.pos .scale-screen .input-weight-tare { +.pos .scale-screen .input-weight { border: 1px solid #cecbcb; border-radius: 20px; padding: 15px 20px; @@ -43,7 +43,7 @@ font-size: 25px; } -.pos .scale-screen .input-weight-tare:focus { +.pos .scale-screen .input-weight:focus { outline: none; box-shadow: 0px 0px 0px 3px #6EC89B; } diff --git a/pos_tare/static/src/js/screens.js b/pos_tare/static/src/js/screens.js index 849a6df3..cea0dc90 100644 --- a/pos_tare/static/src/js/screens.js +++ b/pos_tare/static/src/js/screens.js @@ -24,9 +24,8 @@ odoo.define('pos_tare.screens', function (require) { show: function(){ this._super(); this.tare = 0.0; - this.correct_value = true; var self = this; - this.$('#weight_tare').keyup(function(event){ + this.$('#input_weight_tare').keyup(function(event){ self.onchange_tare(event); }); }, @@ -38,7 +37,7 @@ odoo.define('pos_tare.screens', function (require) { set_weight: function(gross_weight){ this.gross_weight = gross_weight; var net_weight = gross_weight - (this.tare || 0); - this.$('.weight-value-gross-weight').text(this.get_product_gross_weight_string()); + this.$('#container_weight_gross').text(this.get_product_gross_weight_string()); this._super(net_weight); }, @@ -76,7 +75,7 @@ odoo.define('pos_tare.screens', function (require) { }, onchange_tare: function(event){ - this.tare = this.check_sanitize_value('#weight_tare');; + this.tare = this.check_sanitize_value('#input_weight_tare');; this.set_weight(this.gross_weight); }, @@ -88,7 +87,7 @@ odoo.define('pos_tare.screens', function (require) { } else{ this.$(input_name).css("background-color", "#FFF"); - return res; + return parseFloat(res, 10); } }, diff --git a/pos_tare/static/src/xml/pos_tare.xml b/pos_tare/static/src/xml/pos_tare.xml index e370d1cd..14d2e74d 100644 --- a/pos_tare/static/src/xml/pos_tare.xml +++ b/pos_tare/static/src/xml/pos_tare.xml @@ -11,12 +11,12 @@ Copyright (C) 2015-Today GRAP (http://www.grap.coop)
Gross Weight
-
+
Tare
-
- Kg +
+ Kg