diff --git a/salesperson_pos_order_line/README.rst b/salesperson_pos_order_line/README.rst new file mode 100644 index 000000000..1f48ed3d8 --- /dev/null +++ b/salesperson_pos_order_line/README.rst @@ -0,0 +1,42 @@ +.. 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 + +Sales Person On POS Order Line +=============================== +This module is used to set sales persons on pos order line + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer : V16 Mruthul Raj, Contact: odoo@cybrosys.com + +License +------- +General Public License, Version 3 (AGPL v3). +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/salesperson_pos_order_line/__init__.py b/salesperson_pos_order_line/__init__.py new file mode 100644 index 000000000..dd0e0d37b --- /dev/null +++ b/salesperson_pos_order_line/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from .import models diff --git a/salesperson_pos_order_line/__manifest__.py b/salesperson_pos_order_line/__manifest__.py new file mode 100644 index 000000000..25f78f323 --- /dev/null +++ b/salesperson_pos_order_line/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Sales Person On POS Order Line', + 'Version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'This module is used to set sales persons on pos order line', + 'description': 'This module allows you to assign salespersons to order' + 'lines in the Point of Sale (POS)', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_orderline_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'salesperson_pos_order_line/static/src/js/pos_load_data.js', + 'salesperson_pos_order_line/static/src/js/pos_screen.js', + 'salesperson_pos_order_line/static/src/js/pos_orderline.js', + 'salesperson_pos_order_line/static/src/js/pos_popup.js', + 'salesperson_pos_order_line/static/src/xml/pos_screen_templates.xml', + 'salesperson_pos_order_line/static/src/xml/pos_popup_templates.xml', + 'salesperson_pos_order_line/static/src/xml/orderline_templates.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/salesperson_pos_order_line/doc/RELEASE_NOTES.md b/salesperson_pos_order_line/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..274d3bf74 --- /dev/null +++ b/salesperson_pos_order_line/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 15.11.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Sales Person On POS Order Line diff --git a/salesperson_pos_order_line/models/__init__.py b/salesperson_pos_order_line/models/__init__.py new file mode 100644 index 000000000..805f6fd3f --- /dev/null +++ b/salesperson_pos_order_line/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import pos_session +from . import pos_order diff --git a/salesperson_pos_order_line/models/pos_order.py b/salesperson_pos_order_line/models/pos_order.py new file mode 100644 index 000000000..c90a88e61 --- /dev/null +++ b/salesperson_pos_order_line/models/pos_order.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class PosOrder(models.Model): + """ The class PosOrder is used to inherit pos.order.line """ + + _inherit = 'pos.order.line' + user_id = fields.Many2one('res.users', string='Salesperson', + help="You can see salesperson here") diff --git a/salesperson_pos_order_line/models/pos_session.py b/salesperson_pos_order_line/models/pos_session.py new file mode 100644 index 000000000..fced3ee01 --- /dev/null +++ b/salesperson_pos_order_line/models/pos_session.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import models + + +class PosSession(models.Model): + """The class PosSession is used to inherit pos.session""" + + _inherit = 'pos.session' + + def load_pos_data(self): + """Load POS data and add `res_users` to the response dictionary. + return: A dictionary containing the POS data. + """ + res = super(PosSession, self).load_pos_data() + res['res_users'] = self.env['res.users'].search_read(fields=['name']) + return res diff --git a/salesperson_pos_order_line/static/description/assets/icons/check.png b/salesperson_pos_order_line/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/check.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/chevron.png b/salesperson_pos_order_line/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/chevron.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/cogs.png b/salesperson_pos_order_line/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/cogs.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/consultation.png b/salesperson_pos_order_line/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/consultation.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/ecom-black.png b/salesperson_pos_order_line/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/ecom-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/education-black.png b/salesperson_pos_order_line/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/education-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/hotel-black.png b/salesperson_pos_order_line/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/hotel-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/license.png b/salesperson_pos_order_line/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/license.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/lifebuoy.png b/salesperson_pos_order_line/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/lifebuoy.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/logo.png b/salesperson_pos_order_line/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/logo.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/manufacturing-black.png b/salesperson_pos_order_line/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/manufacturing-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/pos-black.png b/salesperson_pos_order_line/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/pos-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/puzzle.png b/salesperson_pos_order_line/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/puzzle.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/restaurant-black.png b/salesperson_pos_order_line/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/restaurant-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/service-black.png b/salesperson_pos_order_line/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/service-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/trading-black.png b/salesperson_pos_order_line/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/trading-black.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/training.png b/salesperson_pos_order_line/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/training.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/update.png b/salesperson_pos_order_line/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/update.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/user.png b/salesperson_pos_order_line/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/user.png differ diff --git a/salesperson_pos_order_line/static/description/assets/icons/wrench.png b/salesperson_pos_order_line/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/icons/wrench.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/categories.png b/salesperson_pos_order_line/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/categories.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/check-box.png b/salesperson_pos_order_line/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/check-box.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/compass.png b/salesperson_pos_order_line/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/compass.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/corporate.png b/salesperson_pos_order_line/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/corporate.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/customer-support.png b/salesperson_pos_order_line/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/customer-support.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/cybrosys-logo.png b/salesperson_pos_order_line/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/cybrosys-logo.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/features.png b/salesperson_pos_order_line/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/features.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/logo.png b/salesperson_pos_order_line/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/logo.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/pictures.png b/salesperson_pos_order_line/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/pictures.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/pie-chart.png b/salesperson_pos_order_line/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/pie-chart.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/right-arrow.png b/salesperson_pos_order_line/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/right-arrow.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/star.png b/salesperson_pos_order_line/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/star.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/support.png b/salesperson_pos_order_line/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/support.png differ diff --git a/salesperson_pos_order_line/static/description/assets/misc/whatsapp.png b/salesperson_pos_order_line/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/misc/whatsapp.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/1.png b/salesperson_pos_order_line/static/description/assets/modules/1.png new file mode 100644 index 000000000..17c14989e Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/1.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/2.png b/salesperson_pos_order_line/static/description/assets/modules/2.png new file mode 100644 index 000000000..d1d3775d6 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/2.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/3.png b/salesperson_pos_order_line/static/description/assets/modules/3.png new file mode 100644 index 000000000..dcbd0cb06 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/3.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/4.png b/salesperson_pos_order_line/static/description/assets/modules/4.png new file mode 100644 index 000000000..5ecc4d883 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/4.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/5.png b/salesperson_pos_order_line/static/description/assets/modules/5.png new file mode 100644 index 000000000..5514bb8d4 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/5.png differ diff --git a/salesperson_pos_order_line/static/description/assets/modules/6.png b/salesperson_pos_order_line/static/description/assets/modules/6.png new file mode 100644 index 000000000..93c573093 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/modules/6.png differ diff --git a/salesperson_pos_order_line/static/description/assets/screenshots/hero.gif b/salesperson_pos_order_line/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..578328111 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/screenshots/hero.gif differ diff --git a/salesperson_pos_order_line/static/description/assets/screenshots/pos2.png b/salesperson_pos_order_line/static/description/assets/screenshots/pos2.png new file mode 100644 index 000000000..279c07f83 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/screenshots/pos2.png differ diff --git a/salesperson_pos_order_line/static/description/assets/screenshots/pos3.png b/salesperson_pos_order_line/static/description/assets/screenshots/pos3.png new file mode 100644 index 000000000..83a537668 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/screenshots/pos3.png differ diff --git a/salesperson_pos_order_line/static/description/assets/screenshots/pos5.png b/salesperson_pos_order_line/static/description/assets/screenshots/pos5.png new file mode 100644 index 000000000..96239de0a Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/screenshots/pos5.png differ diff --git a/salesperson_pos_order_line/static/description/assets/screenshots/pos6.png b/salesperson_pos_order_line/static/description/assets/screenshots/pos6.png new file mode 100644 index 000000000..976563893 Binary files /dev/null and b/salesperson_pos_order_line/static/description/assets/screenshots/pos6.png differ diff --git a/salesperson_pos_order_line/static/description/banner.jpg b/salesperson_pos_order_line/static/description/banner.jpg new file mode 100644 index 000000000..4e72bcfa4 Binary files /dev/null and b/salesperson_pos_order_line/static/description/banner.jpg differ diff --git a/salesperson_pos_order_line/static/description/icon.png b/salesperson_pos_order_line/static/description/icon.png new file mode 100644 index 000000000..9ef86f98c Binary files /dev/null and b/salesperson_pos_order_line/static/description/icon.png differ diff --git a/salesperson_pos_order_line/static/description/index.html b/salesperson_pos_order_line/static/description/index.html new file mode 100644 index 000000000..1a8e71e18 --- /dev/null +++ b/salesperson_pos_order_line/static/description/index.html @@ -0,0 +1,640 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Sales Person On POS Order line

