| @ -0,0 +1,47 @@ | |||||
|  | .. 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 | ||||
|  | ======================== | ||||
|  | *This app allows you to change UoM in POS.* | ||||
|  | 
 | ||||
|  | Installation | ||||
|  | ============ | ||||
|  | 	- www.odoo.com/documentation/16.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 <https://cybrosys.com/>`__ | ||||
|  | 
 | ||||
|  | Credits | ||||
|  | ------- | ||||
|  | * Developer:(V16) Arwa V 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: `<static/description/index.html>`__ | ||||
| @ -0,0 +1,22 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | from . import models | ||||
| @ -0,0 +1,56 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | { | ||||
|  |     'name': "POS Product Multiple UOM", | ||||
|  |     'version': '16.0.1.0.0', | ||||
|  |     'category': 'Point of Sale', | ||||
|  |     'summary': """A module to manage multiple UoM in POS""", | ||||
|  |     'description': """This app allows you to change UoM of product in POS.""", | ||||
|  |     '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': [ | ||||
|  |             'product_multi_uom_pos/static/src/js/Orderline.js', | ||||
|  |             'product_multi_uom_pos/static/src/xml/Orderline.xml', | ||||
|  |             'product_multi_uom_pos/static/src/xml/OrderReceipt.xml', | ||||
|  |             'product_multi_uom_pos/static/src/js/load_pos_multi_uom.js', | ||||
|  |             'product_multi_uom_pos/static/src/js/models.js', | ||||
|  |         ], | ||||
|  |     }, | ||||
|  |     'images': [ | ||||
|  |         'static/description/banner.png', | ||||
|  |     ], | ||||
|  |     'license': 'AGPL-3', | ||||
|  |     'installable': True, | ||||
|  |     'auto_install': False, | ||||
|  |     'application': False, | ||||
|  | } | ||||
| @ -0,0 +1,6 @@ | |||||
|  | ## Module <product_multi_uom_pos> | ||||
|  | 
 | ||||
|  | #### 18.10.2023 | ||||
|  | #### Version 16.0.1.0.0 | ||||
|  | #### ADD | ||||
|  | - Initial commit for POS Product Multiple UOM | ||||
| @ -0,0 +1,28 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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 | ||||
| @ -0,0 +1,31 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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") | ||||
| @ -0,0 +1,47 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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") | ||||
| @ -0,0 +1,41 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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'] = values['product_uom_id'] | ||||
|  |         return super(PosOrderLine, self).create(values) | ||||
| @ -0,0 +1,50 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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']) | ||||
| @ -0,0 +1,48 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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 | ||||
|  |         }) | ||||
| @ -0,0 +1,35 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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') | ||||
| @ -0,0 +1,59 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################# | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | # | ||||
|  | #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||||
|  | #    Author: Arwa V 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 <http://www.gnu.org/licenses/>. | ||||
|  | # | ||||
|  | ############################################################################# | ||||
|  | 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) | ||||
| 
 | 
