diff --git a/product_multi_uom_pos/README.rst b/product_multi_uom_pos/README.rst new file mode 100644 index 000000000..d049ab259 --- /dev/null +++ b/product_multi_uom_pos/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Product Multiple UOM +======================== +Using this app, you can change unit of measure of product in POS order. + +Installation +============ + - www.odoo.com/documentation/17.0/setup/install.html + - Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE v3.0 (AGPL-3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer:(V16) Arwa V V, + (V17) Gayathri V +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website: https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/product_multi_uom_pos/__init__.py b/product_multi_uom_pos/__init__.py new file mode 100644 index 000000000..6ee5692fc --- /dev/null +++ b/product_multi_uom_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/product_multi_uom_pos/__manifest__.py b/product_multi_uom_pos/__manifest__.py new file mode 100644 index 000000000..298ba4b46 --- /dev/null +++ b/product_multi_uom_pos/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "POS Product Multiple UOM", + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """A module to manage multiple UoM in POS""", + 'description': """Using this app, you can change unit of measure of + product in POS order.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'point_of_sale'], + 'data': + [ + 'security/ir.model.access.csv', + 'views/res_config_settings_views.xml', + 'views/product_template_views.xml', + 'views/pos_order_views.xml', + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'product_multi_uom_pos/static/src/**/*', + ], + }, + 'images': [ + 'static/description/banner.jpg', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_multi_uom_pos/doc/RELEASE_NOTES.md b/product_multi_uom_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c06f9bbfc --- /dev/null +++ b/product_multi_uom_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 08.01.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for POS Product Multiple UOM diff --git a/product_multi_uom_pos/models/__init__.py b/product_multi_uom_pos/models/__init__.py new file mode 100644 index 000000000..136d0fb70 --- /dev/null +++ b/product_multi_uom_pos/models/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_session +from . import product_template +from . import pos_order_line +from . import stock_picking +from . import pos_config +from . import res_config_settings +from . import pos_multi_uom diff --git a/product_multi_uom_pos/models/pos_config.py b/product_multi_uom_pos/models/pos_config.py new file mode 100644 index 000000000..b0943c8bc --- /dev/null +++ b/product_multi_uom_pos/models/pos_config.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class PosConfig(models.Model): + """Inherits 'pos.config' and adds new field""" + _inherit = "pos.config" + + pos_multi_uom = fields.Boolean(string="Multi UoM", + help="Enable the option change UoM of" + " products in POS") diff --git a/product_multi_uom_pos/models/pos_multi_uom.py b/product_multi_uom_pos/models/pos_multi_uom.py new file mode 100644 index 000000000..c2b1b42df --- /dev/null +++ b/product_multi_uom_pos/models/pos_multi_uom.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class PosMultiUom(models.Model): + """ + Model for managing Point of Sale (POS) Multi Unit of Measure (UoM). + This model represents the association between a product template and its + multiple unit of measure options for the Point of Sale module. + """ + _name = 'pos.multi.uom' + _description = 'POS Multi UoM' + + product_template_id = fields.Many2one('product.template', + string='Product Template', + help='Inverse field of one2many' + 'field POS Multiple UoM in' + 'product.template') + category_id = fields.Many2one( + related='product_template_id.uom_id.category_id', + string='UoM Category', help='Category of unit of measure') + uom_id = fields.Many2one('uom.uom', string='Unit Of Measure', + domain="[('category_id', '=', category_id)]", + help="Choose a UoM") + price = fields.Float(string='Sale Price', help="Set a price for selected " + "UoM") diff --git a/product_multi_uom_pos/models/pos_order_line.py b/product_multi_uom_pos/models/pos_order_line.py new file mode 100644 index 000000000..2e4a74e2c --- /dev/null +++ b/product_multi_uom_pos/models/pos_order_line.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class PosOrderLine(models.Model): + """Inherits model 'pos.order.line' and updates UoM""" + _inherit = 'pos.order.line' + + product_uom_id = fields.Many2one('uom.uom', string='Product UoM', + related='uom_id', + help='Unit of measure of product') + uom_id = fields.Many2one('uom.uom', string='Product UoM', + help='Unit of measure of product added in POS ' + 'order line') + + @api.model + def create(self, values): + """Updates UoM in POS order lines""" + if values.get('product_uom_id'): + values['uom_id'] = int(values['product_uom_id']) + return super().create(values) diff --git a/product_multi_uom_pos/models/pos_session.py b/product_multi_uom_pos/models/pos_session.py new file mode 100644 index 000000000..809a3e059 --- /dev/null +++ b/product_multi_uom_pos/models/pos_session.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V(Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class PosSession(models.Model): + """Inherits model 'pos.session' and loads fields and models""" + _inherit = 'pos.session' + + def _loader_params_product_product(self): + """Loading field 'pos_multi_uom_ids' to POS""" + result = super()._loader_params_product_product() + result['search_params']['fields'].append('pos_multi_uom_ids') + return result + + def _pos_ui_models_to_load(self): + """Loading model 'pos.multi.uom' to POS""" + result = super()._pos_ui_models_to_load() + result.append('pos.multi.uom') + return result + + def _loader_params_pos_multi_uom(self): + """Loading fields of model 'pos.multi.uom' to POS""" + return { + 'search_params': { + 'fields': ['uom_id', 'price', 'product_template_id']} + } + + def _get_pos_ui_pos_multi_uom(self, params): + """Loading new model to POS""" + return self.env['pos.multi.uom'].search_read(**params['search_params']) diff --git a/product_multi_uom_pos/models/product_template.py b/product_multi_uom_pos/models/product_template.py new file mode 100644 index 000000000..c46465dad --- /dev/null +++ b/product_multi_uom_pos/models/product_template.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """Inherits model 'product.template' and adds field to set multiple units + of measure""" + _inherit = 'product.template' + + multi_uom = fields.Boolean(compute='_compute_multi_uom', string='Multi UoM', + help='A boolean field to show the one2many field' + 'POS Multiple UoM if the Multi UoM option' + ' is enabled in Configuration settings') + pos_multi_uom_ids = fields.One2many('pos.multi.uom', 'product_template_id', + string="POS Multiple UoM", + help='These UoM can be selected from ' + 'PoS') + + def _compute_multi_uom(self): + """ + Updates the 'multi_uom' field based on the configuration parameter + 'product_multi_uom_pos.pos_multi_uom'. + """ + status = self.env['ir.config_parameter'].sudo().get_param( + 'product_multi_uom_pos.pos_multi_uom') + self.write({ + 'multi_uom': status + }) diff --git a/product_multi_uom_pos/models/res_config_settings.py b/product_multi_uom_pos/models/res_config_settings.py new file mode 100644 index 000000000..4f47647de --- /dev/null +++ b/product_multi_uom_pos/models/res_config_settings.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """Inherits 'res.config.settings' and adds new field """ + _inherit = 'res.config.settings' + + pos_multi_uom = fields.Boolean(string="Multi UoM", + related="pos_config_id.pos_multi_uom", + readonly=False, + config_parameter="product_multi_uom_pos." + "pos_multi_uom", + help='UoM of products can be changed in ' + 'POS if enabled') diff --git a/product_multi_uom_pos/models/stock_picking.py b/product_multi_uom_pos/models/stock_picking.py new file mode 100644 index 000000000..c20cdd72f --- /dev/null +++ b/product_multi_uom_pos/models/stock_picking.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class StockPicking(models.Model): + """Inherits model 'stock.picking' and updates unit of measure in move + lines""" + _inherit = 'stock.picking' + + def _prepare_stock_move_vals(self, first_line, order_lines): + """Updates unit of measure in move lines""" + for line in order_lines: + self._cr.execute( + """select * from pos_order_line where id = %s""" % (line.id)) + uom_id = self._cr.dictfetchall()[0]['uom_id'] + return { + 'name': first_line.name, + 'product_uom': uom_id, + 'picking_id': self.id, + 'picking_type_id': self.picking_type_id.id, + 'product_id': first_line.product_id.id, + 'product_uom_qty': abs(sum(order_lines.mapped('qty'))), + 'state': 'draft', + 'location_id': self.location_id.id, + 'location_dest_id': self.location_dest_id.id, + 'company_id': self.company_id.id, + } + + def _create_move_from_pos_order_lines(self, lines): + """Creates individual stock move lines for each sale order line""" + self.ensure_one() + move_vals = [] + for line in lines: + order_lines = self.env['pos.order.line'].concat(line) + move_vals.append( + self._prepare_stock_move_vals(order_lines[0], order_lines)) + moves = self.env['stock.move'].create(move_vals) + confirmed_moves = moves._action_confirm() + confirmed_moves._add_mls_related_to_order(lines, are_qties_done=True) diff --git a/product_multi_uom_pos/security/ir.model.access.csv b/product_multi_uom_pos/security/ir.model.access.csv new file mode 100644 index 000000000..459fbb366 --- /dev/null +++ b/product_multi_uom_pos/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_multi_uom,access.pos.multi.uom,model_pos_multi_uom,base.group_user,1,1,1,1 diff --git a/product_multi_uom_pos/static/description/assets/icons/capture (1).png b/product_multi_uom_pos/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/capture (1).png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/check.png b/product_multi_uom_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/check.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/chevron.png b/product_multi_uom_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/chevron.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/cogs.png b/product_multi_uom_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/cogs.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/consultation.png b/product_multi_uom_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/consultation.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/ecom-black.png b/product_multi_uom_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/ecom-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/education-black.png b/product_multi_uom_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/education-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/hotel-black.png b/product_multi_uom_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/hotel-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/img.png b/product_multi_uom_pos/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/img.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/license.png b/product_multi_uom_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/license.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/lifebuoy.png b/product_multi_uom_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/manufacturing-black.png b/product_multi_uom_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/photo-capture.png b/product_multi_uom_pos/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/photo-capture.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/pos-black.png b/product_multi_uom_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/pos-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/puzzle.png b/product_multi_uom_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/puzzle.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/restaurant-black.png b/product_multi_uom_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/service-black.png b/product_multi_uom_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/service-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/trading-black.png b/product_multi_uom_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/trading-black.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/training.png b/product_multi_uom_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/training.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/update.png b/product_multi_uom_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/update.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/user.png b/product_multi_uom_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/user.png differ diff --git a/product_multi_uom_pos/static/description/assets/icons/wrench.png b/product_multi_uom_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/icons/wrench.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/Cybrosys R.png b/product_multi_uom_pos/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/Cybrosys R.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/categories.png b/product_multi_uom_pos/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/categories.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/check-box.png b/product_multi_uom_pos/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/check-box.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/compass.png b/product_multi_uom_pos/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/compass.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/corporate.png b/product_multi_uom_pos/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/corporate.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/customer-support.png b/product_multi_uom_pos/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/customer-support.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/cybrosys-logo.png b/product_multi_uom_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/email.svg b/product_multi_uom_pos/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/features.png b/product_multi_uom_pos/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/features.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/logo.png b/product_multi_uom_pos/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/logo.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/phone.svg b/product_multi_uom_pos/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/pictures.png b/product_multi_uom_pos/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/pictures.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/pie-chart.png b/product_multi_uom_pos/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/pie-chart.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/right-arrow.png b/product_multi_uom_pos/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/right-arrow.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/star (1) 2.svg b/product_multi_uom_pos/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/star.png b/product_multi_uom_pos/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/star.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/support (1) 1.svg b/product_multi_uom_pos/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/support-email.svg b/product_multi_uom_pos/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/support.png b/product_multi_uom_pos/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/support.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/tick-mark.svg b/product_multi_uom_pos/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/whatsapp 1.svg b/product_multi_uom_pos/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/misc/whatsapp.png b/product_multi_uom_pos/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/misc/whatsapp.png differ diff --git a/product_multi_uom_pos/static/description/assets/misc/whatsapp.svg b/product_multi_uom_pos/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/product_multi_uom_pos/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_multi_uom_pos/static/description/assets/modules/1.png b/product_multi_uom_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/1.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/2.png b/product_multi_uom_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/2.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/3.png b/product_multi_uom_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/3.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/4.png b/product_multi_uom_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/4.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/5.gif b/product_multi_uom_pos/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/5.gif differ diff --git a/product_multi_uom_pos/static/description/assets/modules/5.png b/product_multi_uom_pos/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/5.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/6.png b/product_multi_uom_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/6.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/multi_barcodes_pos.png b/product_multi_uom_pos/static/description/assets/modules/multi_barcodes_pos.png new file mode 100644 index 000000000..05c8b4a69 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/multi_barcodes_pos.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/pos_category_wise_receipt.png b/product_multi_uom_pos/static/description/assets/modules/pos_category_wise_receipt.png new file mode 100644 index 000000000..ea9ab12fb Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/pos_category_wise_receipt.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/pos_numpad_show_hide.png b/product_multi_uom_pos/static/description/assets/modules/pos_numpad_show_hide.png new file mode 100644 index 000000000..ae32f480b Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/pos_numpad_show_hide.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/pos_order_line_image.png b/product_multi_uom_pos/static/description/assets/modules/pos_order_line_image.png new file mode 100644 index 000000000..38ea1f663 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/pos_order_line_image.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/pos_product_creation.png b/product_multi_uom_pos/static/description/assets/modules/pos_product_creation.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/pos_product_creation.png differ diff --git a/product_multi_uom_pos/static/description/assets/modules/pos_sync_orders.png b/product_multi_uom_pos/static/description/assets/modules/pos_sync_orders.png new file mode 100644 index 000000000..f5c24146b Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/modules/pos_sync_orders.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/1.png b/product_multi_uom_pos/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..81a442362 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/1.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/2.png b/product_multi_uom_pos/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..70942aa34 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/2.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/3.png b/product_multi_uom_pos/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..24951f6b7 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/3.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/4.png b/product_multi_uom_pos/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..33f0642d7 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/4.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/5.png b/product_multi_uom_pos/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..81429fbd9 Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/5.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/6.png b/product_multi_uom_pos/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..8f024c30e Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/6.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/8.png b/product_multi_uom_pos/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..b1f9e577e Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/8.png differ diff --git a/product_multi_uom_pos/static/description/assets/screenshots/hero.gif b/product_multi_uom_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..62560e0fc Binary files /dev/null and b/product_multi_uom_pos/static/description/assets/screenshots/hero.gif differ diff --git a/product_multi_uom_pos/static/description/banner.jpg b/product_multi_uom_pos/static/description/banner.jpg new file mode 100644 index 000000000..a85a85a4e Binary files /dev/null and b/product_multi_uom_pos/static/description/banner.jpg differ diff --git a/product_multi_uom_pos/static/description/icon.png b/product_multi_uom_pos/static/description/icon.png new file mode 100644 index 000000000..da4aa7e1b Binary files /dev/null and b/product_multi_uom_pos/static/description/icon.png differ diff --git a/product_multi_uom_pos/static/description/index.html b/product_multi_uom_pos/static/description/index.html new file mode 100644 index 000000000..1576397b0 --- /dev/null +++ b/product_multi_uom_pos/static/description/index.html @@ -0,0 +1,760 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ POS Product Multiple UOM

+

+ A Module For Managing Multiple UoM in POS. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Using this app, you can change unit of measure + of product in POS order.

+
+
+
+
+
+
+ +
+
+

+ Available in Odoo 17.0 Enterprise and + Community.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ 'Multiple Unit of Measure' Option in POS + Configuration Setting .

+

+ Enable the option 'Multiple Unit of + Measure'

+
+
+
+
+
+
+ +
+
+

+ Form View of Product

+

+ If 'Multiple Unit of Measure' option is + enabled, you can add + multiple units of measures and its price + under 'Sales' tab of + Products as shown.

+ +
+
+
+
+
+
+ +
+
+

+ Selection Box to Change UoM.

+

+ You can change UoM from selection box.

+ +
+
+
+
+
+
+ +
+
+

+ UoM and price in Orderline.

+

+ Changed UoM and price in orderline

+ +
+
+
+
+
+
+ +
+
+

+ UoM In POS Receipt.

+

+ UoM will be updated in the Receipt.

+ +
+
+
+
+
+
+ +
+
+

+ UoM In POS Order.

+

+ UoM will be updated in the POS Order

+
+
+
+
+
+
+ +
+
+

+ Reset button in Orderline.

+

+ You can reset the changed UoM to default UoM + by clicking this + button.

+ +
+
+
+
+
+
+
    +
  • + Change UoM of + products in POS. +
  • +
  • + Available in + Odoo 17.0 Enterprise and + Community. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:08th Jan 2024 +
+

+ + Initial Commit for POS Product Multiple UOM.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.js b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.js new file mode 100644 index 000000000..fae182ec2 --- /dev/null +++ b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.js @@ -0,0 +1,22 @@ +/** @odoo-module */ + +import { Orderline } from "@point_of_sale/app/generic_components/orderline/orderline"; +import { useRef } from "@odoo/owl"; +import { patch } from "@web/core/utils/patch"; + +patch(Orderline.prototype, { + setup(_defaultObj, options) { + super.setup(...arguments); + this.select_uom = useRef("uom_value"); + }, +}); +Orderline.props = { + ...Orderline.props, + line: { + shape: { + resetUom: { type: Function, optional: true }, + getUom: { type: Function, optional: true }, + onSelectionChangedUom: { type: Function, optional: true }, + }, + }, +}; diff --git a/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml new file mode 100644 index 000000000..0c826b1f0 --- /dev/null +++ b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/product_multi_uom_pos/static/src/overrides/models/orderline.js b/product_multi_uom_pos/static/src/overrides/models/orderline.js new file mode 100644 index 000000000..2666c0083 --- /dev/null +++ b/product_multi_uom_pos/static/src/overrides/models/orderline.js @@ -0,0 +1,77 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { Orderline } from "@point_of_sale/app/store/models"; + +patch(Orderline.prototype, { + export_as_JSON(){ + var json = super.export_as_JSON.call(this); + // Check if the product_uom_id is undefined.If yes, set product_uom_id to the default uom_id of the product + if (this.product_uom_id == undefined){ + this.product_uom_id = this.product.uom_id; + } + // Set the product_uom_id in the JSON object + json.product_uom_id = this.product_uom_id[0]; + return json; + }, + init_from_JSON(json){ + super.init_from_JSON(...arguments); + // Set the product_uom_id from the JSON data + this.product_uom_id = { + 0 : this.pos.units_by_id[json.product_uom_id].id, + 1 : this.pos.units_by_id[json.product_uom_id].name, + }; + }, + // Add a custom set_uom method + set_uom(uom_id){ + this.product_uom_id = uom_id; + }, + // Override the get_unit method to get selected UoM from POS + get_unit() { + if (this.product_uom_id){ + var unit_id = this.product_uom_id[0]; + if(!unit_id){ + return undefined; + } + if(!this.pos){ + return undefined; + } + return this.pos.units_by_id[unit_id]; + } + return this.product.get_unit(); + }, + onSelectionChangedUom(ev) { + var splitTargetValue = ev.target.value.split(',') + var price = splitTargetValue[0] + var uomId = splitTargetValue[1] + var uomName = splitTargetValue[2] + // Set the selected unit of measure on the order line + const currentOrder = this.env.services.pos.get_order(); + currentOrder.selected_orderline.set_uom({0:uomId,1:uomName}) + // Set the price_manually_set flag to indicate that the price was manually set + currentOrder.selected_orderline.price_manually_set = true; + // Set the unit price of selected UoM on the order line + currentOrder.selected_orderline.set_unit_price(price); + }, + getUom(self) { + const currentOrder = self.env.services.pos.get_order(); + const currentLine = currentOrder.orderlines.find((line) => line.full_product_name === self.props.line.productName) + const uom = currentLine.product.pos_multi_uom_ids + const filteredData = self.env.services.pos.pos_multi_uom.filter(obj => currentLine.product.pos_multi_uom_ids.includes(obj.id)); + return filteredData; + }, + resetUom(){ + this.select_uom.el.value = 'change_uom'; + const currentOrder = this.env.services.pos.get_order(); + currentOrder.selected_orderline.set_uom({0:currentOrder.selected_orderline.product.uom_id[0],1:currentOrder.selected_orderline.product.uom_id[1]}) + currentOrder.selected_orderline.set_unit_price(currentOrder.selected_orderline.product.lst_price); + }, + getDisplayData() { + return { + ...super.getDisplayData(), + getUom: this.getUom, + resetUom: this.resetUom, + onSelectionChangedUom: this.onSelectionChangedUom, + }; + }, +}); diff --git a/product_multi_uom_pos/static/src/overrides/models/store.js b/product_multi_uom_pos/static/src/overrides/models/store.js new file mode 100644 index 000000000..2a55bdf6e --- /dev/null +++ b/product_multi_uom_pos/static/src/overrides/models/store.js @@ -0,0 +1,12 @@ +/** @odoo-module */ +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { patch } from "@web/core/utils/patch"; + + +patch(PosStore.prototype, { + // @Override + async _processData(loadedData) { + await super._processData(...arguments); + this.pos_multi_uom = loadedData['pos.multi.uom']; + }, +}); diff --git a/product_multi_uom_pos/views/pos_order_views.xml b/product_multi_uom_pos/views/pos_order_views.xml new file mode 100644 index 000000000..d6edfd1c1 --- /dev/null +++ b/product_multi_uom_pos/views/pos_order_views.xml @@ -0,0 +1,16 @@ + + + + + pos.order.view.form.inherit.product.multi.uom.pos + + + pos.order + + + + + + + diff --git a/product_multi_uom_pos/views/product_template_views.xml b/product_multi_uom_pos/views/product_template_views.xml new file mode 100644 index 000000000..6400a8234 --- /dev/null +++ b/product_multi_uom_pos/views/product_template_views.xml @@ -0,0 +1,24 @@ + + + + + + product.template.view.form.inherit.product.multi.uom.pos + + + product.template + + + + + + + + + + + + + + diff --git a/product_multi_uom_pos/views/res_config_settings_views.xml b/product_multi_uom_pos/views/res_config_settings_views.xml new file mode 100644 index 000000000..3f10a335e --- /dev/null +++ b/product_multi_uom_pos/views/res_config_settings_views.xml @@ -0,0 +1,30 @@ + + + + + + res.config.settings.view.form.inherit.product.multi.uom.pos + + res.config.settings + + + +
+
+
+ +
+
+
+
+
+
+
+
+