diff --git a/carry_bag_pos/README.rst b/carry_bag_pos/README.rst new file mode 100755 index 000000000..30db84b15 --- /dev/null +++ b/carry_bag_pos/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Bag Charges in POS +================== +This module helps you to add carry bags to point of sale orders. + +Installation +============ +- www.odoo.com/documentation/16.0/setup/install.html +- Install our custom addon + +License +------- +Lesser General Public License, Version 3 (LGPL-3). +(http://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Sruthi Pavithran, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/carry_bag_pos/__init__.py b/carry_bag_pos/__init__.py new file mode 100755 index 000000000..7b2c59c1c --- /dev/null +++ b/carry_bag_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/carry_bag_pos/__manifest__.py b/carry_bag_pos/__manifest__.py new file mode 100755 index 000000000..8b907dcd4 --- /dev/null +++ b/carry_bag_pos/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Bag Charges in POS', + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Add carry bags to point of sale orders', + 'description': """This module gives an option to add carry bags to point of + sale orders.User can choose bag category for getting bag to the order.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/res_config_settings_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'carry_bag_pos/static/src/js/models.js', + 'carry_bag_pos/static/src/js/bag_charges_screen.js', + 'carry_bag_pos/static/src/js/bag_charges_button.js', + 'carry_bag_pos/static/src/xml/bag_charges_button_templates.xml', + 'carry_bag_pos/static/src/xml/category_screen_templates.xml' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/carry_bag_pos/doc/RELEASE_NOTES.md b/carry_bag_pos/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..dddf34892 --- /dev/null +++ b/carry_bag_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 01.11.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Bag Charges in POS diff --git a/carry_bag_pos/models/__init__.py b/carry_bag_pos/models/__init__.py new file mode 100755 index 000000000..56d4c77d4 --- /dev/null +++ b/carry_bag_pos/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_config +from . import pos_session +from . import res_config_settings diff --git a/carry_bag_pos/models/pos_config.py b/carry_bag_pos/models/pos_config.py new file mode 100644 index 000000000..b27ea71af --- /dev/null +++ b/carry_bag_pos/models/pos_config.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class PosConfig(models.Model): + """Adding fields to pos config""" + _inherit = 'pos.config' + + bag_charges = fields.Boolean(String="Enable Bag Charges", + help="Checking bag charges active or not") + bag_category_id = fields.Many2one('pos.category', + String="Choose Product Category", + help="User can select Category") diff --git a/carry_bag_pos/models/pos_session.py b/carry_bag_pos/models/pos_session.py new file mode 100755 index 000000000..e24d0a2c2 --- /dev/null +++ b/carry_bag_pos/models/pos_session.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class PosSession(models.Model): + """Load fields into pos session.""" + _inherit = "pos.session" + + def _pos_ui_models_to_load(self): + """Load models to pos session""" + result = super()._pos_ui_models_to_load() + result += [ + 'res.config.settings' + ] + return result + + def _loader_params_res_config_settings(self): + """Load res.config.settings parameters""" + return { + 'search_params': { + 'fields': [ + 'pos_bag_charges', + 'pos_bag_category_id' + ] + + } + } + + def _get_pos_ui_res_config_settings(self, params): + """Get res config settings parameters""" + return self.env['res.config.settings'].search_read( + **params['search_params']) diff --git a/carry_bag_pos/models/res_config_settings.py b/carry_bag_pos/models/res_config_settings.py new file mode 100755 index 000000000..f36969672 --- /dev/null +++ b/carry_bag_pos/models/res_config_settings.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """Adding fields to configuration settings""" + _inherit = "res.config.settings" + + pos_bag_charges = fields.Boolean(related="pos_config_id.bag_charges", + String="Enable Bag Charges", + help="Checking bag charges active or not") + pos_bag_category_id = fields.Many2one( + 'pos.category', related="pos_config_id.bag_category_id", + String="Choose Product Category", help="User can select Category") diff --git a/carry_bag_pos/static/description/assets/icons/check.png b/carry_bag_pos/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/check.png differ diff --git a/carry_bag_pos/static/description/assets/icons/chevron.png b/carry_bag_pos/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/chevron.png differ diff --git a/carry_bag_pos/static/description/assets/icons/cogs.png b/carry_bag_pos/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/cogs.png differ diff --git a/carry_bag_pos/static/description/assets/icons/consultation.png b/carry_bag_pos/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/consultation.png differ diff --git a/carry_bag_pos/static/description/assets/icons/ecom-black.png b/carry_bag_pos/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/ecom-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/education-black.png b/carry_bag_pos/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/education-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/hotel-black.png b/carry_bag_pos/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/hotel-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/license.png b/carry_bag_pos/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/license.png differ diff --git a/carry_bag_pos/static/description/assets/icons/lifebuoy.png b/carry_bag_pos/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/carry_bag_pos/static/description/assets/icons/manufacturing-black.png b/carry_bag_pos/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/pos-black.png b/carry_bag_pos/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/pos-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/puzzle.png b/carry_bag_pos/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/puzzle.png differ diff --git a/carry_bag_pos/static/description/assets/icons/restaurant-black.png b/carry_bag_pos/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/service-black.png b/carry_bag_pos/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/service-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/trading-black.png b/carry_bag_pos/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/trading-black.png differ diff --git a/carry_bag_pos/static/description/assets/icons/training.png b/carry_bag_pos/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/training.png differ diff --git a/carry_bag_pos/static/description/assets/icons/update.png b/carry_bag_pos/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/update.png differ diff --git a/carry_bag_pos/static/description/assets/icons/user.png b/carry_bag_pos/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/user.png differ diff --git a/carry_bag_pos/static/description/assets/icons/wrench.png b/carry_bag_pos/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/carry_bag_pos/static/description/assets/icons/wrench.png differ diff --git a/carry_bag_pos/static/description/assets/misc/categories.png b/carry_bag_pos/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/categories.png differ diff --git a/carry_bag_pos/static/description/assets/misc/check-box.png b/carry_bag_pos/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/check-box.png differ diff --git a/carry_bag_pos/static/description/assets/misc/compass.png b/carry_bag_pos/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/compass.png differ diff --git a/carry_bag_pos/static/description/assets/misc/corporate.png b/carry_bag_pos/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/corporate.png differ diff --git a/carry_bag_pos/static/description/assets/misc/customer-support.png b/carry_bag_pos/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/customer-support.png differ diff --git a/carry_bag_pos/static/description/assets/misc/cybrosys-logo.png b/carry_bag_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/carry_bag_pos/static/description/assets/misc/features.png b/carry_bag_pos/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/features.png differ diff --git a/carry_bag_pos/static/description/assets/misc/logo.png b/carry_bag_pos/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/logo.png differ diff --git a/carry_bag_pos/static/description/assets/misc/pictures.png b/carry_bag_pos/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/pictures.png differ diff --git a/carry_bag_pos/static/description/assets/misc/pie-chart.png b/carry_bag_pos/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/pie-chart.png differ diff --git a/carry_bag_pos/static/description/assets/misc/right-arrow.png b/carry_bag_pos/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/right-arrow.png differ diff --git a/carry_bag_pos/static/description/assets/misc/star.png b/carry_bag_pos/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/star.png differ diff --git a/carry_bag_pos/static/description/assets/misc/support.png b/carry_bag_pos/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/support.png differ diff --git a/carry_bag_pos/static/description/assets/misc/whatsapp.png b/carry_bag_pos/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/carry_bag_pos/static/description/assets/misc/whatsapp.png differ diff --git a/carry_bag_pos/static/description/assets/modules/1.png b/carry_bag_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..17c14989e Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/1.png differ diff --git a/carry_bag_pos/static/description/assets/modules/2.png b/carry_bag_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..d1d3775d6 Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/2.png differ diff --git a/carry_bag_pos/static/description/assets/modules/3.png b/carry_bag_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..759574472 Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/3.png differ diff --git a/carry_bag_pos/static/description/assets/modules/4.png b/carry_bag_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..dcbd0cb06 Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/4.png differ diff --git a/carry_bag_pos/static/description/assets/modules/5.png b/carry_bag_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..a77027978 Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/5.png differ diff --git a/carry_bag_pos/static/description/assets/modules/6.png b/carry_bag_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/carry_bag_pos/static/description/assets/modules/6.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_01.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_01.png new file mode 100644 index 000000000..264dad117 Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_01.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_02.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_02.png new file mode 100644 index 000000000..3212345c4 Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_02.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_03.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_03.png new file mode 100644 index 000000000..35dca5449 Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_03.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_04.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_04.png new file mode 100755 index 000000000..312158151 Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_04.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_05.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_05.png new file mode 100755 index 000000000..f94cd1b6b Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_05.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_06.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_06.png new file mode 100755 index 000000000..1fdbe18df Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_06.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/carry_bag_07.png b/carry_bag_pos/static/description/assets/screenshots/carry_bag_07.png new file mode 100755 index 000000000..9b00f8f8b Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/carry_bag_07.png differ diff --git a/carry_bag_pos/static/description/assets/screenshots/hero1.gif b/carry_bag_pos/static/description/assets/screenshots/hero1.gif new file mode 100755 index 000000000..47a7e0573 Binary files /dev/null and b/carry_bag_pos/static/description/assets/screenshots/hero1.gif differ diff --git a/carry_bag_pos/static/description/banner.png b/carry_bag_pos/static/description/banner.png new file mode 100755 index 000000000..a0afb603e Binary files /dev/null and b/carry_bag_pos/static/description/banner.png differ diff --git a/carry_bag_pos/static/description/icon.png b/carry_bag_pos/static/description/icon.png new file mode 100755 index 000000000..63c39ce71 Binary files /dev/null and b/carry_bag_pos/static/description/icon.png differ diff --git a/carry_bag_pos/static/description/index.html b/carry_bag_pos/static/description/index.html new file mode 100755 index 000000000..8b5e8fd2e --- /dev/null +++ b/carry_bag_pos/static/description/index.html @@ -0,0 +1,637 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+

+ Bag Charges in POS

+

+ Add Carry Bags to Point of Sale Orders

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module gives an option to add Carry Bags to Point of Sale Orders.When we Enable Carry Bags Users + can Choose Different Sizes of Carry Bags from POS Session. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+ +
+ + No Additional Configuration Required +
+
+ + Available in Odoo 16.0 Community & Enterprise +
+
+ + Add Carry Bag Option in POS Orders +
+
+ + Users can Select Carry Bag Styles and Size from POS Session +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+

+ Carry Bag in POS

+

+ Create new Bag Category

+ +
+ +
+

+ Add Bags to this Category. +

+ +
+ +
+

+ Enable Bag Charges in Configuration Settings

+ +
+ +
+

+ Click on the Button to Choose Carry Bags

+ +
+
+

+ Choose Bags to add into POS Order

+ +
+ +
+

+ Bag Charges are Added with POS Order

+ +
+ +
+

+ Bag Charges are also Added in Receipt

+ +
+ + + +
+
+ +
+

Related + Products +

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ 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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ \ No newline at end of file diff --git a/carry_bag_pos/static/src/js/bag_charges_button.js b/carry_bag_pos/static/src/js/bag_charges_button.js new file mode 100755 index 000000000..22744b519 --- /dev/null +++ b/carry_bag_pos/static/src/js/bag_charges_button.js @@ -0,0 +1,47 @@ +odoo.define('carry_bag_pos.bag_charges.button', function(require) { +'use strict'; + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require("@web/core/utils/hooks"); + const Registries = require('point_of_sale.Registries'); + + class BagChargesButton extends PosComponent { + /** + *Override PosComponent + */ + setup() { + useListener('click', this.onClick); + } + async onClick() { + var order = this.env.pos.get_order(); + var category = this.env.pos.config.bag_category_id; + // Select category in configuration settings + var products = this.env.pos.db.get_product_by_category(category[0]); + // Select products from this category + if(products != 0) { + // If there are products from particular category go to category screen + this.showScreen('CategoryScreen', { + 'bag_products': products + }); + } + else { + this.showPopup('ErrorPopup', { + // Otherwise it will a show an error popup + 'title': 'No Products Found', + 'body': 'There are no products in this category.' + }); + } + } + } +BagChargesButton.template = 'BagChargesButton'; + ProductScreen.addControlButton({ + // Add button in product screen + component: BagChargesButton, + condition: function() { + return this.env.pos.config.bag_charges; + }, + position: ['before', 'SetPricelistButton'], + }); + Registries.Component.add(BagChargesButton); + return BagChargesButton; +}); diff --git a/carry_bag_pos/static/src/js/bag_charges_screen.js b/carry_bag_pos/static/src/js/bag_charges_screen.js new file mode 100755 index 000000000..d1a991585 --- /dev/null +++ b/carry_bag_pos/static/src/js/bag_charges_screen.js @@ -0,0 +1,26 @@ +odoo.define('carry_bag_pos.bag_charges_screen', function(require) { + 'use strict'; + + const PosComponent = require('point_of_sale.PosComponent'); + const Registries = require('point_of_sale.Registries'); + + class CategoryScreen extends PosComponent { + /** + *Override PosComponent + */ + click(event) { + // Get current target + var self = this; + var product_id = parseInt(event.currentTarget.dataset['productId']) + self.env.pos.get_order().add_product(self.env.pos.db.product_by_id[product_id]); + // Add products to the pos order line + this.showScreen("ProductScreen"); + } + back() { + this.showScreen("ProductScreen"); + } + } + CategoryScreen.template = 'CategoryScreen'; + Registries.Component.add(CategoryScreen); + return CategoryScreen; +}); diff --git a/carry_bag_pos/static/src/js/models.js b/carry_bag_pos/static/src/js/models.js new file mode 100755 index 000000000..92e6af908 --- /dev/null +++ b/carry_bag_pos/static/src/js/models.js @@ -0,0 +1,16 @@ +odoo.define('carry_bag_pos.models', function (require) { +"use strict"; +var {PosGlobalState} = require('point_of_sale.models'); +const Registries = require('point_of_sale.Registries'); +const GlobalState = (PosGlobalState) => class GlobalState extends PosGlobalState { + /** + *Override PosGlobalState to load fields in pos session + */ + async _processData(loadedData){ + // Load res config settings model + await super._processData(...arguments); + this.res_config_settings = loadedData['res.config.settings']; + } +} +Registries.Model.extend(PosGlobalState,GlobalState) +}); diff --git a/carry_bag_pos/static/src/xml/bag_charges_button_templates.xml b/carry_bag_pos/static/src/xml/bag_charges_button_templates.xml new file mode 100755 index 000000000..dfe85e47b --- /dev/null +++ b/carry_bag_pos/static/src/xml/bag_charges_button_templates.xml @@ -0,0 +1,11 @@ + + + + +
+ + Carry Bag +
+
+
diff --git a/carry_bag_pos/static/src/xml/category_screen_templates.xml b/carry_bag_pos/static/src/xml/category_screen_templates.xml new file mode 100755 index 000000000..508424d38 --- /dev/null +++ b/carry_bag_pos/static/src/xml/category_screen_templates.xml @@ -0,0 +1,51 @@ + + + + +
+
+
+ +
+
+
+
+
diff --git a/carry_bag_pos/views/res_config_settings_views.xml b/carry_bag_pos/views/res_config_settings_views.xml new file mode 100755 index 000000000..adb71b35a --- /dev/null +++ b/carry_bag_pos/views/res_config_settings_views.xml @@ -0,0 +1,32 @@ + + + + + + res.config.settings.view.form.inherit.carry.bag.pos + + res.config.settings + + + + +
+
+ +
+
+
+
+
+
+
+