| After Width: | Height: | Size: 1.3 KiB | 
| After Width: | Height: | Size: 1.4 KiB | 
| After Width: | Height: | Size: 576 B | 
| After Width: | Height: | Size: 733 B | 
| After Width: | Height: | Size: 911 B | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 673 B | 
| After Width: | Height: | Size: 878 B | 
| After Width: | Height: | Size: 653 B | 
| After Width: | Height: | Size: 905 B | 
| After Width: | Height: | Size: 839 B | 
| After Width: | Height: | Size: 427 B | 
| After Width: | Height: | Size: 627 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 988 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 1.5 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.9 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 2.1 KiB | 
| After Width: | Height: | Size: 4.4 KiB | 
| After Width: | Height: | Size: 589 B | 
| After Width: | Height: | Size: 3.4 KiB | 
| After Width: | Height: | Size: 1.7 KiB | 
| After Width: | Height: | Size: 2.3 KiB | 
| After Width: | Height: | Size: 967 B | 
| After Width: | Height: | Size: 1.6 KiB | 
| After Width: | Height: | Size: 3.8 KiB | 
| After Width: | Height: | Size: 5.0 KiB | 
| After Width: | Height: | Size: 82 KiB | 
| After Width: | Height: | Size: 86 KiB | 
| After Width: | Height: | Size: 82 KiB | 
| After Width: | Height: | Size: 85 KiB | 
| After Width: | Height: | Size: 81 KiB | 
| After Width: | Height: | Size: 70 KiB | 
| After Width: | Height: | Size: 130 KiB | 
| After Width: | Height: | Size: 132 KiB | 
| After Width: | Height: | Size: 117 KiB | 
| After Width: | Height: | Size: 421 KiB | 
| After Width: | Height: | Size: 371 KiB | 
| After Width: | Height: | Size: 99 KiB | 
| After Width: | Height: | Size: 121 KiB | 
| After Width: | Height: | Size: 147 KiB | 
| After Width: | Height: | Size: 354 KiB | 
| After Width: | Height: | Size: 206 KiB | 
| After Width: | Height: | Size: 101 KiB | 
| After Width: | Height: | Size: 11 KiB | 
| @ -0,0 +1,698 @@ | |||||
|  | <div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> | ||||
|  |     <!-- TITLE BAR --> | ||||
|  |     <div class="d-flex align-items-center justify-content-between" | ||||
|  |          style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> | ||||
|  |         <img src="assets/misc/cybrosys-logo.png" width="42" height="42" | ||||
|  |              style="width: 42px; height: 42px;"/> | ||||
|  |         <div> | ||||
|  |             <div | ||||
|  |                     style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | ||||
|  |                     class="mr-2"> | ||||
|  |                 <i class="fa fa-check mr-1"></i>Community | ||||
|  |             </div> | ||||
|  |             <div | ||||
|  |                     style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | ||||
|  |                     class="mr-2"> | ||||
|  |                 <i class="fa fa-check mr-1"></i>Enterprise | ||||
|  |             </div> | ||||
|  |             <div | ||||
|  |                     style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | ||||
|  |                     class="mr-2"> | ||||
|  |                 <i class="fa fa-check mr-1"></i>Odoo.sh | ||||
|  |             </div> | ||||
|  | 
 | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  |     <!-- END OF TITLE BAR --> | ||||
|  |     <div class="container"> | ||||
|  |         <div class="row"> | ||||
|  |             <div class="col-sm-12 col-md-12 col-lg-12"> | ||||
|  |                 <!-- APP HERO --> | ||||
|  |                 <h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> | ||||
|  |                     POS Product Multiple UOM</h1> | ||||
|  |                 <p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> | ||||
|  |                     A Module For Managing Multiple UoM in POS</p> | ||||
|  |                 <!-- END OF APP HERO --> | ||||
|  |                 <img src="assets/screenshots/hero.gif" class="img-responsive" | ||||
|  |                      style="width: 100%; margin-left: auto; margin-right: auto;"/> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | </div> | ||||
|  | 
 | ||||
|  | <!-- NAVIGATION SECTION --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/compass.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Explore This | ||||
|  |         Module</h2> | ||||
|  | </div> | ||||
|  | <div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> | ||||
|  |     <div class="col-sm-12 col-md-6 my-3"> | ||||
|  |         <a href="#overview"> | ||||
|  |             <div class="d-flex justify-content-between align-items-center" | ||||
|  |                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | ||||
|  |                 <div> | ||||
|  |                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> | ||||
|  |                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">Learn | ||||
|  |             more about this | ||||
|  |             module</span> | ||||
|  |                 </div> | ||||
|  |                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | ||||
|  |             </div> | ||||
|  |         </a> | ||||
|  |     </div> | ||||
|  |     <div class="col-sm-12 col-md-6 my-3"> | ||||
|  |         <a href="#features"> | ||||
|  |             <div class="d-flex justify-content-between align-items-center" | ||||
|  |                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | ||||
|  |                 <div> | ||||
|  |                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> | ||||
|  |                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | ||||
|  |             features of this | ||||
|  |             module</span> | ||||
|  |                 </div> | ||||
|  |                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | ||||
|  |             </div> | ||||
|  |         </a> | ||||
|  |     </div> | ||||
|  |     <div class="col-sm-12 col-md-6 my-3"> | ||||
|  |         <a href="#screenshots"> | ||||
|  |             <div class="d-flex justify-content-between align-items-center" | ||||
|  |                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | ||||
|  |                 <div> | ||||
|  |                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> | ||||
|  |                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | ||||
|  |             screenshots for this | ||||
|  |             module</span> | ||||
|  |                 </div> | ||||
|  |                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | ||||
|  |             </div> | ||||
|  |         </a> | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF NAVIGATION SECTION --> | ||||
|  | 
 | ||||
