diff --git a/pos_data_auto_sync/README.rst b/pos_data_auto_sync/README.rst new file mode 100644 index 000000000..7c4c6518e --- /dev/null +++ b/pos_data_auto_sync/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Product Auto Sync +===================== +This module will help you to create or update product automatically in multiple +running sessions without reloading the sessions. + +Configuration +============= +No additional configuration is needed to use this module. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V16) Amaya Aravind, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_data_auto_sync/__init__.py b/pos_data_auto_sync/__init__.py new file mode 100644 index 000000000..b2e5098cb --- /dev/null +++ b/pos_data_auto_sync/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind() +# +# 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/pos_data_auto_sync/__manifest__.py b/pos_data_auto_sync/__manifest__.py new file mode 100644 index 000000000..d2486b839 --- /dev/null +++ b/pos_data_auto_sync/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'POS Product Auto Sync', + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Create or update product automatically in multiple sessions', + 'description': "This module crafted by Cybrosys Technologies provides an " + "option to create or update product automatically in " + "multiple sessions without reloading the sessions.It will " + "also update the product information (eg: name, price, " + "tax) in real-time.", + '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': [ + 'pos_data_auto_sync/static/src/js/db.js', + 'pos_data_auto_sync/static/src/js/PosSession.js', + 'pos_data_auto_sync/static/src/js/ProductWidget.js', + ] + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_data_auto_sync/doc/RELEASE_NOTES.md b/pos_data_auto_sync/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6c643aa41 --- /dev/null +++ b/pos_data_auto_sync/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 28.09.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial Commit for POS Product Auto Sync diff --git a/pos_data_auto_sync/models/__init__.py b/pos_data_auto_sync/models/__init__.py new file mode 100644 index 000000000..971ce80fb --- /dev/null +++ b/pos_data_auto_sync/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind() +# +# 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 res_config_settings diff --git a/pos_data_auto_sync/models/pos_session.py b/pos_data_auto_sync/models/pos_session.py new file mode 100644 index 000000000..baa3de8d3 --- /dev/null +++ b/pos_data_auto_sync/models/pos_session.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind() +# +# 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): + """Inherited model POS Session for loading field in res.config.settings + into pos session. + Methods: + _pos_ui_models_to_load(self): + To load model res config settings to pos session. + _loader_params_res_config_settings(self): + Loads field allow_data_auto_sync to pos session. + _get_pos_ui_res_config_settings(self, params): + Load res config settings parameters to pos session.""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """ Load model res config settings to pos session. + List: Returns list with model name.""" + result = super()._pos_ui_models_to_load() + result += [ + 'res.config.settings', + ] + return result + + def _loader_params_res_config_settings(self): + """ Loads field allow_data_auto_sync to pos session + dictionary: Returns dictionary of search params with fields.""" + return { + 'search_params': { + 'fields': ['allow_data_auto_sync'], + }, + } + + def _get_pos_ui_res_config_settings(self, params): + """ Load res config settings parameters to pos session. + params(dict):dictionary of search param with dictionary of + field to load. + list: Returns list of dictionary with search param values.""" + return self.env['res.config.settings'].search_read( + **params['search_params']) diff --git a/pos_data_auto_sync/models/res_config_settings.py b/pos_data_auto_sync/models/res_config_settings.py new file mode 100644 index 000000000..3f5ab1c8a --- /dev/null +++ b/pos_data_auto_sync/models/res_config_settings.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """ Inherited res.config.settings for adding a new field.""" + _inherit = 'res.config.settings' + + allow_data_auto_sync = fields.Boolean(string='Allow Auto Sync Product ' + 'Data', + help='If enabled, it will ' + 'automatically sync data into' + ' the POS.', + config_parameter='pos_data_auto_sync.' + 'allow_data_auto_sync') diff --git a/pos_data_auto_sync/static/description/assets/icons/check.png b/pos_data_auto_sync/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/check.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/chevron.png b/pos_data_auto_sync/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/chevron.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/cogs.png b/pos_data_auto_sync/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/cogs.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/consultation.png b/pos_data_auto_sync/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/consultation.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/ecom-black.png b/pos_data_auto_sync/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/ecom-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/education-black.png b/pos_data_auto_sync/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/education-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/hotel-black.png b/pos_data_auto_sync/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/hotel-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/license.png b/pos_data_auto_sync/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/license.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/lifebuoy.png b/pos_data_auto_sync/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/manufacturing-black.png b/pos_data_auto_sync/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/pos-black.png b/pos_data_auto_sync/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/pos-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/puzzle.png b/pos_data_auto_sync/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/puzzle.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/restaurant-black.png b/pos_data_auto_sync/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/service-black.png b/pos_data_auto_sync/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/service-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/trading-black.png b/pos_data_auto_sync/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/trading-black.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/training.png b/pos_data_auto_sync/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/training.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/update.png b/pos_data_auto_sync/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/update.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/user.png b/pos_data_auto_sync/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/user.png differ diff --git a/pos_data_auto_sync/static/description/assets/icons/wrench.png b/pos_data_auto_sync/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/icons/wrench.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/categories.png b/pos_data_auto_sync/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/categories.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/check-box.png b/pos_data_auto_sync/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/check-box.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/compass.png b/pos_data_auto_sync/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/compass.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/corporate.png b/pos_data_auto_sync/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/corporate.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/customer-support.png b/pos_data_auto_sync/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/customer-support.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/cybrosys-logo.png b/pos_data_auto_sync/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/features.png b/pos_data_auto_sync/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/features.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/logo.png b/pos_data_auto_sync/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/logo.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/pictures.png b/pos_data_auto_sync/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/pictures.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/pie-chart.png b/pos_data_auto_sync/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/pie-chart.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/right-arrow.png b/pos_data_auto_sync/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/right-arrow.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/star.png b/pos_data_auto_sync/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/star.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/support.png b/pos_data_auto_sync/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/support.png differ diff --git a/pos_data_auto_sync/static/description/assets/misc/whatsapp.png b/pos_data_auto_sync/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/misc/whatsapp.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/1.png b/pos_data_auto_sync/static/description/assets/modules/1.png new file mode 100644 index 000000000..f5c24146b Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/1.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/2.png b/pos_data_auto_sync/static/description/assets/modules/2.png new file mode 100644 index 000000000..05c8b4a69 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/2.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/3.png b/pos_data_auto_sync/static/description/assets/modules/3.png new file mode 100644 index 000000000..a77027978 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/3.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/4.png b/pos_data_auto_sync/static/description/assets/modules/4.png new file mode 100644 index 000000000..c247ba6ac Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/4.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/5.png b/pos_data_auto_sync/static/description/assets/modules/5.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/5.png differ diff --git a/pos_data_auto_sync/static/description/assets/modules/6.png b/pos_data_auto_sync/static/description/assets/modules/6.png new file mode 100644 index 000000000..c56c96bae Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/modules/6.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/1.png b/pos_data_auto_sync/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..acbae9513 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/1.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/2.png b/pos_data_auto_sync/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..c83c173ab Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/2.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/3.png b/pos_data_auto_sync/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..fbae75800 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/3.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/4.png b/pos_data_auto_sync/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..627796ea8 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/4.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/5.png b/pos_data_auto_sync/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..4b934f404 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/5.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/6.png b/pos_data_auto_sync/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..2eec59d86 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/6.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/7.png b/pos_data_auto_sync/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..098baf547 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/7.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/8.png b/pos_data_auto_sync/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..928aaeb82 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/8.png differ diff --git a/pos_data_auto_sync/static/description/assets/screenshots/hero.gif b/pos_data_auto_sync/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..8dee96524 Binary files /dev/null and b/pos_data_auto_sync/static/description/assets/screenshots/hero.gif differ diff --git a/pos_data_auto_sync/static/description/banner.png b/pos_data_auto_sync/static/description/banner.png new file mode 100644 index 000000000..f52018e60 Binary files /dev/null and b/pos_data_auto_sync/static/description/banner.png differ diff --git a/pos_data_auto_sync/static/description/icon.png b/pos_data_auto_sync/static/description/icon.png new file mode 100644 index 000000000..4914c1c1a Binary files /dev/null and b/pos_data_auto_sync/static/description/icon.png differ diff --git a/pos_data_auto_sync/static/description/index.html b/pos_data_auto_sync/static/description/index.html new file mode 100644 index 000000000..943db0073 --- /dev/null +++ b/pos_data_auto_sync/static/description/index.html @@ -0,0 +1,649 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ POS Product Auto Sync

