Browse Source

July 11: [ADD] Initial commit 'carry_bag_pos'

pull/254/merge
RisvanaCybro 10 months ago
parent
commit
be87f61fad
  1. 46
      carry_bag_pos/README.rst
  2. 22
      carry_bag_pos/__init__.py
  3. 53
      carry_bag_pos/__manifest__.py
  4. 6
      carry_bag_pos/doc/RELEASE_NOTES.md
  5. 23
      carry_bag_pos/models/__init__.py
  6. 33
      carry_bag_pos/models/pos_config.py
  7. 52
      carry_bag_pos/models/pos_session.py
  8. BIN
      carry_bag_pos/static/description/assets/icons/check.png
  9. BIN
      carry_bag_pos/static/description/assets/icons/chevron.png
  10. BIN
      carry_bag_pos/static/description/assets/icons/cogs.png
  11. BIN
      carry_bag_pos/static/description/assets/icons/consultation.png
  12. BIN
      carry_bag_pos/static/description/assets/icons/ecom-black.png
  13. BIN
      carry_bag_pos/static/description/assets/icons/education-black.png
  14. BIN
      carry_bag_pos/static/description/assets/icons/hotel-black.png
  15. BIN
      carry_bag_pos/static/description/assets/icons/license.png
  16. BIN
      carry_bag_pos/static/description/assets/icons/lifebuoy.png
  17. BIN
      carry_bag_pos/static/description/assets/icons/manufacturing-black.png
  18. BIN
      carry_bag_pos/static/description/assets/icons/pos-black.png
  19. BIN
      carry_bag_pos/static/description/assets/icons/puzzle.png
  20. BIN
      carry_bag_pos/static/description/assets/icons/restaurant-black.png
  21. BIN
      carry_bag_pos/static/description/assets/icons/service-black.png
  22. BIN
      carry_bag_pos/static/description/assets/icons/trading-black.png
  23. BIN
      carry_bag_pos/static/description/assets/icons/training.png
  24. BIN
      carry_bag_pos/static/description/assets/icons/update.png
  25. BIN
      carry_bag_pos/static/description/assets/icons/user.png
  26. BIN
      carry_bag_pos/static/description/assets/icons/wrench.png
  27. BIN
      carry_bag_pos/static/description/assets/misc/categories.png
  28. BIN
      carry_bag_pos/static/description/assets/misc/check-box.png
  29. BIN
      carry_bag_pos/static/description/assets/misc/compass.png
  30. BIN
      carry_bag_pos/static/description/assets/misc/corporate.png
  31. BIN
      carry_bag_pos/static/description/assets/misc/customer-support.png
  32. BIN
      carry_bag_pos/static/description/assets/misc/cybrosys-logo.png
  33. BIN
      carry_bag_pos/static/description/assets/misc/features.png
  34. BIN
      carry_bag_pos/static/description/assets/misc/logo.png
  35. BIN
      carry_bag_pos/static/description/assets/misc/pictures.png
  36. BIN
      carry_bag_pos/static/description/assets/misc/pie-chart.png
  37. BIN
      carry_bag_pos/static/description/assets/misc/right-arrow.png
  38. BIN
      carry_bag_pos/static/description/assets/misc/star.png
  39. BIN
      carry_bag_pos/static/description/assets/misc/support.png
  40. BIN
      carry_bag_pos/static/description/assets/misc/whatsapp.png
  41. BIN
      carry_bag_pos/static/description/assets/modules/1.png
  42. BIN
      carry_bag_pos/static/description/assets/modules/2.png
  43. BIN
      carry_bag_pos/static/description/assets/modules/3.png
  44. BIN
      carry_bag_pos/static/description/assets/modules/4.png
  45. BIN
      carry_bag_pos/static/description/assets/modules/5.gif
  46. BIN
      carry_bag_pos/static/description/assets/modules/5.png
  47. BIN
      carry_bag_pos/static/description/assets/modules/6.png
  48. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_01.png
  49. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_02.png
  50. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_03.png
  51. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_04.png
  52. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_05.png
  53. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_06.png
  54. BIN
      carry_bag_pos/static/description/assets/screenshots/carry_bag_07.png
  55. BIN
      carry_bag_pos/static/description/assets/screenshots/hero.gif
  56. BIN
      carry_bag_pos/static/description/banner.jpg
  57. BIN
      carry_bag_pos/static/description/icon.png
  58. 661
      carry_bag_pos/static/description/index.html
  59. 47
      carry_bag_pos/static/src/js/bag_charges_button.js
  60. 26
      carry_bag_pos/static/src/js/bag_charges_screen.js
  61. 16
      carry_bag_pos/static/src/js/models.js
  62. 11
      carry_bag_pos/static/src/xml/bag_charges_button_templates.xml
  63. 51
      carry_bag_pos/static/src/xml/category_screen_templates.xml
  64. 29
      carry_bag_pos/views/res_config_settings_views.xml