|  | <!-- OVERVIEW SECTION --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | ||||
|  |      id="overview"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/pie-chart.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Overview | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | <div class="row" | ||||
|  |      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | ||||
|  |     <div class="col-sm-12 py-4"> | ||||
|  |         Using this app, you can change unit of measure of product in POS order. | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF OVERVIEW SECTION --> | ||||
|  | 
 | ||||
|  | <!-- FEATURES SECTION --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | ||||
|  |      id="features"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/features.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Features | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | <div class="row" | ||||
|  |      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | ||||
|  |     <div class="col-sm-12 col-md-6"> | ||||
|  |         <div class="d-flex align-items-center" | ||||
|  |              style="margin-top: 30px; margin-bottom: 30px"> | ||||
|  |             <img src="assets/misc/check-box.png" class="mr-2"/> | ||||
|  |             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Change UoM of products in POS</span> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  |     <div class="col-sm-12 col-md-6"> | ||||
|  |         <div class="d-flex align-items-center" | ||||
|  |              style="margin-top: 30px; margin-bottom: 30px"> | ||||
|  |             <img src="assets/misc/check-box.png" class="mr-2"/> | ||||
|  |             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Available in Odoo 16.0 Enterprise and | ||||
|  |         Community.</span> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF FEATURES SECTION --> | ||||
|  | 
 | ||||
|  | <!-- SCREENSHOTS SECTION --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | ||||
|  |      id="screenshots"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/pictures.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Screenshots | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | <div class="row"> | ||||
|  |     <div class="col-sm-12"> | ||||
|  | 
 | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 'Multiple Unit of Measure' Option in POS Configuration Setting | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 Enable the option 'Multiple Unit of Measure'</p> | ||||
|  |             <img src="assets/screenshots/Screenshot1.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 Form View of Product | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 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.</p> | ||||
|  |             <img src="assets/screenshots/Screenshot2.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |             <br/><br/> | ||||
|  |             <img src="assets/screenshots/Screenshot3.png" | ||||
|  |                  class="img-thumbnail"/> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 Selection Box to Change UoM | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 You can change UoM from selection box..</p> | ||||
|  |             <img src="assets/screenshots/Screenshot4.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 UoM and price in Orderline | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 Changed UoM and price in orderline</p> | ||||
|  |             <img src="assets/screenshots/Screenshot5.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 UoM In POS Receipt | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 UoM will be updated in the Receipt</p> | ||||
|  |             <img src="assets/screenshots/Screenshot6.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  |         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 UoM In POS Order | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 UoM will be updated in the POS Order</p> | ||||
|  |             <img src="assets/screenshots/Screenshot7.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  |                 <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 UoM In Stock Picking | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                 UoM will be updated in the Picking</p> | ||||
|  |             <img src="assets/screenshots/Screenshot8.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  |                         <div style="display: block; margin: 30px auto;"> | ||||
|  |             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | ||||
|  |                 Reset button in Orderline | ||||
|  |             </h3> | ||||
|  |             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | ||||
|  |                  You can reset the changed UoM to default UoM by clicking this | ||||
|  |                 button.</p> | ||||
|  |             <img src="assets/screenshots/Screenshot9.png" | ||||
|  |                  class="img-thumbnail"> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | 
 | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF SCREENSHOTS SECTION --> | ||||
|  | 
 | ||||
