diff --git a/pos_multi_variant/__manifest__.py b/pos_multi_variant/__manifest__.py index c5a25b313..3d1259bb6 100644 --- a/pos_multi_variant/__manifest__.py +++ b/pos_multi_variant/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': "POS Product Multi variant", - 'version': '15.0.1.0.1', + 'version': '15.0.1.0.2', 'summary': """Product with multi-variants""", 'description': """Configure products having variants in POS""", 'author': 'Cybrosys Techno Solutions', diff --git a/pos_multi_variant/doc/RELEASE_NOTES.md b/pos_multi_variant/doc/RELEASE_NOTES.md index f9f551f05..4a66bb124 100755 --- a/pos_multi_variant/doc/RELEASE_NOTES.md +++ b/pos_multi_variant/doc/RELEASE_NOTES.md @@ -5,3 +5,8 @@ ##### ADD - Initial commit for pos_multi_variant + +#### 18.02.2023 +#### Version 15.0.1.0.2 +##### FIX + - Bug fix \ No newline at end of file diff --git a/pos_multi_variant/models/pos_variants.py b/pos_multi_variant/models/pos_variants.py index 50aa1c897..b9cdc1d5c 100644 --- a/pos_multi_variant/models/pos_variants.py +++ b/pos_multi_variant/models/pos_variants.py @@ -37,7 +37,7 @@ class VariantsSelection(models.Model): variants_id = fields.Many2one('product.template') attribute = fields.Many2one('product.attribute', string='Attribute', ondelete='restrict', required=True, index=True) value = fields.Many2many('product.attribute.value', string='Values') - extra_price = fields.Char(string="Price Extra") + extra_price = fields.Float(string="Price Extra") pos_active = fields.Boolean(string="Active") diff --git a/pos_multi_variant/static/src/js/ProductScreen.js b/pos_multi_variant/static/src/js/ProductScreen.js index 5d8ad1ab4..7fa35df6a 100644 --- a/pos_multi_variant/static/src/js/ProductScreen.js +++ b/pos_multi_variant/static/src/js/ProductScreen.js @@ -1,6 +1,5 @@ odoo.define('pos_multi_variant.ProductScreen', function(require) { 'use strict'; - var ProductScreen = require('point_of_sale.ProductScreen'); const Registries = require('point_of_sale.Registries'); const NumberBuffer = require('point_of_sale.NumberBuffer'); @@ -34,9 +33,11 @@ odoo.define('pos_multi_variant.ProductScreen', function(require) { } async _clickProduct(event) { + await super._clickProduct(...arguments) if (!this.currentOrder) { this.env.pos.add_new_order(); } + const product = event.detail; var variant_product = '' await rpc.query({ @@ -70,8 +71,6 @@ odoo.define('pos_multi_variant.ProductScreen', function(require) { // Do not add product if options is undefined. if (!options) return; - // Add the product after having the extra information. - this.currentOrder.add_product(product, options); NumberBuffer.reset(); if(product.pos_variants) this.showPopup('ProductsPopup',{ diff --git a/pos_multi_variant/static/src/js/models.js b/pos_multi_variant/static/src/js/models.js index 9858e95ab..ee2f2f23a 100644 --- a/pos_multi_variant/static/src/js/models.js +++ b/pos_multi_variant/static/src/js/models.js @@ -25,7 +25,6 @@ odoo.define('pos_multi_variant.model', function(require) { export_for_printing: function() { var line = _super_orderline.export_for_printing.apply(this,arguments); line.product_variants = this.product_variants; - console.log(line, "line") return line; }, });