+

+ Real-Time Create and Update of Products into Multiple Running POS Sessions.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This Module will help you to Create Products Automatically in + Multiple Running Sessions Without Reloading the Sessions.It will also + Update the Product Information (eg: Name, Price, Tax) in Real-time. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + You can Allow or Deny Syncing of Product Data just by Enabling or Disabling the Boolean Field in the Configuration Settings. +
+
+ + Real-Time Create and Update of Products without Reloading the Session. +
+
+ + Almost all Information of Products will be Updated like Name,Price,Tax etc. +
+
+ + Applicable in the Case of Multiple Sessions. +
+
+ + Compatible with Enterprise, Community and Odoo.sh. +
+
+
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ There will be a Field in Configuration Settings to Enable the + Feature. +

+ +
+
+

+ After Enabling Allow Auto Sync Product Data field, Open the POS + Session. +

+ +
+
+

+ Open the POS back-end and Session in two tabs. After that Create + a New Product in the Back-end. +

+ +
+
+

+ As you can see, it will be Created in the Session. +

+ +
+
+

+ You can also use Search for Finding the Product. +

+ +
+
+

+ You can change Price, Tax, Name etc. of any Product. +

+ +
+
+

+ It will be also Updated to the Session.Almost all Information of + Products will be Updated like Name,Price,Tax etc. +