|  | <!-- RELATED PRODUCTS --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/categories.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Related | ||||
|  |         Products | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | <div class="row"> | ||||
|  |     <div class="col-sm-12"> | ||||
|  |         <div id="demo1" class="row carousel slide" data-ride="carousel"> | ||||
|  |             <!-- The slideshow --> | ||||
|  |             <div class="carousel-inner" style="padding: 30px;"> | ||||
|  |                 <div class="carousel-item" style="min-height: 198.656px;"> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/multi_barcodes_pos/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/multi_barcodes_pos.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/pos_order_line_image/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/pos_order_line_image.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/pos_product_creation/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/pos_product_creation.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |                 <div class="carousel-item active" | ||||
|  |                      style="min-height: 198.656px;"> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/pos_sync_orders/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/pos_sync_orders.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/pos_numpad_show_hide/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/pos_numpad_show_hide.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | ||||
|  |                          style="float:left"> | ||||
|  |                         <a href="https://apps.odoo.com/apps/modules/16.0/pos_category_wise_receipt/" | ||||
|  |                            target="_blank"> | ||||
|  |                             <div style="border-radius:10px"> | ||||
|  |                                 <img class="img img-responsive center-block" | ||||
|  |                                      style="border-radius: 0px;" | ||||
|  |                                      src="assets/modules/pos_category_wise_receipt.png"> | ||||
|  |                             </div> | ||||
|  |                         </a> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |             <!-- Left and right controls --> | ||||
|  |             <a class="carousel-control-prev" href="#demo1" data-slide="prev" | ||||
|  |                style="width:35px; color:#000"> <span | ||||
|  |                     class="carousel-control-prev-icon"><i | ||||
|  |                     class="fa fa-chevron-left" | ||||
|  |                     style="font-size:24px"></i></span> | ||||
|  |             </a> <a class="carousel-control-next" href="#demo1" | ||||
|  |                     data-slide="next" style="width:35px; color:#000"> | ||||
|  |             <span class="carousel-control-next-icon"><i | ||||
|  |                     class="fa fa-chevron-right" | ||||
|  |                     style="font-size:24px"></i></span> | ||||
|  |         </a> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF RELATED PRODUCTS --> | ||||
|  | 
 | ||||
|  | <!-- OUR SERVICES --> | ||||
|  | 
 | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/star.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Our Services | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | 
 | ||||
|  | <div class="container my-5"> | ||||
|  |     <div class="row"> | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/cogs.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Customization</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/wrench.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Implementation</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/lifebuoy.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Support</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/user.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Hire | ||||
|  |                 Odoo | ||||
|  |                 Developer</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/puzzle.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Integration</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/update.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Migration</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/consultation.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Consultancy</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/training.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Implementation</h6> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | ||||
|  |             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | ||||
|  |                  style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | ||||
|  |                 <img src="assets/icons/license.png" class="img-responsive" | ||||
|  |                      height="48px" width="48px"> | ||||
|  |             </div> | ||||
|  |             <h6 class="text-center" | ||||
|  |                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | ||||
|  |                 Odoo | ||||
|  |                 Licensing Consultancy</h6> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  | 
 | ||||
|  | </div> | ||||
|  | 
 | ||||
|  | <!-- END OF OUR SERVICES --> | ||||
|  | 
 | ||||
|  | <!-- OUR INDUSTRIES --> | ||||
|  | 
 | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/corporate.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Our | ||||
|  |         Industries | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | 
 | ||||
|  | <div class="container my-5"> | ||||
|  |     <div class="row"> | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/trading-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Trading | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Easily procure | ||||
|  |                     and | ||||
|  |                     sell your products</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/pos-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     POS | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Easy | ||||
|  |                     configuration | ||||
|  |                     and convivial experience</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/education-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Education | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     A platform for | ||||
|  |                     educational management</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/manufacturing-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Manufacturing | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Plan, track and | ||||
|  |                     schedule your operations</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/ecom-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     E-commerce & Website | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Mobile | ||||
|  |                     friendly, | ||||
|  |                     awe-inspiring product pages</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/service-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Service Management | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Keep track of | ||||
|  |                     services and invoice</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/restaurant-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Restaurant | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     Run your bar or | ||||
|  |                     restaurant methodically</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  | 
 | ||||
