diff --git a/pos_product_catch_weight/__manifest__.py b/pos_product_catch_weight/__manifest__.py index eabc6362..1ff2846b 100755 --- a/pos_product_catch_weight/__manifest__.py +++ b/pos_product_catch_weight/__manifest__.py @@ -18,6 +18,7 @@ ], 'data': [ 'templates/assets.xml', + 'views/pos_views.xml', ], 'qweb': [ 'static/src/xml/pos.xml' diff --git a/pos_product_catch_weight/static/src/js/models.js b/pos_product_catch_weight/static/src/js/models.js index b699273a..970e5ff2 100755 --- a/pos_product_catch_weight/static/src/js/models.js +++ b/pos_product_catch_weight/static/src/js/models.js @@ -128,11 +128,21 @@ odoo.define("pos_product_catch_weight.models", function (require) { }, set_lot_name: function(name){ - this.set({ + /* + If you want to allow selling unknown lots: + { lot_name : _.str.trim(name) || null, lot_catch_weight_ratio : 1.0, lot_catch_weight : 1.0, lot_catch_weight_uom_id : null, + } + */ + + this.set({ + lot_name : _.str.trim(name) || null, + lot_catch_weight_ratio : 9999.0, + lot_catch_weight : 9999.0, + lot_catch_weight_uom_id : [0, 'INVALID'], }); }, }) diff --git a/pos_product_catch_weight/static/src/xml/pos.xml b/pos_product_catch_weight/static/src/xml/pos.xml index 86c76ea6..ffbea4f5 100755 --- a/pos_product_catch_weight/static/src/xml/pos.xml +++ b/pos_product_catch_weight/static/src/xml/pos.xml @@ -37,4 +37,19 @@ + + +
+ + + -- + + @ + + +
+
+
+
+ diff --git a/pos_product_catch_weight/views/pos_views.xml b/pos_product_catch_weight/views/pos_views.xml new file mode 100644 index 00000000..c4f5f94e --- /dev/null +++ b/pos_product_catch_weight/views/pos_views.xml @@ -0,0 +1,38 @@ + + + + pos.order.line.form.inherit + pos.order.line + + + + + + + + + + + + + + + + + pos.order.form.inherit + pos.order + + + + + + + + + + + + + + + \ No newline at end of file