46
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 <https://cybrosys.com/>`__
Credits
-------
* Developer: (V15) Mruthul Raj, 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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
carry_bag_pos/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mruthul(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

53
carry_bag_pos/__manifest__.py

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mruthul(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Bag Charges in POS',
'version': '15.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',
],
'web.assets_qweb': [
'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.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

6
carry_bag_pos/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <carry_bag_pos>
#### 10.07.2023
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Bag Charges in POS

23
carry_bag_pos/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mruthul(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import pos_config
from . import pos_session

33
carry_bag_pos/models/pos_config.py

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mruthul(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
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")

52
carry_bag_pos/models/pos_session.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mruthul(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
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'])

BIN
carry_bag_pos/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
carry_bag_pos/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
carry_bag_pos/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
carry_bag_pos/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
carry_bag_pos/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
carry_bag_pos/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
carry_bag_pos/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
carry_bag_pos/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
carry_bag_pos/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
carry_bag_pos/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
carry_bag_pos/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
carry_bag_pos/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
carry_bag_pos/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
carry_bag_pos/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
carry_bag_pos/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
carry_bag_pos/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
carry_bag_pos/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
carry_bag_pos/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
carry_bag_pos/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
carry_bag_pos/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
carry_bag_pos/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
carry_bag_pos/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
carry_bag_pos/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
carry_bag_pos/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
carry_bag_pos/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
carry_bag_pos/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
carry_bag_pos/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
carry_bag_pos/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
carry_bag_pos/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
carry_bag_pos/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
carry_bag_pos/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
carry_bag_pos/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
carry_bag_pos/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
carry_bag_pos/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
carry_bag_pos/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
carry_bag_pos/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
carry_bag_pos/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
carry_bag_pos/static/description/assets/modules/5.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
carry_bag_pos/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
carry_bag_pos/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_04.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_05.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_06.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/carry_bag_07.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

BIN
carry_bag_pos/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
carry_bag_pos/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
carry_bag_pos/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

661
carry_bag_pos/static/description/index.html

@ -0,0 +1,661 @@
<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: #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>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">
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Bag Charges in POS</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Add Carry Bags to Point of Sale Orders</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">
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.
</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;">No Additional Configuration Required</span>
</div>
<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 15.0 Community & Enterprise</span>
</div>
<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;">Add Carry Bag Option in POS Orders</span>
</div>
<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;">Users can Select Carry Bag Styles and Size from POS Session</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="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Carry Bag in POS</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Create new Bag Category</p>
<img src="assets/screenshots/carry_bag_01.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Add Bags to this Category.
</p>
<img src="assets/screenshots/carry_bag_02.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Enable Bag Charges in Configuration Settings</h4>
<img src="assets/screenshots/carry_bag_03.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Click on the Button to Choose Carry Bags</h4>
<img src="assets/screenshots/carry_bag_04.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Choose Bags to add into POS Order</h4>
<img src="assets/screenshots/carry_bag_05.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Bag Charges are Added with POS Order</h4>
<img src="assets/screenshots/carry_bag_06.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Bag Charges are also Added in Receipt</h4>
<img src="assets/screenshots/carry_bag_07.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/pos_order_types/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/1.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/15.0/pos_product_addons/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/2.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/15.0/dashboard_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/product_return_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/4.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/15.0/point_of_sale_logo"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/5.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/15.0/pos_chatter/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;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="right:-25px;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 SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</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: #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>
</section>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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 &amp; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12"
style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707"
target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row"
style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center"
style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px"
height="auto"/>
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->

47
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;
});

26
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;
});

16
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)
});

11
carry_bag_pos/static/src/xml/bag_charges_button_templates.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template for creating button in pos session-->
<templates id="Bag_Charges_Button" xml:space="preserve">
<t t-name="BagChargesButton" owl="1">
<div class="control-button" style="color:black">
<i class="fa fa-shopping-bag" aria-label="Bag Buttons"
title="Bag Buttons"/>
Carry Bag
</div>
</t>
</templates>

51
carry_bag_pos/static/src/xml/category_screen_templates.xml

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template for the category screen-->
<templates id="template" xml:space="preserve">
<t t-name="CategoryScreen" owl="1">
<div class="screen-content">
<section class="full-content">
<div class="client-window">
<div class="modal-dialog">
<div class="popup widget order-scroller touch scrollable"
style="width:516px;height: 545px;font-size: 13px;">
<div style="margin-top:30px;">
<header>ADD YOUR CARRY BAGS</header>
</div>
<div class="body traceback" style="height: 400px;">
<div class="div-container">
<div class="product-list"
style="margin-top: 50px;">
<div class="product bag-category"
t-foreach="props.bag_products"
t-as="item" t-key="item.id"
t-att-data-product-id="item.id"
t-on-click="click">
<div class="product-img"
style="width: 100%;height: 100%;">
<img t-att-src="`/web/image?model=product.product&amp;field=image_128&amp;id=${item.id}&amp;unique=${item.write_date}`"/>
</div>
<div class="product-content">
<span class="product-name">
<t t-esc="item.display_name"/>
</span>
</div>
<div class="product-content">
<span class="product-price">
<t t-esc="env.pos.format_currency(item.lst_price)"/>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="button cancel" t-on-click="back"
style="background-color: #d9534f;color: white;">
Close
</div>
</div>
</div>
</div>
</section>
</div>
</t>
</templates>

29
carry_bag_pos/views/res_config_settings_views.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inherited view of res config settings-->
<record id="carry_bag_pos_pos_config_view_form" model="ir.ui.view">
<field name="name">pos.config.view.form</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='pos-loyalty']" position="after">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="bag_charges" readonly="False"/>
</div>
<div class="o_setting_right_pane">
<label for="bag_charges"/>
<div class="text-muted">
Add Carry Bags to Your Order
</div>
<div class="content-group mt16"
attrs="{'invisible': [('bag_charges', '=', False)]}">
<field name="bag_category_id"
readonly="False"/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save