|  |         <div class="col-lg-3"> | ||||
|  |             <div class="my-4 d-flex flex-column justify-content-center" | ||||
|  |                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | ||||
|  |                 <img src="assets/icons/hotel-black.png" | ||||
|  |                      class="img-responsive mb-3" height="48px" width="48px"> | ||||
|  |                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | ||||
|  |                     Hotel Management | ||||
|  |                 </h5> | ||||
|  |                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | ||||
|  |                     An | ||||
|  |                     all-inclusive | ||||
|  |                     hotel management application</p> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | 
 | ||||
|  | <!-- END OF OUR INDUSTRIES --> | ||||
|  | 
 | ||||
|  | <!-- SUPPORT --> | ||||
|  | <div class="d-flex align-items-center" | ||||
|  |      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | ||||
|  |     <div class="d-flex justify-content-center align-items-center mr-2" | ||||
|  |          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | ||||
|  |         <img src="assets/misc/customer-support.png"/> | ||||
|  |     </div> | ||||
|  |     <h2 class="mt-2" | ||||
|  |         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | ||||
|  |         Support | ||||
|  |     </h2> | ||||
|  | </div> | ||||
|  | <div class="container mt-5"> | ||||
|  |     <div class="row"> | ||||
|  |         <div class="col-sm-12 col-md-6"> | ||||
|  |             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | ||||
|  |                 <div class="mr-4 d-flex justify-content-center align-items-center" | ||||
|  |                      style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | ||||
|  |                     <img src="assets/misc/support.png" height="48" width="48" | ||||
|  |                          style="width: 42px; height: 42px;"/> | ||||
|  |                 </div> | ||||
|  |                 <div> | ||||
|  |                     <h4>Need Help?</h4> | ||||
|  |                     <p style="line-height: 100%;">Got questions or need help? | ||||
|  |                         Get in touch.</p> | ||||
|  |                     <a href="mailto:odoo@cybrosys.com"> | ||||
|  |                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | ||||
|  |                             odoo@cybrosys.com</p> | ||||
|  |                     </a> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |         <div class="col-sm-12 col-md-6"> | ||||
|  |             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | ||||
|  |                 <div class="mr-4 d-flex justify-content-center align-items-center" | ||||
|  |                      style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | ||||
|  |                     <img src="assets/misc/whatsapp.png" height="52" width="52" | ||||
|  |                          style="width: 52px; height: 52px;"/> | ||||
|  |                 </div> | ||||
|  |                 <div> | ||||
|  |                     <h4>WhatsApp</h4> | ||||
|  |                     <p style="line-height: 100%;">Say hi to us on WhatsApp!</p> | ||||
|  |                     <a href="https://api.whatsapp.com/send?phone=918606827707"> | ||||
|  |                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | ||||
|  |                             +91 86068 | ||||
|  |                             27707</p> | ||||
|  |                     </a> | ||||
|  |                 </div> | ||||
|  |             </div> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  |     <div class="row"> | ||||
|  |         <div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> | ||||
|  |             <img src="assets/misc/logo.png" width="144" height="31" | ||||
|  |                  style="width:144px; height: 31px; margin-top: 40px;"/> | ||||
|  |         </div> | ||||
|  |     </div> | ||||
|  | </div> | ||||
|  | <!-- END OF SUPPORT --> | ||||
| @ -0,0 +1,48 @@ | |||||
|  | odoo.define('product_multi_uom_pos.multi_uom_pos', function(require) { | ||||
|  |     'use strict'; | ||||
|  |     var OrderLine = require('point_of_sale.Orderline'); | ||||
|  |     const Registries = require('point_of_sale.Registries'); | ||||
|  |     const { useListener } = require("@web/core/utils/hooks"); | ||||
|  |     const OrderLineExtend = (OrderLine) => class extends OrderLine { | ||||
|  |         setup(){ | ||||
|  |             super.setup(); | ||||
|  |             useListener('click', '#select_uom', this.onClickUom); | ||||
|  |             useListener('click', '#reset_uom', this.resetUom); | ||||
|  |         } | ||||
|  | 
 | ||||
|  |         // Retrieve the available unit of measure options based on the product's multi_uom_ids
 | ||||
|  |         getUom() { | ||||
|  |             const filteredData = this.props.line.pos.pos_multi_uom.filter(obj => this.props.line.product.pos_multi_uom_ids.includes(obj.id)); | ||||
|  |             return filteredData | ||||
|  |         } | ||||
|  | 
 | ||||
|  |         // Handle click event on the unit of measure options
 | ||||
|  |         onClickUom(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
 | ||||
|  |             this.props.line.set_uom({0:uomId,1:uomName}) | ||||
|  | 
 | ||||
|  |             // Set the price_manually_set flag to indicate that the price was manually set
 | ||||
|  |             this.props.line.price_manually_set = true; | ||||
|  | 
 | ||||
|  |             // Set the unit price of selected UoM on the order line
 | ||||
|  |             this.props.line.set_unit_price(price); | ||||
|  |         } | ||||
|  | 
 | ||||
|  |         // Reset the unit of measure to the default uom_id of the product
 | ||||
|  |         resetUom(ev) { | ||||
|  |             var lineId = this.props.line.id | ||||
|  |             console.log(this) | ||||
|  |             this.el.querySelector('#change_uom').disabled = false; | ||||
|  |             this.el.querySelector('#select_uom').value = 'change_uom'; | ||||
|  |             this.el.querySelector('#change_uom').disabled = true; | ||||
|  |             this.props.line.set_uom({0:this.props.line.product.uom_id[0],1:this.props.line.product.uom_id[1]}) | ||||
|  |             this.props.line.set_unit_price(this.props.line.product.lst_price); | ||||
|  |         } | ||||
|  |     }; | ||||
|  |     Registries.Component.extend(OrderLine, OrderLineExtend); | ||||
|  |     return OrderLine; | ||||
|  | }); | ||||
| @ -0,0 +1,16 @@ | |||||
|  | odoo.define('product_multi_uom_pos.pos_multi_uom_load', function (require) { | ||||
|  | "use strict"; | ||||
|  |     // Import the required modules
 | ||||
|  |     var {PosGlobalState} = require('point_of_sale.models'); | ||||
|  |     const Registries = require('point_of_sale.Registries'); | ||||
|  |     // Extend the PosGlobalState class
 | ||||
|  |     const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { | ||||
|  |     async _processData(loadedData){ | ||||
|  |         await super._processData(...arguments); | ||||
|  |         // Assign the loaded 'pos.multi.uom' data to the pos_multi_uom property
 | ||||
|  |         this.pos_multi_uom = loadedData['pos.multi.uom']; | ||||
|  |         } | ||||
|  |     } | ||||
|  |     // Extend the PosGlobalState model using the NewPosGlobalState class
 | ||||
|  |     Registries.Model.extend(PosGlobalState,NewPosGlobalState) | ||||
|  |  }); | ||||
| @ -0,0 +1,47 @@ | |||||
|  | /** @odoo-module **/ | ||||
|  | 
 | ||||
