diff --git a/beesdoo_product/__manifest__.py b/beesdoo_product/__manifest__.py index f5ac0db..9af117a 100644 --- a/beesdoo_product/__manifest__.py +++ b/beesdoo_product/__manifest__.py @@ -27,6 +27,7 @@ 'data/barcode_rule.xml', 'data/product_sequence.xml', 'views/beesdoo_product.xml', + 'views/assets.xml', 'wizard/views/label_printing_utils.xml', 'security/ir.model.access.csv', ], diff --git a/beesdoo_product/static/src/js/models.js b/beesdoo_product/static/src/js/models.js new file mode 100644 index 0000000..d404f58 --- /dev/null +++ b/beesdoo_product/static/src/js/models.js @@ -0,0 +1,22 @@ +odoo.define('beesdoo_product.models', function (require) { + "use strict"; + + var models = require('point_of_sale.models'); + + var _super_PosModel = models.PosModel.prototype; + + models.PosModel = models.PosModel.extend({ + + initialize: function (session, attributes) { + + var product_model = _.find(this.models, function(model){ + return model.model === 'product.product'; + }); + product_model.fields.push('total_with_vat'); + + // Inheritance + return _super_PosModel.initialize.call(this, session, attributes); + }, + + }); +}); diff --git a/beesdoo_product/views/assets.xml b/beesdoo_product/views/assets.xml new file mode 100644 index 0000000..f729e78 --- /dev/null +++ b/beesdoo_product/views/assets.xml @@ -0,0 +1,8 @@ + + +