diff --git a/pos_tare/readme/ROADMAP.rst b/pos_tare/readme/ROADMAP.rst deleted file mode 100644 index 4e2021e0..00000000 --- a/pos_tare/readme/ROADMAP.rst +++ /dev/null @@ -1 +0,0 @@ -- Print tare value on customer receipt. diff --git a/pos_tare/static/description/pos_ticket.png b/pos_tare/static/description/pos_ticket.png new file mode 100644 index 00000000..bf753d40 Binary files /dev/null and b/pos_tare/static/description/pos_ticket.png differ diff --git a/pos_tare/static/src/js/models.js b/pos_tare/static/src/js/models.js index 2c73c792..1a839967 100644 --- a/pos_tare/static/src/js/models.js +++ b/pos_tare/static/src/js/models.js @@ -97,6 +97,16 @@ odoo.define('pos_tare.models', function (require) { return tare_str + ' ' + unit.name; }, + get_gross_weight_str_with_unit: function () { + var unit = this.get_unit(); + var gross_weight_str = pos_tare_tools.format_tare( + this.pos, + this.get_tare() + this.get_quantity(), + this.get_unit(), + ); + return gross_weight_str + ' ' + unit.name; + }, + }); models.Orderline = OrderLineWithTare; diff --git a/pos_tare/static/src/js/screens.js b/pos_tare/static/src/js/screens.js index 38ba1321..e948c14b 100644 --- a/pos_tare/static/src/js/screens.js +++ b/pos_tare/static/src/js/screens.js @@ -42,11 +42,10 @@ odoo.define('pos_tare.screens', function (require) { // Overload Section // ///////////////////////////// - // Overload show function - // add an handler on the show: function () { - this._super(); this.tare = 0.0; + this.gross_weight = 0.0; + this._super(); var self = this; this.$('#input_weight_tare').keyup(function (event) { self.onchange_tare(event); diff --git a/pos_tare/static/src/xml/pos_tare.xml b/pos_tare/static/src/xml/pos_tare.xml index af3edb28..49436af9 100644 --- a/pos_tare/static/src/xml/pos_tare.xml +++ b/pos_tare/static/src/xml/pos_tare.xml @@ -40,4 +40,20 @@ + + + +
+ Gross Weight :
+ Tare :
+
+
+
+
+ + + +