|  | // Import the required modules
 | ||||
|  | import Registries from 'point_of_sale.Registries'; | ||||
|  | import {Orderline} from 'point_of_sale.models'; | ||||
|  | 
 | ||||
|  | // Extend the Orderline class
 | ||||
|  | const ProductUom = (Orderline) => class ProductUom extends Orderline { | ||||
|  |     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(); | ||||
|  | 	} | ||||
|  | } | ||||
|  | Registries.Model.extend(Orderline, ProductUom); | ||||
| @ -0,0 +1,61 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | <templates id="template" xml:space="preserve"> | ||||
|  |     <!--Template to show Unit of Measure in Order Receipt Lines --> | ||||
|  |     <t t-name="OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" | ||||
|  |        t-inherit-mode="extension" owl="1"> | ||||
|  |         <xpath expr="//t[@t-foreach='receipt.orderlines']" position="replace"> | ||||
|  |             <t t-foreach="receipt.orderlines" t-as="line" t-key="line.id"> | ||||
|  |                 <div t-esc="line.product_name_wrapped[0]"/> | ||||
|  |                 <WrappedProductNameLines line="line"/> | ||||
|  |                 <t t-if="line.display_discount_policy == 'without_discount' and line.price != line.price_lst"> | ||||
|  |                     <div class="pos-receipt-left-padding"> | ||||
|  |                         <t t-esc="env.pos.format_currency_no_symbol(line.price_lst)"/> | ||||
|  |                         -> | ||||
|  |                         <t t-esc="env.pos.format_currency_no_symbol(line.price)"/> | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |                 <t t-elif="line.discount !== 0"> | ||||
|  |                     <div class="pos-receipt-left-padding"> | ||||
|  |                         <t t-if="env.pos.config.iface_tax_included === 'total'"> | ||||
|  |                             <t t-esc="env.pos.format_currency_no_symbol(line.price_with_tax_before_discount)"/> | ||||
|  |                         </t> | ||||
|  |                         <t t-else=""> | ||||
|  |                             <t t-esc="env.pos.format_currency_no_symbol(line.price)"/> | ||||
|  |                         </t> | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |                 <t t-if="line.discount !== 0"> | ||||
|  |                     <div class="pos-receipt-left-padding"> | ||||
|  |                         Discount: <t t-esc="line.discount"/>% | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |                 <div class="pos-receipt-left-padding"> | ||||
|  |                     <t t-esc="Math.round(line.quantity * Math.pow(10, env.pos.dp['Product Unit of Measure'])) / Math.pow(10, env.pos.dp['Product Unit of Measure'])"/> | ||||
|  |                     <t t-esc="line.unit_name"/> | ||||
|  |                     x | ||||
|  |                     <t t-esc="env.pos.format_currency(line.price_display_one)"/> | ||||
|  |                     <span class="price_display pos-receipt-right-align"> | ||||
|  |                         <t t-esc="env.pos.format_currency_no_symbol(line.price_display)"/> | ||||
|  |                     </span> | ||||
|  |                 </div> | ||||
|  |                 <t t-if="line.customer_note"> | ||||
|  |                     <div class="pos-receipt-left-padding pos-receipt-customer-note"> | ||||
|  |                         <t t-esc="line.customer_note"/> | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |                 <t t-if="line.pack_lot_lines"> | ||||
|  |                     <div class="pos-receipt-left-padding"> | ||||
|  |                         <ul> | ||||
|  |                             <t t-foreach="line.pack_lot_lines" t-as="lot" | ||||
|  |                                t-key="lot.cid"> | ||||
|  |                                 <li> | ||||
|  |                                     SN <t t-esc="lot.lot_name"/> | ||||
|  |                                 </li> | ||||
|  |                             </t> | ||||
|  |                         </ul> | ||||
|  |                     </div> | ||||
|  |                 </t> | ||||
|  |             </t> | ||||
|  |         </xpath> | ||||
|  |     </t> | ||||
|  | </templates> | ||||
| @ -0,0 +1,24 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||
|  | <templates xml:space="preserve"> | ||||
|  |     <!-- Adds selection field to change UoM in order line --> | ||||
|  |     <t t-name="Orderline" t-inherit="point_of_sale.Orderline" | ||||
|  |        t-inherit-mode="extension" owl="1"> | ||||
|  |         <xpath expr="//li[hasclass('orderline')]" position="inside"> | ||||
|  |             <t t-if="props.line.product.pos_multi_uom_ids.length != 0"> | ||||
|  |                 <select style="width:32%;height:25px;border-radius:5px;border:1px solid transparent;margin-top: 5px; | ||||
|  |                     margin-bottom: 5px;margin-left: 10px; background: rgb(95 115 116 / 20%);" id="select_uom" class="select_uom"> | ||||
|  |                     <option value="change_uom" id="change_uom" selected="selected" disabled="disabled">Change UoM</option> | ||||
|  |                     <t t-foreach="getUom()" t-as="item" t-key="item.id"> | ||||
|  |                         <option id="select_uom" class="select_uom" | ||||
|  |                                 t-att-value="[item.price,item.uom_id[0],item.uom_id[1]]"> | ||||
|  |                             <div><span>$ <t t-esc="item.price"/> per | ||||
|  |                                 <t t-esc="item.uom_id[1]"/></span></div> | ||||
|  |                         </option> | ||||
|  |                     </t> | ||||
|  |                 </select> | ||||
|  |                 <button id="reset_uom" style="margin-top: 5px; background:transparent;border:transparent; | ||||
|  |                     margin-bottom: 5px;"><i class="fa fa-rotate-left"/></button> | ||||
|  |             </t> | ||||
|  |         </xpath> | ||||
|  |     </t> | ||||
|  | </templates> | ||||
| @ -0,0 +1,14 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | <odoo> | ||||
|  |     <!-- Adding new field 'uom_id' to POS order line--> | ||||
|  |     <record id="view_pos_pos_form" model="ir.ui.view"> | ||||
|  |         <field name="name">pos.order.view.form.inherit.product.multi.uom.pos</field> | ||||
|  |         <field name="inherit_id" ref="point_of_sale.view_pos_pos_form"/> | ||||
|  |         <field name="model">pos.order</field> | ||||
|  |         <field name="arch" type="xml"> | ||||
|  |             <xpath expr="//field[@name='lines']/tree/field[@name='qty']" position="after"> | ||||
|  |                   <field name="uom_id" invisible="1"/> | ||||
|  |             </xpath> | ||||
|  |         </field> | ||||
|  |     </record> | ||||
|  | </odoo> | ||||
| @ -0,0 +1,21 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | <odoo> | ||||
|  |     <!-- Adding new field 'pos_multi_uom_ids' to Product view--> | ||||
|  |     <record id="product_template_only_form_view" model="ir.ui.view"> | ||||
|  |         <field name="name">product.template.view.form.inherit.product.multi.uom.pos</field> | ||||
|  |         <field name="inherit_id" ref="product.product_template_only_form_view"/> | ||||
|  |         <field name="model">product.template</field> | ||||
|  |         <field name="arch" type="xml"> | ||||
|  |             <xpath expr="//field[@name='pos_categ_id']" position="after"> | ||||
|  |                 <field name="multi_uom" invisible="1"/> | ||||
|  |                 <field name="pos_multi_uom_ids" attrs="{'invisible':[('multi_uom','=',False)]}"> | ||||
|  |                     <tree editable="bottom"> | ||||
|  |                         <field name="uom_id"/> | ||||
|  |                         <field name="price"/> | ||||
|  |                         <field name="category_id" invisible="1"/> | ||||
|  |                     </tree> | ||||
|  |                 </field> | ||||
|  |             </xpath> | ||||
|  |         </field> | ||||
|  |     </record> | ||||
|  | </odoo> | ||||
| @ -0,0 +1,28 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||
|  | <odoo> | ||||
|  |     <!-- Added POS Multiple UoM option in PoS Configuration Settings --> | ||||
|  |     <record id="res_config_settings_view_form" model="ir.ui.view"> | ||||
|  |         <field name="name">res.config.settings.view.form.inherit.product.multi.uom.pos</field> | ||||
|  |         <field name="model">res.config.settings</field> | ||||
|  |         <field name="inherit_id" | ||||
|  |                ref="point_of_sale.res_config_settings_view_form"/> | ||||
|  |         <field name="arch" type="xml"> | ||||
|  |             <xpath expr="//div[@id='pos_interface_section']" | ||||
|  |                    position="after"> | ||||
|  |                 <div class="row mt16 o_settings_container"> | ||||
|  |                     <div class="col-12 col-lg-6 o_setting_box"> | ||||
|  |                         <div class="o_setting_left_pane"> | ||||
|  |                             <field name="pos_multi_uom"/> | ||||
|  |                         </div> | ||||
|  |                         <div class="o_setting_right_pane"> | ||||
|  |                             <label for="pos_multi_uom" string="Multiple Unit of Measure"/> | ||||
|  |                             <div class="text-muted"> | ||||
|  |                                 Change unit of measure of product | ||||
|  |                             </div> | ||||
|  |                         </div> | ||||
|  |                     </div> | ||||
|  |                 </div> | ||||
|  |             </xpath> | ||||
|  |         </field> | ||||
|  |     </record> | ||||
|  | </odoo> | ||||