+ +
+
+

+ This Feature is Applicable for Multiple Running Sessions.You can + try by Opening the Session in a Different Browser. +

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

+ 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/pos_data_auto_sync/static/src/js/PosSession.js b/pos_data_auto_sync/static/src/js/PosSession.js new file mode 100644 index 000000000..c7635f952 --- /dev/null +++ b/pos_data_auto_sync/static/src/js/PosSession.js @@ -0,0 +1,12 @@ +/** @odoo-module **/ + +var { PosGlobalState } = require('point_of_sale.models'); +const Registries = require('point_of_sale.Registries'); +const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + // Load field that in res.config.settings into pos. + await super._processData(...arguments); + this.res_allow_sync = loadedData['res.config.settings']; + } +} +Registries.Model.extend(PosGlobalState, NewPosGlobalState); diff --git a/pos_data_auto_sync/static/src/js/ProductWidget.js b/pos_data_auto_sync/static/src/js/ProductWidget.js new file mode 100644 index 000000000..4087fa533 --- /dev/null +++ b/pos_data_auto_sync/static/src/js/ProductWidget.js @@ -0,0 +1,25 @@ +/** @odoo-module **/ + +const ProductWidget = require('point_of_sale.ProductsWidget'); +const { useListener } = require("@web/core/utils/hooks"); +const Registries = require('point_of_sale.Registries'); +var rpc = require('web.rpc'); + const PosProductWidget = (ProductWidget) => + class extends ProductWidget { + setup() { + super.setup(); + useListener('click', this.get_data_from_backend); + } + async get_data_from_backend(){ + //This function will update the product in the pos backend + if(this.env.pos.res_allow_sync.length){ + //Check if the 'Allow Auto Sync Product Data' field is enabled in the configuration settings. + if (this.env.pos.res_allow_sync[this.env.pos.res_allow_sync.length - 1].allow_data_auto_sync === true) { + //if enabled, trigger the function for loading product in background that in the pos models. + await this.env.pos.loadProductsBackground(); + } + } + } +}; +Registries.Component.extend(ProductWidget, PosProductWidget); +return ProductWidget; diff --git a/pos_data_auto_sync/static/src/js/db.js b/pos_data_auto_sync/static/src/js/db.js new file mode 100644 index 000000000..803cec050 --- /dev/null +++ b/pos_data_auto_sync/static/src/js/db.js @@ -0,0 +1,107 @@ +/** @odoo-module **/ + +const PosDB = require('point_of_sale.DB'); +var utils = require('web.utils'); +PosDB.include({ + //Overriding the add_products function for updating the products. + add_products: function(products){ + var stored_categories = this.product_by_category_id; + if(!(products instanceof Array)){ + products = [products]; + } + for(var len = 0, length = products.length; len < length; len++){ + var product = products[len]; + if (product.id in this.product_by_id)continue; + if (product.available_in_pos){ + var search_string = utils.unaccent(this._product_search_string(product)); + var categ_id = product.pos_categ_id ? product.pos_categ_id[0] : this.root_category_id; + product.product_tmpl_id = product.product_tmpl_id[0]; + if(!stored_categories[categ_id]){ + stored_categories[categ_id] = []; + } + stored_categories[categ_id].push(product.id); + + if(this.category_search_string[categ_id] === undefined){ + this.category_search_string[categ_id] = ''; + } + this.category_search_string[categ_id] += search_string; + + var ancestors = this.get_category_ancestors_ids(categ_id) || []; + + for(var j = 0, jlen = ancestors.length; j < jlen; j++){ + var ancestor = ancestors[j]; + if(! stored_categories[ancestor]){ + stored_categories[ancestor] = []; + } + stored_categories[ancestor].push(product.id); + + if( this.category_search_string[ancestor] === undefined){ + this.category_search_string[ancestor] = ''; + } + this.category_search_string[ancestor] += search_string; + } + } + this.product_by_id[product.id] = product; + if(product.barcode){ + this.product_by_barcode[product.barcode] = product; + } + } + //if the product exists, it will go to the update function. + this.update_product(products); + }, +// update the product values + update_product: function(products){ + for(var len = 0, length = products.length; len < length; len++){ + var product = products[len]; + //check if the product exists or not. + if (product.id in this.product_by_id){ + //choose the correct product for the updation. + if(product.id == this.product_by_id[product.id].id){ + //check the parameters one by one and update if there is any changes. + if (product.display_name != this.product_by_id[product.id].display_name){ + this.product_by_id[product.id].display_name = product.display_name + } + if (product.lst_price != this.product_by_id[product.id].lst_price){ + this.product_by_id[product.id].lst_price = product.lst_price + } + if (product.standard_price != this.product_by_id[product.id].standard_price){ + this.product_by_id[product.id].standard_price = product.standard_price + } + if (product.categ_id != this.product_by_id[product.id].categ_id){ + this.product_by_id[product.id].categ_id = product.categ_id + } + if (product.pos_categ_id != this.product_by_id[product.id].pos_categ_id){ + this.product_by_id[product.id].pos_categ_id = product.pos_categ_id + } + if (product.taxes_id != this.product_by_id[product.id].taxes_id){ + this.product_by_id[product.id].taxes_id = product.taxes_id + } + if (product.barcode != this.product_by_id[product.id].barcode){ + this.product_by_id[product.id].barcode = product.barcode + } + if (product.default_code != this.product_by_id[product.id].default_code){ + this.product_by_id[product.id].default_code = product.default_code + } + if (product.to_weight != this.product_by_id[product.id].to_weight){ + this.product_by_id[product.id].to_weight = product.to_weight + } + if (product.description != this.product_by_id[product.id].description){ + this.product_by_id[product.id].description = product.description + } + if (product.description_sale != this.product_by_id[product.id].description_sale){ + this.product_by_id[product.id].description_sale = product.description_sale + } + if (product.l10n_in_hsn_code != this.product_by_id[product.id].l10n_in_hsn_code){ + this.product_by_id[product.id].l10n_in_hsn_code = product.l10n_in_hsn_code + } + if (product.tracking != this.product_by_id[product.id].tracking){ + this.product_by_id[product.id].tracking = product.tracking + } + if (product.uom_id != this.product_by_id[product.id].uom_id){ + this.product_by_id[product.id].uom_id = product.uom_id + } + } + } + } + } +}); diff --git a/pos_data_auto_sync/views/res_config_settings_views.xml b/pos_data_auto_sync/views/res_config_settings_views.xml new file mode 100644 index 000000000..ff585dcc1 --- /dev/null +++ b/pos_data_auto_sync/views/res_config_settings_views.xml @@ -0,0 +1,28 @@ + + + + + res.config.settings.view.form.inherit.pos.data.auto.sync + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+