+

+ Now You Can Add Salesperson for Products in POS Order + Line +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Add Sales Person per product in POS Order Line +
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Enterprise and Community compatible. +
+
+ + Set Salesperson on Pos Order Line. +
+ + +
+
+ + + +
+
+ + +
+

+ Screenshots +

+
+
+
+ +
+

+ After installing, you will see the Salesperson button. +

+ +
+
+

+ Click the button and select the Salesperson.

+ +
+
+

+ You can Salesperson on the Order Line. +

+ +
+
+

+ Assigned Salesperson can be seen in respective orders +

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

+ 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

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/salesperson_pos_order_line/static/src/js/pos_load_data.js b/salesperson_pos_order_line/static/src/js/pos_load_data.js new file mode 100644 index 000000000..cfe8c1f78 --- /dev/null +++ b/salesperson_pos_order_line/static/src/js/pos_load_data.js @@ -0,0 +1,16 @@ +odoo.define('salesperson_pos_order_line.pos', function(require) { + "use strict"; + var { PosGlobalState } = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); + /** + * This function creates a new class that extends PosGlobalState with an additional property res_users. + * The res_users property is loaded from the backend and contains all users in the system. + */ + const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + await super._processData(...arguments); + this.res_users = loadedData['res_users']; + } + } + Registries.Model.extend(PosGlobalState, NewPosGlobalState); +}); diff --git a/salesperson_pos_order_line/static/src/js/pos_orderline.js b/salesperson_pos_order_line/static/src/js/pos_orderline.js new file mode 100644 index 000000000..49dc70ea7 --- /dev/null +++ b/salesperson_pos_order_line/static/src/js/pos_orderline.js @@ -0,0 +1,48 @@ +odoo.define('salesperson_pos_order_line.Orderline', function(require) { + 'use strict'; + const { Orderline } = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); + /** + * A class that extends the default `Orderline` class to include a `salesperson` property + * that can be added to an order line. + */ + const SalesPersonOrderline = (Orderline) => class SalesPersonOrderline extends Orderline { + /** + * Initializes a new instance of the `SalesPersonOrderline` class. + * + * @param {Object} obj - The order line object. + * @param {Object} options - The options for the order line. + */ + constructor(obj, options) { + super(obj, options) + if (options.json) { + this.salesperson = options.json.salesperson; + } + } + /** + * Initializes the `SalesPersonOrderline` instance from JSON. + * + * @param {Object} json - The JSON object to initialize from. + */ + init_from_JSON(json) { + super.init_from_JSON(json) + this.salesperson = json.salesperson; + } + /** + * Exports the `SalesPersonOrderline` instance as a JSON object. + * + * @returns {Object} - The JSON object that represents the order line. + */ + export_as_JSON() { + if (this.salesperson) { + var user_id = this.salesperson[0] + } else { + var user_id = '' + } + return _.extend(super.export_as_JSON(...arguments), { + user_id: user_id + }) + } + } + Registries.Model.extend(Orderline, SalesPersonOrderline); +}); diff --git a/salesperson_pos_order_line/static/src/js/pos_popup.js b/salesperson_pos_order_line/static/src/js/pos_popup.js new file mode 100644 index 000000000..2a0a19bb6 --- /dev/null +++ b/salesperson_pos_order_line/static/src/js/pos_popup.js @@ -0,0 +1,55 @@ +/**@odoo-module **/ +import AbstractAwaitablePopup from "point_of_sale.AbstractAwaitablePopup"; +import Registries from "point_of_sale.Registries"; +const { useRef } = owl; +var core = require('web.core'); +const { Gui } = require('point_of_sale.Gui'); +var _t = core._t; +class SalesPersonPopup extends AbstractAwaitablePopup { + /** + * Set up the custom popup component and initialize its reference to the salesperson dropdown. + */ + setup() { + super.setup(); + this.salePersonRef = useRef('salePersonRef') + } + /** + * Confirm the selection of a salesperson for the selected orderline, and close the popup. + * If no orderline is selected, an error message is displayed instead. + */ + confirm() { + if (this.env.pos.selectedOrder.selected_orderline) { + var product_id = this.env.pos.selectedOrder.selected_orderline.product.id + var product = this.env.pos.db.get_product_by_id(product_id); + let option = this.salePersonRef.el.selectedOptions[0] + this.env.pos.selectedOrder.selected_orderline.salesperson = [parseInt(option.id), option.value] + this.env.posbus.trigger("close-popup", { + popupId: this.props.id, + response: { + confirmed: true, + payload: null, + }, + }); + } else { + Gui.showPopup("ErrorPopup", { + 'title': _t("Error"), + 'body': _.str.sprintf(_t('You should add product first')), + }); + return false; + } + } + /** + * Cancel the selection of a salesperson for the selected orderline, and close the popup. + */ + cancel() { + this.env.posbus.trigger("close-popup", { + popupId: this.props.id, + response: { + confirmed: false, + payload: null, + }, + }); + } +} +SalesPersonPopup.template = "SalesPersonPopup"; +Registries.Component.add(SalesPersonPopup); diff --git a/salesperson_pos_order_line/static/src/js/pos_screen.js b/salesperson_pos_order_line/static/src/js/pos_screen.js new file mode 100644 index 000000000..0fa5b4405 --- /dev/null +++ b/salesperson_pos_order_line/static/src/js/pos_screen.js @@ -0,0 +1,61 @@ +/**@odoo-module **/ +import PosComponent from "point_of_sale.PosComponent"; +import ProductScreen from "point_of_sale.ProductScreen"; +import { useListener } from "@web/core/utils/hooks"; +import Registries from "point_of_sale.Registries"; +import { isConnectionError } from "point_of_sale.utils"; + +export class SetProductListButton extends PosComponent { + /** + * Sets up the component and adds a click listener to the button. + */ + setup() { + super.setup(); + useListener("click", this.onClick); + } + /** + * Returns an array of product objects fetched from the Point of Sale database and sorted by name. + * + * @returns {Array} The product list. + */ + get productsList() { + let list = []; + list = this.env.pos.db.get_product_by_category( + this.env.pos.selectedCategoryId + ); + return list.sort(function(a, b) { + return a.display_name.localeCompare(b.display_name); + }); + } + /** + * Handles the click event on the button. Opens a CustomDemoPopup allowing the user to set a salesperson for the selected product. + * + * @throws {Error} If an error occurs while fetching the product list or showing the CustomDemoPopup. + */ + async onClick() { + try { + let list = this.productsList; + this.showPopup("SalesPersonPopup", { + 'user_id': this.env.pos.res_users + }); + + } catch (error) { + if (isConnectionError(error)) { + this.showPopup("ErrorPopup", { + title: this.env._t("Network Error"), + body: this.env._t("Cannot access Product screen if offline."), + }); + } else { + throw error; + } + } + } +} +SetProductListButton.template = "SalesPersonButton"; +ProductScreen.addControlButton({ + component: SetProductListButton, + condition: function() { + return true; + }, +}); +Registries.Component.add(SetProductListButton); diff --git a/salesperson_pos_order_line/static/src/xml/orderline_templates.xml b/salesperson_pos_order_line/static/src/xml/orderline_templates.xml new file mode 100644 index 000000000..756593928 --- /dev/null +++ b/salesperson_pos_order_line/static/src/xml/orderline_templates.xml @@ -0,0 +1,15 @@ + + + + + +
+ + Salesperson: +
+
+
+
+
diff --git a/salesperson_pos_order_line/static/src/xml/pos_popup_templates.xml b/salesperson_pos_order_line/static/src/xml/pos_popup_templates.xml new file mode 100644 index 000000000..a4f92b17b --- /dev/null +++ b/salesperson_pos_order_line/static/src/xml/pos_popup_templates.xml @@ -0,0 +1,43 @@ + + + + + + + diff --git a/salesperson_pos_order_line/static/src/xml/pos_screen_templates.xml b/salesperson_pos_order_line/static/src/xml/pos_screen_templates.xml new file mode 100644 index 000000000..0c16da321 --- /dev/null +++ b/salesperson_pos_order_line/static/src/xml/pos_screen_templates.xml @@ -0,0 +1,10 @@ + + + + +
+ Salesperson +
+
+
diff --git a/salesperson_pos_order_line/views/pos_orderline_views.xml b/salesperson_pos_order_line/views/pos_orderline_views.xml new file mode 100644 index 000000000..c4035bf18 --- /dev/null +++ b/salesperson_pos_order_line/views/pos_orderline_views.xml @@ -0,0 +1,16 @@ + + + + + pos.order.view.inherit.salesperson.pos.order.line + + pos.order + + + + + + + +