diff --git a/bill_digitization/README.rst b/bill_digitization/README.rst new file mode 100755 index 000000000..3d0eb7cdd --- /dev/null +++ b/bill_digitization/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Bill Digitization +================= +This module creates bill from scanned bill document. + +Configuration +============= +* Install the pytesseract python package + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V17) Dhanya Babu, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +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/bill_digitization/__init__.py b/bill_digitization/__init__.py new file mode 100644 index 000000000..3821534a3 --- /dev/null +++ b/bill_digitization/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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 +from . import wizard diff --git a/bill_digitization/__manifest__.py b/bill_digitization/__manifest__.py new file mode 100644 index 000000000..110d51031 --- /dev/null +++ b/bill_digitization/__manifest__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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': 'Bill Digitization', + 'version': '17.0.1.0.0', + 'category': 'Accounting', + 'summary': """Converting traditional paper-based bills into digital + formats.""", + 'description': """Reading scanned documents with extension .jpg, .jpeg and + .png using specialized hardware and converting them into + vendor bills in odoo. It makes use of the Optical Character + Recognition (OCR) technology to convert scanned images into + editable text""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'base_accounting_kit', 'web'], + 'data': [ + 'security/ir.model.access.csv', + 'views/res_config_settings_views.xml', + 'wizard/digitize_bill_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'bill_digitization/static/src/js/list_controller.js', + 'bill_digitization/static/src/xml/list_controller.xml', + ], + }, + 'external_dependencies': { + 'python': ['PIL', 'pytesseract'] + }, + 'images': ['static/description/1.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/bill_digitization/doc/RELEASE_NOTES.md b/bill_digitization/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..728a90fba --- /dev/null +++ b/bill_digitization/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 18.04.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Bill Digitization diff --git a/bill_digitization/models/__init__.py b/bill_digitization/models/__init__.py new file mode 100644 index 000000000..7d0defc59 --- /dev/null +++ b/bill_digitization/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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 res_config_settings diff --git a/bill_digitization/models/res_config_settings.py b/bill_digitization/models/res_config_settings.py new file mode 100644 index 000000000..d31e2f9a5 --- /dev/null +++ b/bill_digitization/models/res_config_settings.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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 ResConfigSettings(models.TransientModel): + """ Class to add a boolean in config settings """ + _inherit = "res.config.settings" + + digitize_bill = fields.Boolean( + string="Digitize Bill", + config_parameter='bill_digitization.digitize_bill', + help="Enable the button to digitize bills") diff --git a/bill_digitization/security/ir.model.access.csv b/bill_digitization/security/ir.model.access.csv new file mode 100644 index 000000000..1ee85687a --- /dev/null +++ b/bill_digitization/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_digitize_bill_user,access.digitize.bill.user,model_digitize_bill,base.group_user,1,1,1,1 diff --git a/bill_digitization/static/description/assets/icons/cogs.png b/bill_digitization/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/cogs.png differ diff --git a/bill_digitization/static/description/assets/icons/consultation.png b/bill_digitization/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/bill_digitization/static/description/assets/icons/consultation.png differ diff --git a/bill_digitization/static/description/assets/icons/ecom-black.png b/bill_digitization/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/ecom-black.png differ diff --git a/bill_digitization/static/description/assets/icons/education-black.png b/bill_digitization/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/bill_digitization/static/description/assets/icons/education-black.png differ diff --git a/bill_digitization/static/description/assets/icons/hotel-black.png b/bill_digitization/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/bill_digitization/static/description/assets/icons/hotel-black.png differ diff --git a/bill_digitization/static/description/assets/icons/license.png b/bill_digitization/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/bill_digitization/static/description/assets/icons/license.png differ diff --git a/bill_digitization/static/description/assets/icons/lifebuoy.png b/bill_digitization/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/bill_digitization/static/description/assets/icons/lifebuoy.png differ diff --git a/bill_digitization/static/description/assets/icons/manufacturing-black.png b/bill_digitization/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/bill_digitization/static/description/assets/icons/manufacturing-black.png differ diff --git a/bill_digitization/static/description/assets/icons/pos-black.png b/bill_digitization/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/pos-black.png differ diff --git a/bill_digitization/static/description/assets/icons/puzzle.png b/bill_digitization/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/puzzle.png differ diff --git a/bill_digitization/static/description/assets/icons/restaurant-black.png b/bill_digitization/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/restaurant-black.png differ diff --git a/bill_digitization/static/description/assets/icons/service-black.png b/bill_digitization/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/bill_digitization/static/description/assets/icons/service-black.png differ diff --git a/bill_digitization/static/description/assets/icons/trading-black.png b/bill_digitization/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/bill_digitization/static/description/assets/icons/trading-black.png differ diff --git a/bill_digitization/static/description/assets/icons/training.png b/bill_digitization/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/bill_digitization/static/description/assets/icons/training.png differ diff --git a/bill_digitization/static/description/assets/icons/update.png b/bill_digitization/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/bill_digitization/static/description/assets/icons/update.png differ diff --git a/bill_digitization/static/description/assets/icons/user.png b/bill_digitization/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/bill_digitization/static/description/assets/icons/user.png differ diff --git a/bill_digitization/static/description/assets/icons/wrench.png b/bill_digitization/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/bill_digitization/static/description/assets/icons/wrench.png differ diff --git a/bill_digitization/static/description/assets/misc/Cybrosys R.png b/bill_digitization/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/Cybrosys R.png differ diff --git a/bill_digitization/static/description/assets/misc/categories.png b/bill_digitization/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/categories.png differ diff --git a/bill_digitization/static/description/assets/misc/check-box.png b/bill_digitization/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/check-box.png differ diff --git a/bill_digitization/static/description/assets/misc/compass.png b/bill_digitization/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/bill_digitization/static/description/assets/misc/compass.png differ diff --git a/bill_digitization/static/description/assets/misc/config.png b/bill_digitization/static/description/assets/misc/config.png new file mode 100755 index 000000000..71915e76c Binary files /dev/null and b/bill_digitization/static/description/assets/misc/config.png differ diff --git a/bill_digitization/static/description/assets/misc/corporate.png b/bill_digitization/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/bill_digitization/static/description/assets/misc/corporate.png differ diff --git a/bill_digitization/static/description/assets/misc/customer-support.png b/bill_digitization/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/bill_digitization/static/description/assets/misc/customer-support.png differ diff --git a/bill_digitization/static/description/assets/misc/features.png b/bill_digitization/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/features.png differ diff --git a/bill_digitization/static/description/assets/misc/logo.png b/bill_digitization/static/description/assets/misc/logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/bill_digitization/static/description/assets/misc/logo.png differ diff --git a/bill_digitization/static/description/assets/misc/pictures.png b/bill_digitization/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/pictures.png differ diff --git a/bill_digitization/static/description/assets/misc/pie-chart.png b/bill_digitization/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/pie-chart.png differ diff --git a/bill_digitization/static/description/assets/misc/right-arrow.png b/bill_digitization/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/right-arrow.png differ diff --git a/bill_digitization/static/description/assets/misc/star.png b/bill_digitization/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/bill_digitization/static/description/assets/misc/star.png differ diff --git a/bill_digitization/static/description/assets/misc/support.png b/bill_digitization/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/support.png differ diff --git a/bill_digitization/static/description/assets/misc/whatsapp.png b/bill_digitization/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/bill_digitization/static/description/assets/misc/whatsapp.png differ diff --git a/bill_digitization/static/description/assets/modules/1.jpg b/bill_digitization/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/bill_digitization/static/description/assets/modules/1.jpg differ diff --git a/bill_digitization/static/description/assets/modules/3.png b/bill_digitization/static/description/assets/modules/3.png new file mode 100644 index 000000000..d6b1fe049 Binary files /dev/null and b/bill_digitization/static/description/assets/modules/3.png differ diff --git a/bill_digitization/static/description/assets/modules/4.jpg b/bill_digitization/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..87c2bb2ba Binary files /dev/null and b/bill_digitization/static/description/assets/modules/4.jpg differ diff --git a/bill_digitization/static/description/assets/modules/5.png b/bill_digitization/static/description/assets/modules/5.png new file mode 100644 index 000000000..469963f22 Binary files /dev/null and b/bill_digitization/static/description/assets/modules/5.png differ diff --git a/bill_digitization/static/description/assets/modules/6.png b/bill_digitization/static/description/assets/modules/6.png new file mode 100644 index 000000000..8c78050f4 Binary files /dev/null and b/bill_digitization/static/description/assets/modules/6.png differ diff --git a/bill_digitization/static/description/assets/modules/banner.gif b/bill_digitization/static/description/assets/modules/banner.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/bill_digitization/static/description/assets/modules/banner.gif differ diff --git a/bill_digitization/static/description/assets/screenshots/bill-1.png b/bill_digitization/static/description/assets/screenshots/bill-1.png new file mode 100644 index 000000000..0eb540774 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/bill-1.png differ diff --git a/bill_digitization/static/description/assets/screenshots/bill-2.png b/bill_digitization/static/description/assets/screenshots/bill-2.png new file mode 100644 index 000000000..d3fe0611c Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/bill-2.png differ diff --git a/bill_digitization/static/description/assets/screenshots/bill-3.png b/bill_digitization/static/description/assets/screenshots/bill-3.png new file mode 100644 index 000000000..087c032fd Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/bill-3.png differ diff --git a/bill_digitization/static/description/assets/screenshots/bill-4-1.png b/bill_digitization/static/description/assets/screenshots/bill-4-1.png new file mode 100644 index 000000000..4421509ca Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/bill-4-1.png differ diff --git a/bill_digitization/static/description/assets/screenshots/bill-4.png b/bill_digitization/static/description/assets/screenshots/bill-4.png new file mode 100644 index 000000000..c28387987 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/bill-4.png differ diff --git a/bill_digitization/static/description/assets/screenshots/boolean.png b/bill_digitization/static/description/assets/screenshots/boolean.png new file mode 100644 index 000000000..6a7427370 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/boolean.png differ diff --git a/bill_digitization/static/description/assets/screenshots/button.png b/bill_digitization/static/description/assets/screenshots/button.png new file mode 100644 index 000000000..8e0e6afa8 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/button.png differ diff --git a/bill_digitization/static/description/assets/screenshots/demo_bill1.jpg b/bill_digitization/static/description/assets/screenshots/demo_bill1.jpg new file mode 100644 index 000000000..784a45868 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/demo_bill1.jpg differ diff --git a/bill_digitization/static/description/assets/screenshots/demo_bill2.png b/bill_digitization/static/description/assets/screenshots/demo_bill2.png new file mode 100644 index 000000000..0f78d8a0d Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/demo_bill2.png differ diff --git a/bill_digitization/static/description/assets/screenshots/hero.gif b/bill_digitization/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..386191ce1 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/hero.gif differ diff --git a/bill_digitization/static/description/assets/screenshots/sample_bill.png b/bill_digitization/static/description/assets/screenshots/sample_bill.png new file mode 100644 index 000000000..28164a2e9 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/sample_bill.png differ diff --git a/bill_digitization/static/description/assets/screenshots/vendor_bill.png b/bill_digitization/static/description/assets/screenshots/vendor_bill.png new file mode 100644 index 000000000..84df6fff7 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/vendor_bill.png differ diff --git a/bill_digitization/static/description/assets/screenshots/wizard.png b/bill_digitization/static/description/assets/screenshots/wizard.png new file mode 100644 index 000000000..005cf2579 Binary files /dev/null and b/bill_digitization/static/description/assets/screenshots/wizard.png differ diff --git a/bill_digitization/static/description/banner.jpg b/bill_digitization/static/description/banner.jpg new file mode 100644 index 000000000..6690aba02 Binary files /dev/null and b/bill_digitization/static/description/banner.jpg differ diff --git a/bill_digitization/static/description/icon.png b/bill_digitization/static/description/icon.png new file mode 100644 index 000000000..b87e9830f Binary files /dev/null and b/bill_digitization/static/description/icon.png differ diff --git a/bill_digitization/static/description/index.html b/bill_digitization/static/description/index.html new file mode 100755 index 000000000..5f72a89c3 --- /dev/null +++ b/bill_digitization/static/description/index.html @@ -0,0 +1,725 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+
+
+
+
+

+ Bill Digitization

+

+ Creating Vendor Bill from Scanned Document. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Bill Digitization allows user to create vendor bill from scanned + documents. + User can read .jpg, .jpeg and .png scanned files.

+
+
+
+
+
+
+ +
+
+

+Need to install the following python packages 1. PIL (pip3 install PIL) 2. pytesseract (pip3 install pytesseract) 3. tesseract-ocr (sudo apt-get install tesseract-ocr) +

+
+
+
+
+
+
+ +
+
+

+ Boolean Field on Configuration Settings to Choose Digitization Need

+
+
+
+
+
+
+ +
+
+

+ A Button on Vendor Bill Tree View to Read Documents.

+
+
+
+
+
+
+ +
+
+

+ A View that Shows the Vendor Bill with All the Fetched Data.

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

+ This allows the user to choose digitization.

+
+
+
+
+
+
+ +
+
+

+ Button to read scanned documents.

+
+
+
+
+
+
+ +
+
+

+ A wizard that allows to read document.

+
+
+
+
+
+
+ + +
+
+

+ Sample bill

+
+
+
+
+
+
+ +
+
+

+ Vendor bill with scanned document data.(The example format for scanned document is added in the + module.)

+
+
+
+ +
+ +
+
+
+
Version + 17.0.1.0.0|Released on:15th January 2024 +
+

+ + Initial Commit for Hide Create|Delete|Archive|Export Options - Model Wise.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/bill_digitization/static/src/js/list_controller.js b/bill_digitization/static/src/js/list_controller.js new file mode 100644 index 000000000..dd728338b --- /dev/null +++ b/bill_digitization/static/src/js/list_controller.js @@ -0,0 +1,37 @@ +/** @odoo-module */ +import { ListController } from '@web/views/list/list_controller'; +import { useService } from "@web/core/utils/hooks"; +import { patch } from "@web/core/utils/patch"; +import { useState } from "@odoo/owl"; +import { _t } from "@web/core/l10n/translation"; +patch(ListController.prototype, { +/** + * This function will used to hide the selected options from the list view + */ + async setup() { + super.setup(...arguments); + this.state = useState({ + button_state : false + }) + this.actionService = useService("action"); + this.orm = useService("orm"); + const digitizeBillParam = await this.env.services.orm.silent.call( + 'ir.config_parameter', + 'get_param', + ["bill_digitization.digitize_bill"], + ); + this.state.button_state = digitizeBillParam + }, + /* Opening a wizard on button click */ + onClickDigitize() { + this.actionService.doAction({ + name: _t("Upload Bill"), + type: "ir.actions.act_window", + res_model: "digitize.bill", + view_type : 'form', + view_mode : 'form', + views: [[false, "form"]], + target: 'new', + }); + }, +}); \ No newline at end of file diff --git a/bill_digitization/static/src/xml/list_controller.xml b/bill_digitization/static/src/xml/list_controller.xml new file mode 100644 index 000000000..81bc89fb6 --- /dev/null +++ b/bill_digitization/static/src/xml/list_controller.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/bill_digitization/views/res_config_settings_views.xml b/bill_digitization/views/res_config_settings_views.xml new file mode 100644 index 000000000..b05daec43 --- /dev/null +++ b/bill_digitization/views/res_config_settings_views.xml @@ -0,0 +1,28 @@ + + + + + res.config.settings.view.form.inherit.bill.digitization + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+
diff --git a/bill_digitization/wizard/__init__.py b/bill_digitization/wizard/__init__.py new file mode 100644 index 000000000..8353c2edb --- /dev/null +++ b/bill_digitization/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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 digitize_bill diff --git a/bill_digitization/wizard/digitize_bill.py b/bill_digitization/wizard/digitize_bill.py new file mode 100644 index 000000000..9f37fdf16 --- /dev/null +++ b/bill_digitization/wizard/digitize_bill.py @@ -0,0 +1,395 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Dhanya Babu (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 . +# +################################################################################ +import io +import pytesseract +import re +from PIL import Image +from odoo import Command, fields, models, _ +from odoo.exceptions import ValidationError + + +class DigitizeBill(models.TransientModel): + """ To read documents and to convert into vendor bills """ + _name = "digitize.bill" + _description = "Digitize Bill" + + bill = fields.Binary(string="Document", required=True, + help="Choose a scanned document") + file_name = fields.Char(string="File Name", help="Name of the file") + + def record_lines(self, product_lines_newline_name_qty_price_amount, + product_lines_name_qty_amount, + product_lines_qty_name_amount, + product_lines_name_qty_price_amount1, + product_lines_name_price_qty_amount_with_dollar, + product_lines_name_price_qty_amount, + product_lines_name_amount, + product_lines_name_qty_price_amount2, + product_lines_double_line_name, + product_lines_code_name, + product_lines_quantity_part, + product_lines_vendor_bill_pattern, + product_lines_quantity_price_amount_pattern, + product_lines_quantity_price_amount_pattern2, + product_line_name_with_extra_line): + """ Function to extract bill data from text read by pytesseract """ + products = [] + price = [] + subtotal = [] + quantity = [] + if (product_lines_newline_name_qty_price_amount or + product_lines_name_qty_price_amount1 or + product_lines_name_qty_price_amount2): + if product_lines_name_qty_price_amount1: + product_lines_newline_name_qty_price_amount = ( + product_lines_name_qty_price_amount1) + if product_lines_name_qty_price_amount2: + product_lines_newline_name_qty_price_amount = ( + product_lines_name_qty_price_amount2) + # Fetching products and create new ones + products = [self.env['product.product'].search( + [('name', '=', line[0])], limit=1) or + self.env['product.product'].create( + {'name': line[0]}) + for line in + product_lines_newline_name_qty_price_amount] + # Creating lists for prices and subtotals + price = [line[2] for line in + product_lines_newline_name_qty_price_amount] + subtotal = [line[3] for line in + product_lines_newline_name_qty_price_amount] + elif product_lines_name_qty_amount: + # Fetching products and create new ones + products = [ + self.env['product.product'].search([('name', '=', line[0])], + limit=1) or + self.env['product.product'].create({'name': line[0]}) + for line in product_lines_name_qty_amount] + # Calculating unit prices + price = [ + float(line[2]) / float(line[1]) if float(line[1]) != 0 else 0 + for line in product_lines_name_qty_amount] + # Creating a list for subtotals + subtotal = [line[2] for line in product_lines_name_qty_amount] + elif product_lines_qty_name_amount: + # Fetching products and create new ones + products = [ + self.env['product.product'].search([('name', '=', line[1])], + limit=1) or + self.env['product.product'].create({'name': line[1]}) + for line in product_lines_qty_name_amount] + # Calculating unit prices + price = [ + float(line[2]) / float(line[0]) if float(line[0]) != 0 else 0 + for line in product_lines_qty_name_amount] + # Creating a list for subtotals + subtotal = [line[2] for line in product_lines_qty_name_amount] + elif (product_lines_name_price_qty_amount_with_dollar or + product_lines_name_price_qty_amount): + if product_lines_name_price_qty_amount: + product_lines_name_price_qty_amount_with_dollar = ( + product_lines_name_price_qty_amount) + # Fetching products and create new ones + products = [ + self.env['product.product'].search([('name', '=', line[0])], + limit=1) or + self.env['product.product'].create({'name': line[0]}) + for line in product_lines_name_price_qty_amount_with_dollar] + # Extracting item prices and amounts + price = [line[1].replace('$', '') if '$' in line[1] else line[1] + for line in + product_lines_name_price_qty_amount_with_dollar] + subtotal = [line[3].replace('$', '') if '$' in line[3] else line[3] + for line in + product_lines_name_price_qty_amount_with_dollar] + elif product_lines_name_amount: + # Fetching products and create new ones + products = [ + self.env['product.product'].search([('name', '=', line[0])], + limit=1) or + self.env['product.product'].create({'name': line[0]}) + for line in product_lines_name_amount] + # Extracting item amounts and create a list for subtotals + subtotal = [line[1].replace('$', '') if '$' in line[1] else line[1] + for line in product_lines_name_amount] + elif product_lines_code_name: + name_list_one = [] + if product_line_name_with_extra_line: + for code, name in product_line_name_with_extra_line: + product_info = f"{code} {name}" + name_list_one.append(product_info) + names = [item.strip() for item in + product_lines_code_name[0].split('\n') if item.strip()] + if name_list_one and len(name_list_one) > len(names): + names = name_list_one + if product_lines_quantity_part: + order_lines = [line.strip() for line in + product_lines_quantity_part[0].split('\n') if + line.strip()] + elif product_lines_quantity_price_amount_pattern: + order_lines = [line.strip() for line in + product_lines_quantity_price_amount_pattern[ + 0].split('\n') if + line.strip()] + elif product_lines_quantity_price_amount_pattern2: + order_lines = [line.strip() for line in + product_lines_quantity_price_amount_pattern2[ + 0].split('\n') if + line.strip()] + else: + order_lines = [] + # Create the 'products' list + products = [ + self.env['product.product'].search([('name', '=', name)], + limit=1) or + self.env['product.product'].create({'name': name}) + for name in names] + # Creating the unit price list + price = [float(line.split()[1].replace(',', '')) if line else 0 for + line in order_lines] + # Calculating and Creating the 'subtotal' list + subtotal = [float(line.split()[1].replace(',', '')) * float( + line.split()[0]) if line else 0 for line in order_lines] + # Creating the quantity list + quantity = [float(line.split()[0]) if line else 0 for line in + order_lines] + elif product_lines_vendor_bill_pattern: + products = [ + self.env['product.product'].search([('name', '=', item[0])], + limit=1) or + self.env['product.product'].create({'name': item[0]}) + for item in product_lines_vendor_bill_pattern] + quantity = [float(item[1]) for item in + product_lines_vendor_bill_pattern] + price = [float(item[2]) for item in + product_lines_vendor_bill_pattern] + subtotal = [float(item[2]) * float(item[1]) for item in + product_lines_vendor_bill_pattern] + if product_lines_double_line_name: + for line in product_lines_double_line_name: + product_name = line[0] + ' ' + line[1] + product = self.env['product.product'].search( + [('name', '=', product_name)], limit=1) + if not product: + product = self.env['product.product'].create({ + 'name': product_name + }) + products.append(product) + if '$' in line[5]: + line[5] = line[5].replace('$', '') + subtotal.append(line[5]) + item_price = line[4].replace('$', '') if '$' in line[4] else \ + line[4] + price.append(item_price) + if bool(quantity): + # Looping lists to create product line values + move_line_vals = [ + (0, 0, { + 'product_id': product.id, + 'name': 'Outside Bill', + 'price_unit': price_amount, + 'price_subtotal': total_amount, + 'quantity': qty, + 'tax_ids': [Command.set([])], + 'move_id': self.id, + }) + for product, price_amount, total_amount, qty in + zip(products, price, subtotal, quantity) + ] + elif bool(price): + # Looping three lists to create product line values + move_line_vals = [ + (0, 0, { + 'product_id': product.id, + 'name': 'Outside Bill', + 'price_unit': price_amount, + 'price_subtotal': total_amount, + 'tax_ids': [Command.set([])], + 'move_id': self.id, + }) + for product, price_amount, total_amount in + zip(products, price, subtotal) + ] + else: + move_line_vals = [ + (0, 0, { + 'product_id': product.id, + 'name': 'Outside Bill', + 'price_subtotal': total_amount, + 'tax_ids': [Command.set([])], + 'move_id': self.id, + }) + for product, total_amount in zip(products, subtotal) + ] + return move_line_vals + + def create_record(self, text): + """ Function to create vendor bill """ + # Different patterns or regular expressions to identify the data + # from the text + newline_name_qty_price_amount = \ + r'\n([A-Za-z ]+) (\d+) (\d+\.\d{2}) (\d+\.\d{2})' + name_qty_amount = r'\n([A-Za-z ]+) (\d+) (\d+\.\d{2})' + qty_name_amount = r'\n(\d+) ([A-Za-z ]+) (\d+\.\d{2})' + name_qty_price_amount1 = r'\s*([A-Za-z() \d]+) (\d+) (\d+) (\d+)' + name_price_qty_amount_with_dollar = \ + r'\n(\$?\w+(?: \w+)*) (\$[\d.]+) (\d+) (\$[\d.]+)' + name_price_qty_amount = \ + r'\n(\$?\w+(?: \w+)*) (\[\d.]+) (\d+) (\[\d.]+)' + name_amount = r'\n(\$?\w+(?: \w+)*) (\d+\.\d{2})' + name_qty_price_amount2 = r"([\w\s]+)\s+(\d+)\s+(\d+)\s+\$(\d+)" + double_line_name = \ + r'([\w\s]+)\s([\w\s]+)\s*([\w\s]+)\s*(\d+)\s*(\$\d+' \ + r'\.\d{2})\s*(\d+\.\d{2})' + code_name = r'Description\n([\s\S]*?)(?=\n\n)' + quantity_price_pattern = r'Quantity Unit Price Taxes\n([\s\S]*?)(?=\n\n)' + vendor_bill_pattern = r'\[[A-Z0-9-]+\] (.+?) (\d+\.\d+) (\d+\.\d+) (\d+\.\d+%?) \$ (\d+\.\d+)' + quantity_price_amount_pattern = r'Quantity Unit Price Taxes Amount\n((?:\d+\.\d+\s+\d+\.\d+\s+\d+\.\d+% \$\s+\d+\.\d+\n)+)' + quantity_price_amount_pattern2 = r'Quantity Unit Price Taxes Amount([\s\S]*?)(?:Untaxed Amount|Tax|Total|$)' + name_with_extra_line = r'\[([A-Z0-9-]+)\] (.+)' + + # Pattern to match date and bill number from the text + date_pattern = r'\d{1,2}/\d{1,2}/\d{2,4}' + bill_no_pattern = r'Bill\sNo\.: (\d{4})' + # Pattern to match the year format of date + # (two digit or four digit format) + year_pattern = re.compile(r'\d{2}') + # Matching each pattern with the text and fetching the matching + # data from it + try: + product_lines_newline_name_qty_price_amount = re.findall( + newline_name_qty_price_amount, text) + product_lines_name_qty_amount = re.findall(name_qty_amount, text) + product_lines_qty_name_amount = re.findall(qty_name_amount, text) + product_lines_name_qty_price_amount1 = re.findall( + name_qty_price_amount1, text) + product_lines_name_price_qty_amount_with_dollar = re.findall( + name_price_qty_amount_with_dollar, + text) + product_lines_name_price_qty_amount = re.findall( + name_price_qty_amount, text) + product_lines_name_amount = re.findall(name_amount, text) + product_lines_name_qty_price_amount2 = re.findall( + name_qty_price_amount2, text) + product_lines_double_line_name = re.findall(double_line_name, text) + date_match = re.search(date_pattern, text) + bill_no_match = re.search(bill_no_pattern, text) + product_lines_code_name = re.findall(code_name, text) + product_lines_quantity_part = re.findall( + quantity_price_pattern, text) + product_lines_vendor_bill_pattern = re.findall( + vendor_bill_pattern, text) + product_lines_quantity_price_amount_pattern = re.findall( + quantity_price_amount_pattern, text) + product_lines_quantity_price_amount_pattern2 = re.findall( + quantity_price_amount_pattern2, text) + product_line_name_with_extra_line = re.findall( + name_with_extra_line, text) + except Exception: + raise ValidationError(_("Cannot find the pattern")) + date_object = '' + if date_match: + # Reading the date value if the date pattern match any data + date_value = date_match.group() + match = year_pattern.search(date_value) + if date_value == '%d/%m/%y' or date_value == '%d/%m/%Y': + date_object = fields.datetime.strptime( + date_value, '%d/%m/%y') if match and len( + date_value.split('/')[ + -1]) == 2 else fields.datetime.strptime( + date_value, '%d/%m/%Y') + elif date_value == '%m/%d/%y' or date_value == '%m/%d/%Y': + date_object = fields.datetime.strptime( + date_value, '%m/%d/%y') if match and len( + date_value.split('/')[ + -1]) == 2 else fields.datetime.strptime( + date_value, '%m/%d/%Y') + date = date_object.strftime( + '%Y-%m-%d') if date_object else fields.Date.today() + else: + date = fields.Date.today() + # Fetching the bill number if te pattern matches + bill_no = bill_no_match.group(1) if bill_no_match else '' + # Calling the function to get the product lines of the bill + move_line_vals = self.record_lines( + product_lines_newline_name_qty_price_amount, + product_lines_name_qty_amount, + product_lines_qty_name_amount, + product_lines_name_qty_price_amount1, + product_lines_name_price_qty_amount_with_dollar, + product_lines_name_price_qty_amount, + product_lines_name_amount, product_lines_name_qty_price_amount2, + product_lines_double_line_name, + product_lines_code_name, + product_lines_quantity_part, + product_lines_vendor_bill_pattern, + product_lines_quantity_price_amount_pattern, + product_lines_quantity_price_amount_pattern2, + product_line_name_with_extra_line) + # After getting all the data, creating a record in the + # vendor bill + bill_record = self.env['account.move'].create([{ + 'move_type': 'in_invoice', + 'ref': bill_no, + 'date': date, + 'invoice_date': date, + 'invoice_line_ids': move_line_vals, + }]) + return bill_record + + def action_add_document(self): + """ Function that reading the file in the format .jpg, .jpeg and .png + and converting into text using OCR python package """ + try: + file_attachment = self.env["ir.attachment"].search( + ['|', ('res_field', '!=', False), ('res_field', '=', False), + ('res_id', '=', self.id), + ('res_model', '=', 'digitize.bill')], + limit=1) + file_path = file_attachment._full_path(file_attachment.store_fname) + with open(file_path, mode='rb') as file: + binary_data = file.read() + img = Image.open(io.BytesIO(binary_data)) + # Resizing the image to improve the clarity + resized_img = img.resize((img.width * 2, img.height * 2), + resample=Image.BICUBIC) + except Exception: + raise ValidationError(_("Cannot identify data")) + # Converting the image into text using OCR python package + # pytesseract + try: + text = pytesseract.image_to_string(resized_img) + except Exception: + raise ValidationError(_("Data cannot read")) + # Calling the function to create vendor bill + bill_record = self.create_record(text) + # Opening the vendor bill using its id + return { + 'name': "Invoice", + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.move', + 'res_id': bill_record.id, + 'view_id': self.env.ref('account.view_move_form').id, + 'target': 'current', + } diff --git a/bill_digitization/wizard/digitize_bill_views.xml b/bill_digitization/wizard/digitize_bill_views.xml new file mode 100644 index 000000000..2e513d72d --- /dev/null +++ b/bill_digitization/wizard/digitize_bill_views.xml @@ -0,0 +1,36 @@ + + + + + digitize.bill.view.form + digitize.bill + +
+ +

Upload images or pdf file format
+

+ + + + + + +
+
+
+
+
+
+ + + Digitize Bill + ir.actions.act_window + digitize.bill + form + + new + +
diff --git a/chatter_attachments_as_zip/README.rst b/chatter_attachments_as_zip/README.rst new file mode 100644 index 000000000..e93abb392 --- /dev/null +++ b/chatter_attachments_as_zip/README.rst @@ -0,0 +1,40 @@ +.. 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 + +Chatter Attachments as ZIP +========================== +* Chatter Attachments As Zip module helps to download all attachments as a single zip file. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V17) Ammu Raj, Contacts: 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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/chatter_attachments_as_zip/__init__.py b/chatter_attachments_as_zip/__init__.py new file mode 100644 index 000000000..ccf8bfa40 --- /dev/null +++ b/chatter_attachments_as_zip/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu 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 controllers diff --git a/chatter_attachments_as_zip/__manifest__.py b/chatter_attachments_as_zip/__manifest__.py new file mode 100644 index 000000000..3ed01b82f --- /dev/null +++ b/chatter_attachments_as_zip/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu 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": "Chatter Attachments as ZIP", + "version": "17.0.1.0.0", + "category": "Extra Tools", + "summary": """Download All Chatter Attachments As A Single Zip File.""", + "description": "This module helps to download all chatter attachments in a" + "single zip file.", + "author": "Cybrosys Techno Solutions", + "company": "Cybrosys Techno Solutions", + "maintainer": "Cybrosys Techno Solutions", + "website": "https://www.cybrosys.com", + "depends": ['mail'], + "assets": { + "web.assets_backend": [ + "chatter_attachments_as_zip/static/src/js/chatter.js", + "chatter_attachments_as_zip/static/src/xml/chatter.xml", + ] + }, + "images": ["static/description/banner.png"], + "license": "AGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/chatter_attachments_as_zip/controllers/__init__.py b/chatter_attachments_as_zip/controllers/__init__.py new file mode 100644 index 000000000..664c485a0 --- /dev/null +++ b/chatter_attachments_as_zip/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu 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 chatter_attachment_as_zip diff --git a/chatter_attachments_as_zip/controllers/chatter_attachment_as_zip.py b/chatter_attachments_as_zip/controllers/chatter_attachment_as_zip.py new file mode 100644 index 000000000..8743bd9c0 --- /dev/null +++ b/chatter_attachments_as_zip/controllers/chatter_attachment_as_zip.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu 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 . +# +############################################################################### +import base64 +import io +import zipfile +from odoo import http +from odoo.http import request + + +class DownloadAllAttachments(http.Controller): + """Controller for downloading all attachments as a single zip file""" + @http.route('/chatter/attachments/download/zip', type='http', auth="public", + cors="*", csrf=False) + def download_attachments(self, **res_id): + """ + Download all attachments as a single zip file. + Args: + res_id (dict): A dictionary containing the 'res_id' parameter. + Returns: + werkzeug.wrappers.Response: HTTP response with the zip file. + """ + chatter_id = request.params.get('res_id') + attachments = request.env['ir.attachment'].search( + [('res_id', '=', chatter_id), ('res_model', '!=', 'account.move')]) + if attachments: + # Define the name of the zip file + zip_filename = f'attachments_{chatter_id}.zip' + # Create a zip file with the attachments and prepare it for download + zip_data = io.BytesIO() + with zipfile.ZipFile(zip_data, 'w', zipfile.ZIP_DEFLATED) as zipf: + for attachment in attachments: + # Decode binary data using base64 library + attachment_data = base64.b64decode(attachment.datas) + zipf.writestr(attachment.name, attachment_data) + # Prepare HTTP response with the zip file + response = request.make_response( + zip_data.getvalue(), + headers=[ + ('Content-Type', 'application/zip'), + ('Content-Disposition', + f'attachment; filename={zip_filename}'), + ] + ) + zip_data.close() + return response diff --git a/chatter_attachments_as_zip/doc/RELEASE_NOTES.md b/chatter_attachments_as_zip/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..be84cfb82 --- /dev/null +++ b/chatter_attachments_as_zip/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 01.04.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Chatter Attachments as ZIP diff --git a/chatter_attachments_as_zip/static/description/assets/icons/capture (1).png b/chatter_attachments_as_zip/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/capture (1).png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/check.png b/chatter_attachments_as_zip/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/check.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/chevron.png b/chatter_attachments_as_zip/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/chevron.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/cogs.png b/chatter_attachments_as_zip/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/cogs.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/consultation.png b/chatter_attachments_as_zip/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/consultation.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/ecom-black.png b/chatter_attachments_as_zip/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/ecom-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/education-black.png b/chatter_attachments_as_zip/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/education-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/hotel-black.png b/chatter_attachments_as_zip/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/hotel-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/img.png b/chatter_attachments_as_zip/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/img.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/license.png b/chatter_attachments_as_zip/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/license.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/lifebuoy.png b/chatter_attachments_as_zip/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/lifebuoy.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/manufacturing-black.png b/chatter_attachments_as_zip/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/manufacturing-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/photo-capture.png b/chatter_attachments_as_zip/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/photo-capture.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/pos-black.png b/chatter_attachments_as_zip/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/pos-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/puzzle.png b/chatter_attachments_as_zip/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/puzzle.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/restaurant-black.png b/chatter_attachments_as_zip/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/restaurant-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/service-black.png b/chatter_attachments_as_zip/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/service-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/trading-black.png b/chatter_attachments_as_zip/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/trading-black.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/training.png b/chatter_attachments_as_zip/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/training.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/update.png b/chatter_attachments_as_zip/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/update.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/user.png b/chatter_attachments_as_zip/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/user.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/icons/wrench.png b/chatter_attachments_as_zip/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/icons/wrench.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/misc/Cybrosys R.png b/chatter_attachments_as_zip/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/misc/Cybrosys R.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/misc/email.svg b/chatter_attachments_as_zip/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/phone.svg b/chatter_attachments_as_zip/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/star (1) 2.svg b/chatter_attachments_as_zip/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/support (1) 1.svg b/chatter_attachments_as_zip/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/support-email.svg b/chatter_attachments_as_zip/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/tick-mark.svg b/chatter_attachments_as_zip/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/whatsapp 1.svg b/chatter_attachments_as_zip/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/misc/whatsapp.svg b/chatter_attachments_as_zip/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/chatter_attachments_as_zip/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_as_zip/static/description/assets/modules/1.png b/chatter_attachments_as_zip/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/1.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/modules/2.png b/chatter_attachments_as_zip/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/2.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/modules/3.png b/chatter_attachments_as_zip/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/3.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/modules/4.png b/chatter_attachments_as_zip/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/4.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/modules/5.png b/chatter_attachments_as_zip/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/5.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/modules/6.png b/chatter_attachments_as_zip/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/modules/6.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/1.png b/chatter_attachments_as_zip/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..7998249ff Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/1.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/2.png b/chatter_attachments_as_zip/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..374ab6647 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/2.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/3.png b/chatter_attachments_as_zip/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..26cfbda92 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/3.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/4.png b/chatter_attachments_as_zip/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4e8bc85c4 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/4.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/5.png b/chatter_attachments_as_zip/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..66ced0dca Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/5.png differ diff --git a/chatter_attachments_as_zip/static/description/assets/screenshots/hero.gif b/chatter_attachments_as_zip/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..0793960e5 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/assets/screenshots/hero.gif differ diff --git a/chatter_attachments_as_zip/static/description/banner.png b/chatter_attachments_as_zip/static/description/banner.png new file mode 100644 index 000000000..88bdb3323 Binary files /dev/null and b/chatter_attachments_as_zip/static/description/banner.png differ diff --git a/chatter_attachments_as_zip/static/description/icon.png b/chatter_attachments_as_zip/static/description/icon.png new file mode 100644 index 000000000..5fedf617e Binary files /dev/null and b/chatter_attachments_as_zip/static/description/icon.png differ diff --git a/chatter_attachments_as_zip/static/description/index.html b/chatter_attachments_as_zip/static/description/index.html new file mode 100644 index 000000000..9ec03103e --- /dev/null +++ b/chatter_attachments_as_zip/static/description/index.html @@ -0,0 +1,571 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Chatter Attachments as ZIP

+

+ Download All Chatter Attachments As A Single Zip File. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Community, Enterprise & SH Support.

+

Available in Odoo 17.0 Community, Enterprise & SH. +

+
+
+
+
+
+
+ +
+
+

Download all attachments

+

Download all attachments in a single zip file. +

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

+ Click the Attachment button to add attachments.

+
+
+
+
+
+
+ +
+
+

+ Choose the files to attach.

+
+
+
+
+
+
+ +
+
+

+ When you view the attachments, a download button will appear under the Add Files button.Click the 'Download All Attachments' button to download all the attachments in a single file.

+
+
+
+
+
+
+ +
+
+

+ Attachments downloaded as a zip file.

+
+
+
+
+
+
+ +
+
+

+ View of the downloaded zip file.

+
+
+
+
+
+
+
    +
  • + Download all Attachments by a single click. +
  • +
  • + Chatter Attachments as ZIP. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:01 April 2024 +
+

+ Initial Commit for Chatter Attachments as ZIP

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/chatter_attachments_as_zip/static/src/js/chatter.js b/chatter_attachments_as_zip/static/src/js/chatter.js new file mode 100644 index 000000000..c7e34b449 --- /dev/null +++ b/chatter_attachments_as_zip/static/src/js/chatter.js @@ -0,0 +1,51 @@ +/** @odoo-module **/ + +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +import { Chatter } from "@mail/core/web/chatter"; +import { patch } from "@web/core/utils/patch"; +import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; + +patch(Chatter.prototype, { + setup() { + super.setup(); + this.dialog = useService("dialog"); + }, + /** + * Handles click on the "add attachment" button. + */ + async onClickDownloadAttachment(ev) { + // Build the URL with parameters in the query string + const url = `/chatter/attachments/download/zip?res_id=${this.props.threadId}`; + // Send an HTTP GET request to download attachments as a zip file + fetch(url) + .then(response => { + if (response.ok) { + + // Create a Blob from the response data + return response.blob(); + } else { + throw new Error('Failed to fetch'); + } + }) + .then(blob => { + if (blob.size == 0) { + this.dialog.add(AlertDialog, { + title: _t("Info"), + body: _t("There are no attachments to download."), + }); + } else { + // Create a URL for the Blob + const blobUrl = URL.createObjectURL(blob); + // Create an anchor element for downloading + const link = document.createElement('a'); + link.href = blobUrl; + link.download = `attachments${this.props.threadId}.zip`; + // Trigger a click event to start the download + link.click(); + // Clean up by revoking the Blob URL + URL.revokeObjectURL(blobUrl); + } + }) + } +}) diff --git a/chatter_attachments_as_zip/static/src/xml/chatter.xml b/chatter_attachments_as_zip/static/src/xml/chatter.xml new file mode 100644 index 000000000..4c850255b --- /dev/null +++ b/chatter_attachments_as_zip/static/src/xml/chatter.xml @@ -0,0 +1,17 @@ + + + + + +
+ +
+
+
+
diff --git a/company_dependent_outgoing_mail_server/README.rst b/company_dependent_outgoing_mail_server/README.rst new file mode 100644 index 000000000..4e30b99db --- /dev/null +++ b/company_dependent_outgoing_mail_server/README.rst @@ -0,0 +1,47 @@ +.. 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 + +Company Dependent Outgoing Mail Server +====================================== +* Send all outgoing mails from configured company outgoing mail server + +Configuration +============ + - www.odoo.com/documentation/17.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: (V17) Swaraj R, 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 +-------- +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com" + +Further information +=================== +HTML Description: ``__ diff --git a/company_dependent_outgoing_mail_server/__init__.py b/company_dependent_outgoing_mail_server/__init__.py new file mode 100644 index 000000000..494429a05 --- /dev/null +++ b/company_dependent_outgoing_mail_server/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models + + +def _post_init_check_company(env): + """Set current company id to current.company.id key in + ir.config_parameter""" + env['ir.config_parameter'].sudo().set_param('current.company.id', + env.company.id) diff --git a/company_dependent_outgoing_mail_server/__manifest__.py b/company_dependent_outgoing_mail_server/__manifest__.py new file mode 100644 index 000000000..414b6476e --- /dev/null +++ b/company_dependent_outgoing_mail_server/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Company Dependent Outgoing Mail Server', + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Send outgoing mails from company depend outgoing mail server', + 'description': 'Configure multiple outgoing mail server and set each ' + 'outgoing mail server to specific company and send the ' + 'outgoing mails from that server only', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'views/ir_mail_server_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'company_dependent_outgoing_mail_server/static/src/js/get_company' + '.js', + ], + }, + 'images': [ + 'static/description/banner.jpg', + ], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + 'post_init_hook': '_post_init_check_company', +} diff --git a/company_dependent_outgoing_mail_server/doc/RELEASE_NOTES.md b/company_dependent_outgoing_mail_server/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..5db7df5d7 --- /dev/null +++ b/company_dependent_outgoing_mail_server/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 08.04.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Company Dependent Outgoing Mail Server diff --git a/company_dependent_outgoing_mail_server/models/__init__.py b/company_dependent_outgoing_mail_server/models/__init__.py new file mode 100644 index 000000000..1e3a1ae32 --- /dev/null +++ b/company_dependent_outgoing_mail_server/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import ir_mail_server diff --git a/company_dependent_outgoing_mail_server/models/ir_mail_server.py b/company_dependent_outgoing_mail_server/models/ir_mail_server.py new file mode 100644 index 000000000..adc08e710 --- /dev/null +++ b/company_dependent_outgoing_mail_server/models/ir_mail_server.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class IrMailServer(models.Model): + """Inherited ir.mail_server and added a company dependent field""" + _inherit = 'ir.mail_server' + _description = 'Added a company dependent field in ir.mail_server' + + company_id = fields.Many2one('res.company', string='Company', + help='Specify this if you want company ' + 'dependent out going mail server') + + def _find_mail_server(self, email_from, mail_servers=None): + """Function which finds appropriate outgoing email server for current + company""" + mail_server = self.env['ir.mail_server'].search([ + ( + 'company_id.id', '=', + self.env['ir.config_parameter'].sudo().get_param( + 'current.company.id')) + ], + order='sequence asc', limit=1) + res = super()._find_mail_server(email_from) + lst = list(res) + lst[0] = mail_server + res = tuple(lst) + return res + + @api.model + def get_company_id(self, current_company): + """Function called from orm and has current company id in argument""" + self.env['ir.config_parameter'].sudo().set_param('current.company.id', + current_company) diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/check.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/check.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/chevron.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/chevron.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/cogs.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/cogs.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/consultation.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/consultation.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/ecom-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/ecom-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/education-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/education-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/hotel-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/hotel-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/license.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/license.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/lifebuoy.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/lifebuoy.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/manufacturing-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/manufacturing-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/pos-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/pos-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/puzzle.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/puzzle.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/restaurant-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/restaurant-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/service-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/service-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/trading-black.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/trading-black.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/training.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/training.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/update.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/update.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/user.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/user.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/icons/wrench.png b/company_dependent_outgoing_mail_server/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/icons/wrench.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/categories.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/categories.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/check-box.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/check-box.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/compass.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/compass.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/corporate.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/corporate.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/customer-support.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/customer-support.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/cybrosys-logo.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/cybrosys-logo.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/features.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/features.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/logo.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/logo.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/phone.svg b/company_dependent_outgoing_mail_server/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/pictures.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/pictures.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/pie-chart.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/pie-chart.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/right-arrow.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/right-arrow.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/star.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/star.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/support (1) 1.svg b/company_dependent_outgoing_mail_server/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/support-email.svg b/company_dependent_outgoing_mail_server/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/support.png b/company_dependent_outgoing_mail_server/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/misc/support.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/misc/whatsapp 1.svg b/company_dependent_outgoing_mail_server/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m1.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m1.png new file mode 100644 index 000000000..5ecc4d883 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m1.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m2.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m2.png new file mode 100644 index 000000000..89ff6c635 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m2.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m3.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m3.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m3.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m4.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m4.png new file mode 100644 index 000000000..5514bb8d4 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m4.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m5.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m5.png new file mode 100644 index 000000000..38ea1f663 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m5.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/modules/m6.png b/company_dependent_outgoing_mail_server/static/description/assets/modules/m6.png new file mode 100644 index 000000000..f52b99646 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/modules/m6.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/screenshots/1.png b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..dca19bb43 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/1.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/screenshots/2.png b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..dc6b7159d Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/2.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/screenshots/3.png b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9060aae95 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/3.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/assets/screenshots/4.png b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..6eb6b586b Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/assets/screenshots/4.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/banner.jpg b/company_dependent_outgoing_mail_server/static/description/banner.jpg new file mode 100644 index 000000000..9254fcdf4 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/banner.jpg differ diff --git a/company_dependent_outgoing_mail_server/static/description/hero.gif b/company_dependent_outgoing_mail_server/static/description/hero.gif new file mode 100644 index 000000000..b75bb1ff7 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/hero.gif differ diff --git a/company_dependent_outgoing_mail_server/static/description/icon.png b/company_dependent_outgoing_mail_server/static/description/icon.png new file mode 100644 index 000000000..8c9dd4460 Binary files /dev/null and b/company_dependent_outgoing_mail_server/static/description/icon.png differ diff --git a/company_dependent_outgoing_mail_server/static/description/index.html b/company_dependent_outgoing_mail_server/static/description/index.html new file mode 100644 index 000000000..dd24ed2d0 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/description/index.html @@ -0,0 +1,689 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Company Dependent Outgoing Mail Server

+

+ This Module Allows to set company specific outgoing mail + server. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Configure Outgoing mail server for particular + company.

+
+
+
+
+
+
+ +
+
+

+ Configure multi company outgoing mail + server.

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

+ Choose the company for the mail server.

+
+
+
+
+
+
+ +
+
+

+ Go to chatter section.

+
+
+
+
+
+
+ +
+
+

+ Create a log note. +

+
+
+
+
+
+
+ +
+
+

+ Check the mails.

+
+
+
+
+
+
+
    +
  • + Use the new + Choose the company for the mail server. +
  • +
  • + + Go to chatter section. +
  • +
  • + + Create a log note. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:8 th April 2024 +
+

+ Initial commit for Company dependent outgoing + mail server +

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/company_dependent_outgoing_mail_server/static/src/js/get_company.js b/company_dependent_outgoing_mail_server/static/src/js/get_company.js new file mode 100644 index 000000000..53d160984 --- /dev/null +++ b/company_dependent_outgoing_mail_server/static/src/js/get_company.js @@ -0,0 +1,15 @@ +/** @odoo-module **/ +import { SwitchCompanyItem } from "@web/webclient/switch_company_menu/switch_company_menu"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +/**Returns the current company id to function get_company_id through rpc call**/ +patch(SwitchCompanyItem.prototype,{ + setup(){ + this.orm = useService("orm"); + return super.setup() + }, + logIntoCompany() { + this.orm.call("ir.mail_server", "get_company_id", [this.props.company.id]); + return super.logIntoCompany(); + } +}); diff --git a/company_dependent_outgoing_mail_server/views/ir_mail_server_views.xml b/company_dependent_outgoing_mail_server/views/ir_mail_server_views.xml new file mode 100644 index 000000000..b66557ce1 --- /dev/null +++ b/company_dependent_outgoing_mail_server/views/ir_mail_server_views.xml @@ -0,0 +1,14 @@ + + + + + ir.mail.server.view.form.inherit.company.dependent.outgoing.mail.server + ir.mail_server + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/README.rst b/odoo_fb_insta_product_data_feed/README.rst new file mode 100644 index 000000000..59b7aed41 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Product Data Feed Generation +============================ +Generating a Product Catalog Feeds Sharing Link + +Configuration +============= +* No additional configurations needed + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17) Subina P, 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/odoo_fb_insta_product_data_feed/__init__.py b/odoo_fb_insta_product_data_feed/__init__.py new file mode 100644 index 000000000..b219d65ff --- /dev/null +++ b/odoo_fb_insta_product_data_feed/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 controllers, models diff --git a/odoo_fb_insta_product_data_feed/__manifest__.py b/odoo_fb_insta_product_data_feed/__manifest__.py new file mode 100644 index 000000000..553a41fb7 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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': 'Product Data Feed Generation', + 'version': '17.0.1.0.0', + 'category': 'eCommerce', + 'summary': 'Help to create the catalog for promoting your sale', + 'description': 'Using this module we have to promote and market our sales' + ' through facebook and instagram for using the catalog of ' + 'our product. Many of the businesses sell or advertise ' + 'their product through facebook and instagram. So they' + ' need a catalog that contains the information about your ' + 'products. In this module generate the product data feed ' + 'file for the facebook commerce manager in automatic ' + 'mode(by URL). After adding the data feed URL on facebook ' + 'you will be able to promote your product in sale channels ,' + ' on facebook shops, instagram shopping, with dynamic ads,' + ' and more.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website_sale', 'product', 'mail', 'stock'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_data_feed_views.xml', + 'views/product_data_feed_columns_views.xml', + 'views/field_column_value_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/odoo_fb_insta_product_data_feed/controllers/__init__.py b/odoo_fb_insta_product_data_feed/controllers/__init__.py new file mode 100644 index 000000000..31e46e484 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 odoo_fb_insta_product_data_feed diff --git a/odoo_fb_insta_product_data_feed/controllers/odoo_fb_insta_product_data_feed.py b/odoo_fb_insta_product_data_feed/controllers/odoo_fb_insta_product_data_feed.py new file mode 100644 index 000000000..438285af5 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/controllers/odoo_fb_insta_product_data_feed.py @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 . +# +############################################################################### +import csv +from six import StringIO +from odoo import http +from odoo.http import request + + +class ProductData(http.Controller): + """This controller handle for downloading the catalog csv file""" + def generate_formatted_file_content(self, columns, item_filter, record): + """Generating the file content""" + # Apply the filter criteria and fetch the relevant items + filtered_items = request.env[record.used_model].search(item_filter) + formatted_rows = [] + # Iterate over each item and generate a row of values + for item in filtered_items: + row = [] + for column in columns: + if column.type == 'Model Field': + # Access the field value directly + value = getattr(item, column.value_id.name, '') + elif column.type == 'Special': + if column.special_type == 'product_availability': + # Access the product's on-hand quantity + on_hand_qty = item.qty_available + # Set value based on on-hand quantity + if on_hand_qty == 0: + value = 'out of stock' + else: + value = 'in stock' + elif column.special_type == 'qty': + value = item.qty_available + elif column.special_type == 'product_price': + value = item.standard_price + elif column.special_type == 'disc_price': + value = item.list_price + elif column.special_type == 'price_without_tax': + value = item.list_price + elif column.special_type == 'price_currency': + value = self.currency_id.name + elif column.type == 'Text': + value = column.value + elif column.type == 'Value': + value = column.field_value_id.column_name + else: + value = column.value + row.append(value) + formatted_rows.append(row) + return formatted_rows + + @http.route(['/product_data//', + '/product_data/' + ], type="http", + auth='public') + def product_data(self, id, name): + """Making the product data into a CSV formate.""" + record = request.env['product.data.feed'].sudo().browse(id) + column_ids = record.feed_columns_line_ids + item_filter = eval(record.item_filter) if record.item_filter else [] + formatted_file_content = self.generate_formatted_file_content( + column_ids, item_filter, record) + csv_content = StringIO() + csv_writer = csv.writer(csv_content) + column_header = [column.name for column in column_ids] + csv_writer.writerow(column_header) + for row in formatted_file_content: + csv_writer.writerow(row) + # Get CSV content as a string + csv_string = csv_content.getvalue() + csv_content.close() + headers = [ + ('Content-Type', 'text/csv'), + ('Content-Disposition', http.content_disposition(name + '.csv')), + ] + return request.make_response(csv_string, headers=headers) diff --git a/odoo_fb_insta_product_data_feed/doc/RELEASE_NOTES.md b/odoo_fb_insta_product_data_feed/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9b3d509f0 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 20.04.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Product Data Feed Generation diff --git a/odoo_fb_insta_product_data_feed/models/__init__.py b/odoo_fb_insta_product_data_feed/models/__init__.py new file mode 100644 index 000000000..c63cf5c69 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 field_column_value +from . import product_data_feed +from . import product_data_feed_columns diff --git a/odoo_fb_insta_product_data_feed/models/field_column_value.py b/odoo_fb_insta_product_data_feed/models/field_column_value.py new file mode 100644 index 000000000..4b3f38b52 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/models/field_column_value.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 FieldColumnValue(models.Model): + """Model for storing field column values. + + This class represents field column values used in a product data feed. + It is used to define the mapping of column names to their corresponding + values. + """ + _name = 'field.column.value' + _description = 'Field Column Value' + _rec_name = 'value' + + feed_id = fields.Many2one('product.data.feed', + string='Feed Name', help='Feed Name') + column_name = fields.Char(string='Column Name', + help='Enter the column name.') + value = fields.Char(string='Value', help='Value of the column name.') diff --git a/odoo_fb_insta_product_data_feed/models/product_data_feed.py b/odoo_fb_insta_product_data_feed/models/product_data_feed.py new file mode 100644 index 000000000..fb0027c02 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/models/product_data_feed.py @@ -0,0 +1,246 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 . +# +############################################################################### +import base64 +import secrets +import string +import csv +from io import StringIO +from odoo import api, fields, models + + +class ProductDataFeed(models.Model): + """Data feed model for managing and generating product data feeds. + This class represents a product data feed, which can be used to export + product information in a specific format. It inherits from 'mail.thread' + and 'mail.activity.mixin' to provide messaging and activity tracking + capabilities.""" + _name = 'product.data.feed' + _description = 'Product Data Feed' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Name', help='Name of the feed', copy=False, + required=True) + url_link = fields.Char(string='Link', help='Data feed download link', + compute='_compute_url_link') + is_token = fields.Boolean(string='Use Token', + help='Use token or Not for the ' + 'security') + access_token = fields.Char(string='Access Token', + help='Access Token of the feed', + compute='_compute_access_token') + website_id = fields.Many2one('website', string='Websites', + help='Allow this data feed for the selected ' + 'websites.Allow for all if not set ') + format = fields.Char(string='File Formate', + help='The file formate of the data feed.', + default='CSV', readonly=True) + is_file_name = fields.Boolean(string='File Name', + help='Enabled the file name') + name_show = fields.Char(string='File Name', help='Show the file name', + compute='_compute_name_show') + use_model = fields.Selection( + [('Product', 'Product'), ('Product Variant', 'Product Variant')], + string='Use Model', help='Used model of the product feed', + default='Product', required=True) + used_model = fields.Char(string='Used Model', help='Model') + item_filter = fields.Char(string='Item Filter', help='The model domain to' + ' filter for the feed') + feed_columns_line_ids = fields.One2many('product.data.feed.columns', + 'data_feed_columns_id', + string='Columns', + help='Feed column line', + readonly=True,) + columns_count = fields.Integer(string='Columns Count', + help='Total number of columns used this ' + 'feed', + compute='_compute_columns_count') + + def generate_formatted_file_content(self, columns, item_filter): + """Generate formatted content for a file based on specified columns + and an item filter.This method applies the provided filter criteria to + fetch relevant items from the environment, and then generates formatted + rows of values for the specified columns for each item.""" + # Apply the filter criteria and fetch the relevant items + filtered_items = self.env[self.used_model].search(item_filter) + formatted_rows = [] + # Iterate over each item and generate a row of values + for item in filtered_items: + row = [] + value = '' + for column in columns: + if column.type == 'Model Field': + # Access the field value directly + model_value = getattr(item, column.value_id.name, '') + if model_value: + value = model_value + else: + value = '' + + elif column.type == 'Special': + if column.special_type == 'product_availability': + # Access the product's on-hand quantity + on_hand_qty = item.qty_available + # Set value based on on-hand quantity + if on_hand_qty == 0: + value = 'out of stock' + else: + value = 'in stock' + elif column.special_type == 'qty': + value = item.qty_available + elif column.special_type == 'product_price': + value = item.standard_price + elif column.special_type == 'disc_price': + value = item.list_price + elif column.special_type == 'price_without_tax': + value = item.list_price + elif column.special_type == 'price_currency': + value = self.currency_id.name + elif column.special_type == 'image_link': + value = item.image_1920 + elif column.special_type == 'price_tax': + if item.taxes_id: + value = (item.list_price * ( + item.taxes_id.amount / 100) + + item.list_price) + else: + value = 0.0 + elif column.type == 'Text': + value = column.value + elif column.type == 'Value': + value = column.field_value_id.value + else: + value = column.value + if value: + row.append(value) + formatted_rows.append(row) + return formatted_rows + + def action_download_doc(self): + """Download the catalog""" + columns = self.feed_columns_line_ids + item_filter = eval(self.item_filter) if self.item_filter else [] + formatted_file_content = self.generate_formatted_file_content( + columns, item_filter) + # Create a CSV content string + csv_content = StringIO() + csv_writer = csv.writer(csv_content) + column_header = [column.name for column in columns] + csv_writer.writerow(column_header) + for row in formatted_file_content: + csv_writer.writerow(row) + encoded_content = csv_content.getvalue().encode('utf-8') + # Close the StringIO buffer + csv_content.close() + attachment = self.env['ir.attachment'].create({ + 'name': self.name_show if self.name_show else 'feed', + 'type': 'binary', + 'datas': base64.b64encode(encoded_content), + 'res_model': self.used_model, + 'res_id': self.id, + 'mimetype': 'text/csv' + }) + return { + 'type': 'ir.actions.act_url', + 'target': 'new', + 'url': f"/web/content/{attachment.id}?download=true" + } + + def action_product_items(self): + """Open the product item list""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Feed Items', + 'view_mode': 'tree,form', + 'res_model': self.used_model, + 'domain': self.item_filter, + 'context': self.env.context, + } + + def action_columns_creation(self): + """Create the columns for feed.""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Columns', + 'view_mode': 'tree,form', + 'res_model': 'product.data.feed.columns', + 'context': { + 'default_feed_id': self.id, + 'default_data_feed_columns_id': self.id, + }, + 'domain': [('feed_id', '=', self.id)] + } + + @api.depends('access_token') + def _compute_access_token(self): + """Update the access token when enabling the token boolean field""" + access_tokens = secrets.token_urlsafe(27) + self.write({'access_token': access_tokens}) + + def action_refresh_token(self): + """Refresh and generate new token""" + access_tokens = secrets.token_urlsafe( + 27) # 27 bytes gives you 36 characters + self.write({'access_token': access_tokens}) + + @api.depends('name_show') + def _compute_name_show(self): + """Generate the random name when enabling the file_name""" + prefix = "feed-" + random_length = 4 + random_chars = ''.join( + secrets.choice(string.ascii_letters + string.digits) for _ in + range(random_length)) + random_name = prefix + random_chars + self.write({'name_show': random_name}) + + @api.onchange('use_model') + def _onchange_use_model(self): + """When changing the use_model it update the model into used_model""" + if self.use_model == 'Product': + self.write({'used_model': 'product.template'}) + else: + self.write({'used_model': 'product.product'}) + + @api.depends('format', 'name_show', 'is_token') + def _compute_url_link(self): + """Compute the downloading link""" + for feed in self: + base_url = self.env['ir.config_parameter'].get_param( + 'web.base.url') + '/product_data' + if feed.is_token and feed.is_file_name: + feed.url_link = f'{base_url}/{self.id}/{feed.name_show}.{feed.format}?access_token={feed.access_token}' + elif feed.is_file_name: + feed.url_link = f'{base_url}/{self.id}/{feed.name_show}.{feed.format}' + elif feed.is_token: + feed.url_link = f'{base_url}/{self.id}/feed.{feed.format}?access_token={feed.access_token}' + else: + feed.url_link = f'{base_url}/{self.id}/feed.{feed.format}' + + def _compute_columns_count(self): + """Calculate the total number of column count of the current feed""" + for rec in self: + if rec.ids: + rec.columns_count = self.env[ + 'product.data.feed.columns'].search_count( + [('feed_id', '=', rec.id)]) + else: + rec.columns_count = 0 diff --git a/odoo_fb_insta_product_data_feed/models/product_data_feed_columns.py b/odoo_fb_insta_product_data_feed/models/product_data_feed_columns.py new file mode 100644 index 000000000..ca47e7abe --- /dev/null +++ b/odoo_fb_insta_product_data_feed/models/product_data_feed_columns.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Subina P (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 ProductDataFeedColumns(models.Model): + """Model for defining columns in a product data feed. + + This class represents the columns used in a product data feed. These columns + define the structure of the data to be included in the feed, including + various types such as text, model fields, values, and special types.""" + _name = 'product.data.feed.columns' + _description = 'Product Data Feed Columns' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Name', help='Columns name') + feed_id = fields.Many2one('product.data.feed', + string='Feed', help='Feed Name') + type = fields.Selection( + [('Text', 'Text'), ('Model Field', 'Model Field'), + ('Value', 'Value'), ('Special', 'Special')], + string='Type', help='Choose the type of the columns') + value = fields.Char(string="Value", help='Enter the column value') + value_id = fields.Many2one('ir.model.fields', + string="Value", help='Choose the column value', + ) + field_value_id = fields.Many2one('field.column.value', + string="Value", + help='Choose the column value') + data_feed_columns_id = fields.Many2one('product.data.feed', + string='Data Columns', + help='Data columns inverse field') + special_type = fields.Selection( + [('product_price', 'Product Price'), + ('disc_price', 'Discounted Price'), + ('price_currency', 'Price Currency'), + ('product_availability', 'Product Availability'), + ('qty', 'Qty in Stock'), + ('price_tax', 'Product Price(with Taxes)'), + ('price_without_tax', 'Product Price(without Taxes)')], + string='Special Type', help='Choose the special type') diff --git a/odoo_fb_insta_product_data_feed/security/ir.model.access.csv b/odoo_fb_insta_product_data_feed/security/ir.model.access.csv new file mode 100644 index 000000000..9c853fadb --- /dev/null +++ b/odoo_fb_insta_product_data_feed/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_data_feed_user,access.product.data.feed.user,model_product_data_feed,base.group_user,1,1,1,1 +access_product_data_feed_columns_user,access.product.data.feed.columns.user,model_product_data_feed_columns,base.group_user,1,1,1,1 +access_field_column_value_user,access.field.column.value.user,model_field_column_value,base.group_user,1,1,1,1 diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/capture (1).png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/capture (1).png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/check.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/check.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/chevron.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/chevron.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/cogs.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/cogs.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/consultation.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/consultation.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/ecom-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/education-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/education-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/hotel-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/img.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/img.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/license.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/license.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/lifebuoy.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/manufacturing-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/photo-capture.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/photo-capture.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/pos-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/pos-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/puzzle.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/puzzle.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/restaurant-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/service-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/service-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/trading-black.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/trading-black.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/training.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/training.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/update.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/update.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/user.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/user.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/icons/wrench.png b/odoo_fb_insta_product_data_feed/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/icons/wrench.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/Cybrosys R.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/categories.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/categories.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/check-box.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/check-box.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/compass.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/compass.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/corporate.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/corporate.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/customer-support.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/customer-support.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/cybrosys-logo.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/email.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/features.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/features.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/logo.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/logo.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/phone.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/pictures.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/pictures.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/pie-chart.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/right-arrow.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/star (1) 2.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/star.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/star.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/support (1) 1.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/support-email.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/support.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/support.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/tick-mark.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp 1.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.png b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.svg b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.gif b/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.gif new file mode 100644 index 000000000..beb106101 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.gif differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..b54c849a1 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/1.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/2.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..6f6063ea9 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/2.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/3.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..ab375ff3a Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/3.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/4.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..9f7bf6c1c Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/4.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/5.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..b957c613f Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/5.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/modules/6.jpg b/odoo_fb_insta_product_data_feed/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..d1c43c6b4 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/modules/6.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb3.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb3.png new file mode 100644 index 000000000..b14af4010 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb3.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb4.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb4.png new file mode 100644 index 000000000..4dcffb99a Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb4.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb5.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb5.png new file mode 100644 index 000000000..e5d748ab8 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb5.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb6.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb6.png new file mode 100644 index 000000000..9816a3597 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb6.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb7.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb7.png new file mode 100644 index 000000000..61273fbdb Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb7.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb8.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb8.png new file mode 100644 index 000000000..2f220474e Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb8.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb9.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb9.png new file mode 100644 index 000000000..cf0480a5c Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb9.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat1.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat1.png new file mode 100644 index 000000000..a529f78ca Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat1.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat2.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat2.png new file mode 100644 index 000000000..08d88faa3 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/fb_cat2.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed1.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed1.png new file mode 100644 index 000000000..7673c9445 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed1.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed2.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed2.png new file mode 100644 index 000000000..9571b9939 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed2.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.1.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.1.png new file mode 100644 index 000000000..2f6c36dcd Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.1.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.png new file mode 100644 index 000000000..6614bc241 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed3.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.1.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.1.png new file mode 100644 index 000000000..cbf8e2ee8 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.1.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.png new file mode 100644 index 000000000..616792a57 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed4.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed5.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed5.png new file mode 100644 index 000000000..334ea1e50 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed5.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed6.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed6.png new file mode 100644 index 000000000..5b9a09801 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed6.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed7.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed7.png new file mode 100644 index 000000000..2cbf4189e Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed7.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed8.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed8.png new file mode 100644 index 000000000..67b03e3b5 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/feed8.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/hero.gif b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..dacf4d608 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img101.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img101.png new file mode 100644 index 000000000..859461bba Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img101.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img102.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img102.png new file mode 100644 index 000000000..c6920f251 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img102.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img22.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img22.png new file mode 100644 index 000000000..4a6e60ccd Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/img22.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/website.png b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/website.png new file mode 100644 index 000000000..813fee2a1 Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/assets/screenshots/website.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/banner.jpg b/odoo_fb_insta_product_data_feed/static/description/banner.jpg new file mode 100644 index 000000000..072d9072a Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/banner.jpg differ diff --git a/odoo_fb_insta_product_data_feed/static/description/icon.png b/odoo_fb_insta_product_data_feed/static/description/icon.png new file mode 100644 index 000000000..b16425c1d Binary files /dev/null and b/odoo_fb_insta_product_data_feed/static/description/icon.png differ diff --git a/odoo_fb_insta_product_data_feed/static/description/index.html b/odoo_fb_insta_product_data_feed/static/description/index.html new file mode 100644 index 000000000..260b0708b --- /dev/null +++ b/odoo_fb_insta_product_data_feed/static/description/index.html @@ -0,0 +1,1139 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Product Data Feed Generation

+

+ Generate Product Catalog Feeds Link +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Community & Enterprise Support.

+
+
+
+
+
+
+ +
+
+

+ You can create the catalog of the product easily(Feed creation)

+
+
+
+
+
+
+ +
+
+

+ You can also add multiple feeds.

+
+
+
+
+
+
+ +
+
+

+ The data feed formate is CSV file.

+
+
+
+
+
+
+ +
+
+

+ You can filter the records based on the domain.

+
+
+
+
+
+
+ +
+
+

+ You can enable the auto generated file name.

+
+
+
+
+
+
+ +
+
+

+ You can share the Feed Link to anyone and post the link Facebook or Instagram.

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

Product Data Feed.

+

+ Go to Website -> eCommerce -> Product Data Feed + -> + Under the eCommerce Menu you can see the Product Data Feed submenu + clicking the menu its open the Product data Feed creation model. +

+
+
+
+
+
+
+ +
+
+

+ Product Data Feed Tree View. +

+

+ Here you could see the list view of the Data Feed +

+
+
+
+
+
+
+ +
+
+

+ Product Data Feed Model. +

+

+ Inside the form view, you can configure the data feed security and format options. +

+
+
+
+
+
+
+ +
+
+

+ +

+

+ *You could make the data feed token protected by enabling Use Token option.
+ *You can regenerate the access token if needed.
+ *If you use multi websites, you can specify which ones will allow this data feed.
+ *Enable the file name to edit the file name.
+ *You can filter the products.
+ *The file format is CSV by default
+

+
+
+
+
+
+
+ +
+
+

+ Product Data Feed Column Smart Button. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Inside 'Columns', you could create the columns to show for the data feed. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Product Data Feed Column Model Creation. +

+

+ There are different options available. +

+
+
+
+
+
+
+ +
+
+

+ Product Data Feed Item Smart Button. +

+

+ +

+
+
+
+
+
+
+ +
+
+

+ All the filtered products can be seen inside the smart button 'Items' +

+

+

+
+
+
+
+
+
+ +
+
+

+ Copy the link to the product data feed file + to share it with anyone, or you can paste the + link on Facebook. By doing this, you will be + able to promote your product on various sales + channels. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Add the Catalogue. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Select the E-commerce Catalogue Type. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Select the Owner and Enter the Catalogue Name. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Click View Catalogue, to View the Catalogue. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Open Data Sources. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Select Data Feed then Next. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Paste Product Data Feed Link here. +

+

+

+
+
+
+
+
+
+ +
+
+

+ Add more Details about the Product. +

+

+

+
+
+
+
+
+
+ +
+
+

+ View of Product Data Feed. +

+

+

+
+
+
+
+
+
+ +
+
+

+

+

+

+
+
+
+
+
+
+ +
+
+

+ Downloaded File +

+

+

+
+
+
+
+
+
+
    +
  • + + Community & Enterprise Support. +
  • +
  • + + You can create the catalog of the product easily(Feed creation) +
  • +
  • + + You can also add multiple feeds. +
  • +
  • + + The data feed formate is CSV file. +
  • +
  • + + You can filter the records based on the domain. +
  • +
  • + + You can enable the auto generated file name. +
  • +
  • + + You can share the Feed Link to anyone and post + the link Facebook or Instagram. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:2nd April 2024 +
+

+ Initial Commit for Product Data Feed Generation

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/odoo_fb_insta_product_data_feed/views/field_column_value_views.xml b/odoo_fb_insta_product_data_feed/views/field_column_value_views.xml new file mode 100644 index 000000000..2db8bdb61 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/views/field_column_value_views.xml @@ -0,0 +1,19 @@ + + + + + field.column.value.view.form + field.column.value + +
+ + + + + + + +
+
+
+
diff --git a/odoo_fb_insta_product_data_feed/views/product_data_feed_columns_views.xml b/odoo_fb_insta_product_data_feed/views/product_data_feed_columns_views.xml new file mode 100644 index 000000000..31cdd7811 --- /dev/null +++ b/odoo_fb_insta_product_data_feed/views/product_data_feed_columns_views.xml @@ -0,0 +1,49 @@ + + + + + product.data.feed.columns.view.form + product.data.feed.columns + +
+ + +
+ + + +
+
+
+
+ + + product.data.feed.columns.view.tree + product.data.feed.columns + + + + + + + + + +
diff --git a/odoo_fb_insta_product_data_feed/views/product_data_feed_views.xml b/odoo_fb_insta_product_data_feed/views/product_data_feed_views.xml new file mode 100644 index 000000000..27ba3ac6c --- /dev/null +++ b/odoo_fb_insta_product_data_feed/views/product_data_feed_views.xml @@ -0,0 +1,111 @@ + + + + + Data Feed + ir.actions.act_window + product.data.feed + tree,form + +

+ Click to add the data feed details. +

+
+
+ + + product.data.feed.view.form + product.data.feed + +
+
+
+ + +
+ +
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + + product.data.feed.view.tree + product.data.feed + + + + + + + + + + + +
diff --git a/product_brand_ecommerce/README.rst b/product_brand_ecommerce/README.rst new file mode 100644 index 000000000..66aed28a1 --- /dev/null +++ b/product_brand_ecommerce/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Product Brand In Ecommerce +========================== +* This module allows you to manage the Product brands easily. + +Installation +============ +- www.odoo.com/documentation/17.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: Afras Habis, + (V15) Midilaj V K, + (V16) Neenu Merlin Jose, + (V17) Akhil Ashok, 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 + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/product_brand_ecommerce/__init__.py b/product_brand_ecommerce/__init__.py new file mode 100644 index 000000000..296983a93 --- /dev/null +++ b/product_brand_ecommerce/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok (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 controllers diff --git a/product_brand_ecommerce/__manifest__.py b/product_brand_ecommerce/__manifest__.py new file mode 100644 index 000000000..931cab9d2 --- /dev/null +++ b/product_brand_ecommerce/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok (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': 'Product Brand In Ecommerce', + 'version': '17.0.1.0.0', + 'category': 'eCommerce', + 'summary': 'Manage Product brand in eCommerce', + 'description': 'This module allows you to manage the Product brands ' + 'easily.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['product_brand_sale', 'website_sale'], + 'data': [ + 'views/product_brand_templates.xml', + 'views/sale_report_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_brand_ecommerce/controllers/__init__.py b/product_brand_ecommerce/controllers/__init__.py new file mode 100644 index 000000000..09c64b328 --- /dev/null +++ b/product_brand_ecommerce/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok (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 main diff --git a/product_brand_ecommerce/controllers/main.py b/product_brand_ecommerce/controllers/main.py new file mode 100644 index 000000000..dbd909fa1 --- /dev/null +++ b/product_brand_ecommerce/controllers/main.py @@ -0,0 +1,468 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# 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 . +# +############################################################################# +import logging +from datetime import datetime +from werkzeug.exceptions import NotFound +from odoo import fields, http, tools +from odoo.http import request +from odoo.addons.http_routing.models.ir_http import slug +from odoo.addons.payment.controllers import portal as payment_portal +from odoo.addons.website.controllers.main import QueryURL +from odoo.addons.website.models.ir_http import sitemap_qs2dom +from odoo.tools import lazy + +_logger = logging.getLogger(__name__) + + +class TableCompute(object): + """ + Class for computing the arrangement of products on a grid. + """ + def __init__(self): + self.table = {} + + def _check_place(self, posx, posy, sizex, sizey, ppr): + """ + Check if a specified rectangular area is available in the table. + + Parameters: + - posx (int): The starting x-coordinate of the area. + - posy (int): The starting y-coordinate of the area. + - sizex (int): The width of the area. + - sizey (int): The height of the area. + - ppr (int): Maximum allowed x-coordinate in the table. + + Returns: + bool: True if the area is available, False otherwise. + + The function iterates over the specified area and checks if each cell is + within the bounds of the table and if the cell is unoccupied. It returns + True if the entire area is available; otherwise, it returns False. + """ + res = True + for y in range(sizey): + for x in range(sizex): + if posx + x >= ppr: + res = False + break + row = self.table.setdefault(posy + y, {}) + if row.setdefault(posx + x) is not None: + res = False + break + for x in range(ppr): + self.table[posy + y].setdefault(x, None) + return res + + def process(self, products, ppg=20, ppr=4): + """ + Arrange a list of products on a grid and format the result for HTML + representation. + + Parameters: + - products (list): A list of product objects to be arranged on the + grid. + - ppg (int): The maximum number of products per grid page + (default is 20). + - ppr (int): The maximum number of products per row in the grid + (default is 4). + + Returns: + list: A formatted representation of the arranged products suitable + for HTML rendering.The result is a list of rows, where each row is + a list of dictionaries representing products and their positions on + the grid. + + The function iterates over the list of products and computes their + positions on the grid.It uses a heuristic algorithm to determine the + position of each product, taking into account the dimensions of the + products, the maximum products per page, and the maximum products per + row.The result is formatted as a list of rows, each containing + dictionaries representing the products and their positions on the grid. + """ + # Compute products positions on the grid + minpos = 0 + index = 0 + maxy = 0 + x = 0 + for p in products: + x = min(max(p.website_size_x, 1), ppr) + y = min(max(p.website_size_y, 1), ppr) + if index >= ppg: + x = y = 1 + pos = minpos + while not self._check_place(pos % ppr, pos // ppr, x, y, ppr): + pos += 1 + # if 21st products (index 20) and the last line is full (ppr products in it), break + # (pos + 1.0) / ppr is the line where the product would be inserted + # maxy is the number of existing lines + # + 1.0 is because pos begins at 0, thus pos 20 is actually the 21st block + # and to force python to not round the division operation + if index >= ppg and ((pos + 1.0) // ppr) > maxy: + break + if x == 1 and y == 1: # simple heuristic for CPU optimization + minpos = pos // ppr + + for y2 in range(y): + for x2 in range(x): + self.table[(pos // ppr) + y2][(pos % ppr) + x2] = False + self.table[pos // ppr][pos % ppr] = { + 'product': p, 'x': x, 'y': y, + 'ribbon': p.sudo().website_ribbon_id, + } + if index <= ppg: + maxy = max(maxy, y + (pos // ppr)) + index += 1 + # Format table according to HTML needs + rows = sorted(self.table.items()) + rows = [r[1] for r in rows] + for col in range(len(rows)): + cols = sorted(rows[col].items()) + x += len(cols) + rows[col] = [r[1] for r in cols if r[1]] + return rows + + +class WebsiteSale(payment_portal.PaymentPortal): + + def sitemap_shop(env, rule, qs): + """ + Generate sitemap entries for the Odoo eCommerce shop. + """ + if not qs or qs.lower() in '/shop': + yield {'loc': '/shop'} + + Category = env['product.public.category'] + dom = sitemap_qs2dom(qs, '/shop/category', Category._rec_name) + dom += env['website'].get_current_website().website_domain() + for cat in Category.search(dom): + loc = '/shop/category/%s' % slug(cat) + if not qs or qs.lower() in loc: + yield {'loc': loc} + + @http.route([ + '/shop', + '/shop/page/', + '/shop/category/', + '/shop/category//' + 'page/', + '''/shop/brand/''', + ], type='http', auth="public", website=True, sitemap=sitemap_shop) + def shop(self, page=0, category=None, search='', min_price=0.0, + max_price=0.0, + ppg=False, brand=None, **post): + """ + Render the eCommerce shop page. + + This function handles the rendering of the eCommerce shop page based on + the provided parameters. + It retrieves and filters products, applies pricing rules, and prepares + the data for rendering. + """ + add_qty = int(post.get('add_qty', 1)) + try: + min_price = float(min_price) + except ValueError: + min_price = 0 + try: + max_price = float(max_price) + except ValueError: + max_price = 0 + compute_brand = brand + Category = request.env['product.public.category'] + if category: + category = Category.search([('id', '=', int(category))], limit=1) + if not category or not category.can_access_from_current_website(): + raise NotFound() + else: + category = Category + product_brand = request.env['product.brand'] + if not brand: + brand = product_brand + website = request.env['website'].get_current_website() + website_domain = website.website_domain() + if ppg: + try: + ppg = int(ppg) + post['ppg'] = ppg + except ValueError: + ppg = False + if not ppg: + ppg = website.shop_ppg or 20 + + ppr = website.shop_ppr or 4 + + request_args = request.httprequest.args + attrib_list = request_args.getlist('attrib') + attrib_values = [[int(x) for x in v.split("-")] for v in attrib_list if + v] + attributes_ids = {v[0] for v in attrib_values} + attrib_set = {v[1] for v in attrib_values} + + filter_by_tags_enabled = website.is_view_active( + 'website_sale.filter_products_tags') + if filter_by_tags_enabled: + tags = request_args.getlist('tags') + # Allow only numeric tag values to avoid internal error. + if tags and all(tag.isnumeric() for tag in tags): + post['tags'] = tags + tags = {int(tag) for tag in tags} + else: + post['tags'] = None + tags = {} + + keep = QueryURL('/shop', **self._shop_get_query_url_kwargs( + category and int(category), search, min_price, max_price, **post)) + + now = datetime.timestamp(datetime.now()) + pricelist = website.pricelist_id + if 'website_sale_pricelist_time' in request.session: + # Check if we need to refresh the cached pricelist + pricelist_save_time = request.session['website_sale_pricelist_time'] + if pricelist_save_time < now - 60 * 60: + request.session.pop('website_sale_current_pl', None) + website.invalidate_recordset(['pricelist_id']) + pricelist = website.pricelist_id + request.session['website_sale_pricelist_time'] = now + request.session['website_sale_current_pl'] = pricelist.id + else: + request.session['website_sale_pricelist_time'] = now + request.session['website_sale_current_pl'] = pricelist.id + + filter_by_price_enabled = website.is_view_active( + 'website_sale.filter_products_price') + if filter_by_price_enabled: + company_currency = website.company_id.currency_id + conversion_rate = request.env['res.currency']._get_conversion_rate( + company_currency, website.currency_id, + request.website.company_id, + fields.Date.today()) + else: + conversion_rate = 1 + + url = '/shop' + if search: + post['search'] = search + if attrib_list: + post['attrib'] = attrib_list + + options = self._get_search_options( + category=category, + attrib_values=attrib_values, + min_price=min_price, + max_price=max_price, + conversion_rate=conversion_rate, + display_currency=website.currency_id, + **post + ) + fuzzy_search_term, product_count, search_product = self._shop_lookup_products( + attrib_set, options, post, search, website) + + filter_by_price_enabled = website.is_view_active( + 'website_sale.filter_products_price') + if filter_by_price_enabled: + # TODO Find an alternative way to obtain the domain through the search metadata. + Product = request.env['product.template'].with_context( + bin_size=True) + domain = self._get_shop_domain(search, category, attrib_values) + + # This is ~4 times more efficient than a search for the cheapest and most expensive products + query = Product._where_calc(domain) + Product._apply_ir_rules(query, 'read') + from_clause, where_clause, where_params = query.get_sql() + query = f""" + SELECT COALESCE(MIN(list_price), 0) * {conversion_rate}, COALESCE(MAX(list_price), 0) * {conversion_rate} + FROM {from_clause} + WHERE {where_clause} + """ + request.env.cr.execute(query, where_params) + available_min_price, available_max_price = request.env.cr.fetchone() + + if min_price or max_price: + # The if/else condition in the min_price / max_price value assignment + # tackles the case where we switch to a list of products with different + # available min / max prices than the ones set in the previous page. + # In order to have logical results and not yield empty product lists, the + # price filter is set to their respective available prices when the specified + # min exceeds the max, and / or the specified max is lower than the available min. + if min_price: + min_price = min_price if min_price <= available_max_price else available_min_price + post['min_price'] = min_price + if max_price: + max_price = max_price if max_price >= available_min_price else available_max_price + post['max_price'] = max_price + + if filter_by_tags_enabled: + if ( + search_product.product_tag_ids + or search_product.product_variant_ids.additional_product_tag_ids + ): + ProductTag = request.env['product.tag'] + all_tags = ProductTag.search( + [('product_ids.is_published', '=', True), + ('visible_on_ecommerce', '=', True)] + + website_domain + ) + else: + all_tags = [] + categs_domain = [('parent_id', '=', False)] + website_domain + if search: + search_categories = Category.search( + [( + 'product_tmpl_ids', 'in', search_product.ids)] + website_domain + ).parents_and_self + categs_domain.append(('id', 'in', search_categories.ids)) + else: + search_categories = Category + categs = lazy(lambda: Category.search(categs_domain)) + + if category: + url = "/shop/category/%s" % slug(category) + + pager = website.pager(url=url, total=product_count, page=page, step=ppg, + scope=7, url_args=post) + offset = pager['offset'] + products = search_product[offset:offset + ppg] + + ProductAttribute = request.env['product.attribute'] + if products: + # get all products without limit + attributes = lazy(lambda: ProductAttribute.search([ + ('product_tmpl_ids', 'in', search_product.ids), + ('visibility', '=', 'visible'), + ])) + else: + attributes = lazy(lambda: ProductAttribute.browse(attributes_ids)) + + layout_mode = request.session.get('website_sale_shop_layout_mode') + if not layout_mode: + if website.viewref('website_sale.products_list_view').active: + layout_mode = 'list' + else: + layout_mode = 'grid' + request.session['website_sale_shop_layout_mode'] = layout_mode + + # Try to fetch geoip based fpos or fallback on partner one + fiscal_position_sudo = website.fiscal_position_id.sudo() + products_prices = lazy( + lambda: products._get_sales_prices(pricelist, fiscal_position_sudo)) + products_prices_brand = lazy( + lambda: search_product._get_sales_prices(pricelist, fiscal_position_sudo)) + product_brand = request.env['product.brand'].search([]) + if compute_brand: + products_brand = request.env['product.template'].search( + ['&', '&', ('brand_id', '=', brand.id), ('sale_ok', '=', True), + ('is_published', '=', True)]) + product_brand_count = len(products_brand) + pager_brand = request.website.pager(url=url, + total=product_brand_count, + page=page, step=ppg, scope=7, + url_args=post) + values = { + 'search': fuzzy_search_term or search, + 'original_search': fuzzy_search_term and search, + 'order': post.get('order', ''), + 'category': category, + 'brand': brand, + 'attrib_values': attrib_values, + 'attrib_set': attrib_set, + 'pager': pager_brand, + 'pricelist': pricelist, + 'fiscal_position': fiscal_position_sudo, + 'add_qty': add_qty, + 'products': products_brand, + 'search_product': search_product, + 'search_count': product_brand_count, # common for all searchbox + 'bins': lazy( + lambda: TableCompute().process(products_brand, ppg, ppr)), + 'ppg': ppg, + 'ppr': ppr, + 'categories': categs, + 'attributes': attributes, + 'keep': keep, + 'search_categories_ids': search_categories.ids, + 'layout_mode': layout_mode, + 'brands':product_brand, + 'products_prices': products_prices, + 'get_product_prices': lambda product: lazy( + lambda: products_prices_brand[product.id]), + 'float_round': tools.float_round, + } + + if filter_by_price_enabled: + values['min_price'] = min_price or available_min_price + values['max_price'] = max_price or available_max_price + values['available_min_price'] = tools.float_round( + available_min_price, + 2) + values['available_max_price'] = tools.float_round( + available_max_price, + 2) + if filter_by_tags_enabled: + values.update({'all_tags': all_tags, 'tags': tags}) + if category: + values['main_object'] = category + values.update(self._get_additional_shop_values(values)) + return request.render("website_sale.products", values) + else: + values = { + 'brand': brand, + 'search': search, + 'category': category, + 'original_search': fuzzy_search_term and search, + 'order': post.get('order', ''), + 'attrib_values': attrib_values, + 'attrib_set': attrib_set, + 'pager': pager, + 'pricelist': pricelist, + 'add_qty': add_qty, + 'products': products, + 'search_count': product_count, # common for all searchbox + 'bins': lazy( + lambda: TableCompute().process(products, ppg, ppr)), + 'ppg': ppg, + 'ppr': ppr, + 'categories': categs, + 'attributes': attributes, + 'keep': keep, + 'search_categories_ids': search_categories.ids, + 'layout_mode': layout_mode, + 'brands': product_brand, + 'products_prices': products_prices, + 'get_product_prices': lambda product: lazy( + lambda: products_prices[product.id]), + 'float_round': tools.float_round, + } + if filter_by_price_enabled: + values['min_price'] = min_price or available_min_price + values['max_price'] = max_price or available_max_price + values['available_min_price'] = tools.float_round( + available_min_price, + 2) + values['available_max_price'] = tools.float_round( + available_max_price, + 2) + if filter_by_tags_enabled: + values.update({'all_tags': all_tags, 'tags': tags}) + if category: + values['main_object'] = category + values.update(self._get_additional_shop_values(values)) + return request.render("website_sale.products", values) diff --git a/product_brand_ecommerce/doc/RELEASE_NOTES.md b/product_brand_ecommerce/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..256239e2f --- /dev/null +++ b/product_brand_ecommerce/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 23.04.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Product Brand In Ecommerce diff --git a/product_brand_ecommerce/static/description/assets/icons/capture (1).png b/product_brand_ecommerce/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/capture (1).png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/check.png b/product_brand_ecommerce/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/check.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/chevron.png b/product_brand_ecommerce/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/chevron.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/cogs.png b/product_brand_ecommerce/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/cogs.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/consultation.png b/product_brand_ecommerce/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/consultation.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/ecom-black.png b/product_brand_ecommerce/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/ecom-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/education-black.png b/product_brand_ecommerce/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/education-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/hotel-black.png b/product_brand_ecommerce/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/hotel-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/img.png b/product_brand_ecommerce/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/img.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/license.png b/product_brand_ecommerce/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/license.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/lifebuoy.png b/product_brand_ecommerce/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/lifebuoy.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/manufacturing-black.png b/product_brand_ecommerce/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/photo-capture.png b/product_brand_ecommerce/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/photo-capture.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/pos-black.png b/product_brand_ecommerce/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/pos-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/puzzle.png b/product_brand_ecommerce/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/puzzle.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/restaurant-black.png b/product_brand_ecommerce/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/restaurant-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/service-black.png b/product_brand_ecommerce/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/service-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/trading-black.png b/product_brand_ecommerce/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/trading-black.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/training.png b/product_brand_ecommerce/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/training.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/update.png b/product_brand_ecommerce/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/update.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/user.png b/product_brand_ecommerce/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/user.png differ diff --git a/product_brand_ecommerce/static/description/assets/icons/wrench.png b/product_brand_ecommerce/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/icons/wrench.png differ diff --git a/product_brand_ecommerce/static/description/assets/misc/Cybrosys R.png b/product_brand_ecommerce/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/misc/Cybrosys R.png differ diff --git a/product_brand_ecommerce/static/description/assets/misc/email.svg b/product_brand_ecommerce/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/phone.svg b/product_brand_ecommerce/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/star (1) 2.svg b/product_brand_ecommerce/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/support (1) 1.svg b/product_brand_ecommerce/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/support-email.svg b/product_brand_ecommerce/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/tick-mark.svg b/product_brand_ecommerce/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/whatsapp 1.svg b/product_brand_ecommerce/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/misc/whatsapp.svg b/product_brand_ecommerce/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/product_brand_ecommerce/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_brand_ecommerce/static/description/assets/modules/1.jpg b/product_brand_ecommerce/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..0edf328e5 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/1.jpg differ diff --git a/product_brand_ecommerce/static/description/assets/modules/2.gif b/product_brand_ecommerce/static/description/assets/modules/2.gif new file mode 100644 index 000000000..8ac32db03 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/2.gif differ diff --git a/product_brand_ecommerce/static/description/assets/modules/3.jpg b/product_brand_ecommerce/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/3.jpg differ diff --git a/product_brand_ecommerce/static/description/assets/modules/4.jpg b/product_brand_ecommerce/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/4.jpg differ diff --git a/product_brand_ecommerce/static/description/assets/modules/5.png b/product_brand_ecommerce/static/description/assets/modules/5.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/5.png differ diff --git a/product_brand_ecommerce/static/description/assets/modules/6.jpg b/product_brand_ecommerce/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..482309000 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/modules/6.jpg differ diff --git a/product_brand_ecommerce/static/description/assets/screenshots/1.png b/product_brand_ecommerce/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..291778ed1 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/screenshots/1.png differ diff --git a/product_brand_ecommerce/static/description/assets/screenshots/2.png b/product_brand_ecommerce/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..0b339fd57 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/screenshots/2.png differ diff --git a/product_brand_ecommerce/static/description/assets/screenshots/3.png b/product_brand_ecommerce/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..ddcfb1181 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/screenshots/3.png differ diff --git a/product_brand_ecommerce/static/description/assets/screenshots/4.png b/product_brand_ecommerce/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2ccd52748 Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/screenshots/4.png differ diff --git a/product_brand_ecommerce/static/description/assets/screenshots/hero.gif b/product_brand_ecommerce/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..09144600b Binary files /dev/null and b/product_brand_ecommerce/static/description/assets/screenshots/hero.gif differ diff --git a/product_brand_ecommerce/static/description/banner.png b/product_brand_ecommerce/static/description/banner.png new file mode 100644 index 000000000..dfcf74a58 Binary files /dev/null and b/product_brand_ecommerce/static/description/banner.png differ diff --git a/product_brand_ecommerce/static/description/icon.png b/product_brand_ecommerce/static/description/icon.png new file mode 100644 index 000000000..1ecc3e8d9 Binary files /dev/null and b/product_brand_ecommerce/static/description/icon.png differ diff --git a/product_brand_ecommerce/static/description/index.html b/product_brand_ecommerce/static/description/index.html new file mode 100644 index 000000000..e363c1807 --- /dev/null +++ b/product_brand_ecommerce/static/description/index.html @@ -0,0 +1,606 @@ + + + + + + Product Brand In Ecommerce + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Product Brand In Ecommerce

+

+ Easily Manage Product Brands. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Activate Product Brand Filter.

+

+ The product brand filter will be displayed on the e-commerce website. +

+
+
+
+
+
+
+ +
+
+

Product Brand in Pivot View.

+

+ User can Filter by product brand in pivot view. +

+
+
+
+
+
+
+ +
+
+

Community & Enterprise Support

+

+ Support in Enterprise and Community versions. +

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

+ The product brand filter will be displayed on the e-commerce website.

+
+
+
+
+
+
+ +
+
+

+ Products in the selected brand.

+
+
+
+
+
+
+ +
+
+

+ Brand filter available in pivot view.

+
+
+
+
+
+
+ +
+
+

+ User can filter by product brand in pivot view.

+
+
+
+
+
+
+
    +
  • + Product Brand Filter will be displayed in the eCommerce website. +
  • +
  • + View of products available under each brand. +
  • +
  • + Brand filter available in pivot view. +
  • +
  • + User can Filter by product brand in pivot view. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:23rd April 2024 +
+

+ Initial Commit for PRODUCT BRAND IN ECOMMERCE.

+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/product_brand_ecommerce/views/product_brand_templates.xml b/product_brand_ecommerce/views/product_brand_templates.xml new file mode 100644 index 000000000..a08b1a8ad --- /dev/null +++ b/product_brand_ecommerce/views/product_brand_templates.xml @@ -0,0 +1,28 @@ + + + + + + + diff --git a/product_brand_ecommerce/views/sale_report_views.xml b/product_brand_ecommerce/views/sale_report_views.xml new file mode 100644 index 000000000..7c72b7070 --- /dev/null +++ b/product_brand_ecommerce/views/sale_report_views.xml @@ -0,0 +1,14 @@ + + + + + sale.report.view.search.inherit.product.brand.ecommerce + sale.report + + + + + + + + diff --git a/recurring_of_activities/README.rst b/recurring_of_activities/README.rst new file mode 100644 index 000000000..0240a6cd4 --- /dev/null +++ b/recurring_of_activities/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Recurring of Activities +======================= +You can make a recurring activity for your regular +activities using this module. You can define that when +& how activities are automatically generated. + +Configuration +============= +* No additional configurations needed + +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 : (V17) Vishnu KP , 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/recurring_of_activities/__init__.py b/recurring_of_activities/__init__.py new file mode 100644 index 000000000..32a05c5cc --- /dev/null +++ b/recurring_of_activities/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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/recurring_of_activities/__manifest__.py b/recurring_of_activities/__manifest__.py new file mode 100644 index 000000000..ffe987d94 --- /dev/null +++ b/recurring_of_activities/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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': 'Recurring of Activities', + 'version': '17.0.1.0.0', + 'category': 'Productivity', + 'summary': 'Using this module we can schedule activities for regular and ' + 'automatic generation', + 'description': 'You can make a recurring activity for your regular' + ' activities using this module. You can define that when ' + '& how activities are automatically generated.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'mail', 'product', 'crm', 'account', + 'purchase', 'sale_management','project'], + 'data': [ + 'security/ir.model.access.csv', + 'data/ir_cron_data.xml', + 'views/recurring_activity_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'recurring_of_activities/static/src/xml/activity_menu_view.xml', + 'recurring_of_activities/static/src/js/recurring_activity.js', + + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/recurring_of_activities/data/ir_cron_data.xml b/recurring_of_activities/data/ir_cron_data.xml new file mode 100644 index 000000000..13207aac0 --- /dev/null +++ b/recurring_of_activities/data/ir_cron_data.xml @@ -0,0 +1,17 @@ + + + + + + Automatic Recurring Activity + + code + model.create_recurring_activities() + + 1 + days + -1 + + + + diff --git a/recurring_of_activities/doc/RELEASE_NOTES.md b/recurring_of_activities/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..27d553514 --- /dev/null +++ b/recurring_of_activities/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 20.03.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Recurring of Activities. diff --git a/recurring_of_activities/models/__init__.py b/recurring_of_activities/models/__init__.py new file mode 100644 index 000000000..0a0fef8a7 --- /dev/null +++ b/recurring_of_activities/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 recurring_activity diff --git a/recurring_of_activities/models/recurring_activity.py b/recurring_of_activities/models/recurring_activity.py new file mode 100644 index 000000000..8f5615e49 --- /dev/null +++ b/recurring_of_activities/models/recurring_activity.py @@ -0,0 +1,278 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 datetime import timedelta, date +from dateutil.relativedelta import relativedelta +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class RecurringActivity(models.Model): + """It handles the activity scheduled in recurring mode.""" + _name = 'recurring.activity' + _description = 'Recurring Activity' + + name = fields.Char(string='Name', help='Enter the name of the recurring ' + 'activity', + required=True) + activity_type_id = fields.Many2one('mail.activity.type', + string='Activity', + help='Which activity you want to ' + 'schedule the recurring', + required=True + ) + user_id = fields.Many2one('res.users', string='Assigned to', + help='Who are the responsible person to assign' + ' the activity') + summary = fields.Char(string='Summary', + help='Discussion proposal', + required=True) + note = fields.Text(string='Note', help='Any kind of notes if you want to ' + 'share with the activity') + period = fields.Selection([('day', 'Days'), ('week', 'Weeks'), + ('month', 'Months'), ('year', 'Years')], + string='Repeat Every', + help='Number of period to be recurring the ' + 'activity', + default="day", required=True) + create_date = fields.Date(string='Activity Create Date', + help='Create date of the activity', + default=fields.Date.today) + next_activity_date = fields.Date(string='Next Activity Date', + help='Remaining the next activity day', + copy=False) + archive_date = fields.Date(string='Recurring Deadline', + help='The date after which this rule will be' + ' archived and no more recurrent activity ' + 'will be created', + required=True, + ) + monday = fields.Boolean(string='Monday', + help='You will choose this day it' + ' repeat every monday in a week ') + tues = fields.Boolean(string='Tuesday', + help='You will choose this day it' + ' repeat every Tuesday in a week ') + wed = fields.Boolean(string='Wednesday', + help='You will choose this day it' + ' repeat every Wednesday in a week ') + thus = fields.Boolean(string='Thursday', + help='You will choose this day it' + ' repeat every Thursday in a week ') + fri = fields.Boolean(string='Friday', + help='You will choose this day it' + ' repeat every Friday in a week ') + sat = fields.Boolean(string='Saturday', + help='You will choose this day it' + ' repeat every Saturday in a week ') + sun = fields.Boolean(string='Sunday', + help='You will choose this day it' + ' repeat every Sunday in a week ', + ) + action = fields.Reference(selection=[('sale.order', 'Sale Orders'), + ('purchase.order', 'Purchase Orders'), + ('res.partner', 'Contact'), + ('account.journal', 'Journal'), + ('res.partner', 'Employees'), + ('crm.lead', 'Lead/Opportunity'), + ('product.template', 'Product'), + ('product.product', 'Product Variant'), + ('project.task', 'Task'), + ], + string='Action', + help='Choose the reference document you want to ' + 'set a recurring activity.') + year_date = fields.Integer(string='Date', + help='Periodicity of the recurring activity ' + 'in year') + year_months = fields.Selection([('1', 'January'), ('2', 'February'), + ('3', 'March'), ('4', 'April'), + ('5', 'May'), + ('6', 'June'), ('7', 'July'), + ('8', 'August'), ('9', 'September'), + ('10', 'October'), ('11', 'November'), + ('12', 'December')], string='Month', + help='You can choose e month.It repeat every' + ' the chose month') + month_by = fields.Selection([('first', 'The First Day'), + ('last', 'The Last Day'), + ('date', 'Date of Month'), + ], + string='Day of Month', + help='Choose the month base recurring activity', + defualt='date') + date_of_month = fields.Integer(string='Date of Month', + help='Repeat the activity every date of the' + ' chose month', default=1) + + def _get_weekdays(self): + """Get a list of selected weekdays based on user input.""" + weekdays = [] + if self.monday: + weekdays.append('Mon') + if self.tues: + weekdays.append('Tue') + if self.wed: + weekdays.append('Wed') + if self.thus: + weekdays.append('Thu') + if self.fri: + weekdays.append('Fri') + if self.sat: + weekdays.append('Sat') + if self.sun: + weekdays.append('Sun') + return weekdays + + def _get_next_recurring_dates(self): + """Calculate the next recurring activity dates based on defined + rules.""" + next_dates = [] + # Calculate the next date based on the selected options + current_date = date.today() + if current_date < self.archive_date: + if self.period == 'day': + next_dates.append(current_date) + elif self.period == 'week': + weekdays = self._get_weekdays() + if not weekdays: + raise ValidationError('Please choose a specific day for ' + 'the recurring activity.') + while current_date <= self.archive_date: + if current_date.strftime('%a') in weekdays: + next_dates.append(current_date.strftime("%Y-%m-%d")) + current_date += timedelta(days=1) + elif self.period == 'month': + if self.month_by == 'first': + next_month_date = (current_date + relativedelta(months=1) + ).replace(day=1) + next_dates.append(next_month_date) + elif self.month_by == 'last': + # Calculate the last day of the current month + last_day_date_current_month = current_date.replace( + day=1) + relativedelta(months=1, days=-1) + # If the current date is before the last day, its start the + # current month + if current_date <= last_day_date_current_month: + next_dates.append(last_day_date_current_month) + else: + # Otherwise, set recurrence start last day of the + # next month + next_month_date = (current_date + relativedelta( + day=31)).replace(day=1) + last_day_date_next_month = (next_month_date + + relativedelta( + months=1, days=-1)) + next_dates.append(last_day_date_next_month) + elif self.month_by == 'date': + try: + next_month_date = (current_date + relativedelta()) + selected_date = next_month_date.replace( + day=self.date_of_month) + next_dates.append(selected_date) + except Exception as e: + raise ValidationError(_(f"Error: {e}. Invalid date of" + f" the month specified.")) + else: + raise ValidationError(_('Please select a recurring activity' + 'type for the month.')) + elif self.period == 'year': + if not self.year_date or not self.year_months: + raise ValidationError(_("Both Date and month are " + "required for yearly recurrence.")) + month_integer = int(self.year_months) + # Get the current month + current_month = self.create_date.month + # Calculate the next date for yearly recurrence + if current_month <= month_integer: + # If the current month is on or before the specified month, + # set the next_year_date in the same year + next_year_date = self.create_date.replace( + month=month_integer) + else: + # If the current month is after the specified month, + # set the next_year_date in the next year + next_year_date = self.create_date.replace( + month=month_integer, year=self.create_date.year + 1) + next_month_date = next_year_date.replace(day=self.year_date) + next_dates.append(next_month_date) + else: + next_dates.append(self.archive_date) + if next_dates: + self.next_activity_date = next_dates[ + 0] # Set the next activity date + return next_dates + + def create_recurring_activities(self): + """Create recurring activities based on calculated dates.""" + records = self.env['recurring.activity'].search([]) + for rec in records: + next_dates = rec._get_next_recurring_dates() + # Create recurring activities for each next date + self.env['mail.activity'].create({ + 'activity_type_id': rec.activity_type_id.id, + 'user_id': rec.user_id.id, + 'date_deadline': next_dates[0], + 'note': rec.note, + 'summary': rec.summary, + 'res_model_id': rec.env['ir.model']._get_id(rec.action._name), + 'res_id': rec.action.id, + }) + + def create_recurring_activities_record(self): + """Create recurring activities based on calculated dates.""" + next_dates = self._get_next_recurring_dates() + # Create recurring activities for each next date + self.env['mail.activity'].create({ + 'activity_type_id': self.activity_type_id.id, + 'user_id': self.user_id.id, + 'date_deadline': next_dates[0], + 'note': self.note, + 'summary': self.summary, + 'res_model_id': self.env['ir.model']._get_id(self.action._name), + 'res_id': self.action.id, + }) + + @api.model + def create(self, vals_list): + """ + Create and schedule recurring activities when a new record is created. + + :param vals_list: List of field values for the new record. + :return: Created record. + """ + res = super().create(vals_list) + if not vals_list['action']: + raise ValidationError(_("Please choose the record for the " + "recurring activity.")) + res.create_recurring_activities_record() + return res + + @api.constrains('create_date', 'archive_date') + def _compute_archive_date(self): + """This method is used to check whether the 'archive_date' is greater + than or equal to the 'create_date' for each record. If 'archive_date' + is less than 'create_date', it raises a validation error with the + message "The dealing should be greater than the created date." """ + for record in self: + if record.archive_date < record.create_date: + raise ValidationError("The dealing should be grater " + "than the created date") diff --git a/recurring_of_activities/security/ir.model.access.csv b/recurring_of_activities/security/ir.model.access.csv new file mode 100644 index 000000000..b68003828 --- /dev/null +++ b/recurring_of_activities/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_recurring_activity_user,access.recurring.activity.user,model_recurring_activity,base.group_user,1,1,1,1 diff --git a/recurring_of_activities/static/description/assets/icons/capture (1).png b/recurring_of_activities/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/capture (1).png differ diff --git a/recurring_of_activities/static/description/assets/icons/check.png b/recurring_of_activities/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/check.png differ diff --git a/recurring_of_activities/static/description/assets/icons/chevron.png b/recurring_of_activities/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/chevron.png differ diff --git a/recurring_of_activities/static/description/assets/icons/cogs.png b/recurring_of_activities/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/cogs.png differ diff --git a/recurring_of_activities/static/description/assets/icons/consultation.png b/recurring_of_activities/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/consultation.png differ diff --git a/recurring_of_activities/static/description/assets/icons/ecom-black.png b/recurring_of_activities/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/ecom-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/education-black.png b/recurring_of_activities/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/education-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/hotel-black.png b/recurring_of_activities/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/hotel-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/img.png b/recurring_of_activities/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/img.png differ diff --git a/recurring_of_activities/static/description/assets/icons/license.png b/recurring_of_activities/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/license.png differ diff --git a/recurring_of_activities/static/description/assets/icons/lifebuoy.png b/recurring_of_activities/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/lifebuoy.png differ diff --git a/recurring_of_activities/static/description/assets/icons/manufacturing-black.png b/recurring_of_activities/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/manufacturing-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/photo-capture.png b/recurring_of_activities/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/photo-capture.png differ diff --git a/recurring_of_activities/static/description/assets/icons/pos-black.png b/recurring_of_activities/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/pos-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/puzzle.png b/recurring_of_activities/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/puzzle.png differ diff --git a/recurring_of_activities/static/description/assets/icons/restaurant-black.png b/recurring_of_activities/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/restaurant-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/service-black.png b/recurring_of_activities/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/service-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/trading-black.png b/recurring_of_activities/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/trading-black.png differ diff --git a/recurring_of_activities/static/description/assets/icons/training.png b/recurring_of_activities/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/training.png differ diff --git a/recurring_of_activities/static/description/assets/icons/update.png b/recurring_of_activities/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/update.png differ diff --git a/recurring_of_activities/static/description/assets/icons/user.png b/recurring_of_activities/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/user.png differ diff --git a/recurring_of_activities/static/description/assets/icons/wrench.png b/recurring_of_activities/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/recurring_of_activities/static/description/assets/icons/wrench.png differ diff --git a/recurring_of_activities/static/description/assets/misc/Cybrosys R.png b/recurring_of_activities/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/recurring_of_activities/static/description/assets/misc/Cybrosys R.png differ diff --git a/recurring_of_activities/static/description/assets/misc/email.svg b/recurring_of_activities/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/phone.svg b/recurring_of_activities/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/recurring_of_activities/static/description/assets/misc/star (1) 2.svg b/recurring_of_activities/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/support (1) 1.svg b/recurring_of_activities/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/support-email.svg b/recurring_of_activities/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/tick-mark.svg b/recurring_of_activities/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/whatsapp 1.svg b/recurring_of_activities/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/misc/whatsapp.svg b/recurring_of_activities/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/recurring_of_activities/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recurring_of_activities/static/description/assets/modules/m1.png b/recurring_of_activities/static/description/assets/modules/m1.png new file mode 100644 index 000000000..acb4c76c6 Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m1.png differ diff --git a/recurring_of_activities/static/description/assets/modules/m2.png b/recurring_of_activities/static/description/assets/modules/m2.png new file mode 100644 index 000000000..3ef91f771 Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m2.png differ diff --git a/recurring_of_activities/static/description/assets/modules/m3.png b/recurring_of_activities/static/description/assets/modules/m3.png new file mode 100644 index 000000000..72febf6ae Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m3.png differ diff --git a/recurring_of_activities/static/description/assets/modules/m4.png b/recurring_of_activities/static/description/assets/modules/m4.png new file mode 100644 index 000000000..f7d7f9241 Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m4.png differ diff --git a/recurring_of_activities/static/description/assets/modules/m5.png b/recurring_of_activities/static/description/assets/modules/m5.png new file mode 100644 index 000000000..1d3324e88 Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m5.png differ diff --git a/recurring_of_activities/static/description/assets/modules/m6.png b/recurring_of_activities/static/description/assets/modules/m6.png new file mode 100644 index 000000000..80938c15a Binary files /dev/null and b/recurring_of_activities/static/description/assets/modules/m6.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/hero.gif b/recurring_of_activities/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..27835dbc9 Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/hero.gif differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss1.png b/recurring_of_activities/static/description/assets/screenshots/ss1.png new file mode 100644 index 000000000..c9c7db438 Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss1.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss2.png b/recurring_of_activities/static/description/assets/screenshots/ss2.png new file mode 100644 index 000000000..5b10a3694 Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss2.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss3.png b/recurring_of_activities/static/description/assets/screenshots/ss3.png new file mode 100644 index 000000000..7c70bc2ac Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss3.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss4.png b/recurring_of_activities/static/description/assets/screenshots/ss4.png new file mode 100644 index 000000000..0130d565f Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss4.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss5.png b/recurring_of_activities/static/description/assets/screenshots/ss5.png new file mode 100644 index 000000000..5c2f9e7de Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss5.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss6.png b/recurring_of_activities/static/description/assets/screenshots/ss6.png new file mode 100644 index 000000000..b87bdf57e Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss6.png differ diff --git a/recurring_of_activities/static/description/assets/screenshots/ss7.png b/recurring_of_activities/static/description/assets/screenshots/ss7.png new file mode 100644 index 000000000..f8e78d9ae Binary files /dev/null and b/recurring_of_activities/static/description/assets/screenshots/ss7.png differ diff --git a/recurring_of_activities/static/description/banner.jpg b/recurring_of_activities/static/description/banner.jpg new file mode 100644 index 000000000..91e2783c2 Binary files /dev/null and b/recurring_of_activities/static/description/banner.jpg differ diff --git a/recurring_of_activities/static/description/icon.png b/recurring_of_activities/static/description/icon.png new file mode 100644 index 000000000..c9002686f Binary files /dev/null and b/recurring_of_activities/static/description/icon.png differ diff --git a/recurring_of_activities/static/description/index.html b/recurring_of_activities/static/description/index.html new file mode 100644 index 000000000..83a00d62f --- /dev/null +++ b/recurring_of_activities/static/description/index.html @@ -0,0 +1,782 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Recurring of Activities

+

+ Schedule Activities for Regular and + Automatic Generation +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Odoo 17 Community & Enterprise Edition + Support.

+

Recurring of + Activities in Odoo 17 Community & Enterprise + Edition. +

+
+
+
+
+
+
+ +
+
+

+ Set recurring schedules for events.

+

Module allows + users to set recurring schedules for events, + including daily, every Monday, or monthly on a + specific day. +

+
+
+
+
+
+
+ +
+
+

+ Option for Limit to the Recurrence

+

+ We can set a stopping date limit of the recurrence. +

+
+
+
+
+
+
+ +
+
+

+ Easy to set the recurrence.

+

It is very easy to set the recurrence. +

+
+
+
+
+
+
+ +
+
+

+ No Need of Special Configuration

+

No special + Configuration required just install + it and cheers! +

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

+ Manage Recurring Activities.

+
+ Go to Systray panel -> Click the Activities + icon + -> + Under Activities, we can see the Manage + Recurring Activities,Click the to open the + model to create the recurring.
+
+
+
+
+
+
+ +
+
+

+ Recurrence rule creation

+
+ Here we can see the already-created + Recurring + Activities. If you want to create a new + Activity , just click the "NEW" button. +
+
+
+
+
+
+
+ +
+
+

+ New Recurring + Activities

+
+ Created New Recurring Activity
+
+
+
+
+
+
+ +
+
+

+ Recurrence Activity in Follow-up logs

+
+
+
+
+
+
+
+
+
    +
  • + The module lets + users schedule events to repeat daily, weekly on + Mondays, or monthly on a specific day. +
  • +
  • + Option for Limit + to the Recurrence +
  • +
  • + Easy to set the recurrence. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:20th Mar 2024 +
+

+ + Odoo 17 Recurring of Activities

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/recurring_of_activities/static/src/js/recurring_activity.js b/recurring_of_activities/static/src/js/recurring_activity.js new file mode 100644 index 000000000..68fb33a74 --- /dev/null +++ b/recurring_of_activities/static/src/js/recurring_activity.js @@ -0,0 +1,22 @@ +/** @odoo-module **/ +import { ActivityMenu } from "@mail/core/web/activity_menu"; +import { patch } from "@web/core/utils/patch"; +//patching and added the manage recurring button +patch(ActivityMenu.prototype, { + + onClickCustomLink() { + document.body.click(); + this.env.services.action.doAction({ + name: "Recurring Activities", + type: 'ir.actions.act_window', + res_model: 'recurring.activity', + view_type: 'list', + views: [[false, 'list'], [false, 'form']], + target: 'current', + context: {create: true} + }, + { + clearBreadcrumbs: true, + }); + }, +}); diff --git a/recurring_of_activities/static/src/xml/activity_menu_view.xml b/recurring_of_activities/static/src/xml/activity_menu_view.xml new file mode 100644 index 000000000..dcbe0c57e --- /dev/null +++ b/recurring_of_activities/static/src/xml/activity_menu_view.xml @@ -0,0 +1,20 @@ + + + + + +
+ +
+ +
+
+
diff --git a/recurring_of_activities/views/recurring_activity_views.xml b/recurring_of_activities/views/recurring_activity_views.xml new file mode 100644 index 000000000..d85c9e5f2 --- /dev/null +++ b/recurring_of_activities/views/recurring_activity_views.xml @@ -0,0 +1,96 @@ + + + + + recurring.activity.action + ir.actions.act_window + recurring.activity + tree,form + +

+ Click to add the recurring activity. +

+
+
+ + + recurring.activity.view.form + recurring.activity + +
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + recurring.activity.view.tree + recurring.activity + + + + + + + + + + + + +
diff --git a/serial_no_from_mo/README.rst b/serial_no_from_mo/README.rst new file mode 100644 index 000000000..2b32e94bd --- /dev/null +++ b/serial_no_from_mo/README.rst @@ -0,0 +1,50 @@ +.. 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 + +Generate Lot/Serial Number From Manufacturing Order +=================================================== +* Automatically generate Serial/Lot from Manufacturing Order. +The user can set the lot/serial number sequence both globally and by product. + +Configuration +============= +No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: + (V16) Jumana Jabin MP, + (V17) Jumana Haseen, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/serial_no_from_mo/__init__.py b/serial_no_from_mo/__init__.py new file mode 100644 index 000000000..27f7e5b5c --- /dev/null +++ b/serial_no_from_mo/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/serial_no_from_mo/__manifest__.py b/serial_no_from_mo/__manifest__.py new file mode 100644 index 000000000..1a88a9c3e --- /dev/null +++ b/serial_no_from_mo/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Generate Lot/Serial Number From Manufacturing Order', + 'version': '17.0.1.0.0', + 'category': 'Manufacturing', + 'summary': """Auto generate Serial/lot from manufacturing order""", + 'description': """Automatically generates lot/serial number for product + while confirming the manufacturing order.User can set lot/seral number + sequence in product wise and global wise""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'mrp', 'stock'], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/product_template_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/serial_no_from_mo/doc/RELEASE_NOTES.md b/serial_no_from_mo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f0f50cc4c --- /dev/null +++ b/serial_no_from_mo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 08.04.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for Generate Lot/Serial Number From Manufacturing Order diff --git a/serial_no_from_mo/models/__init__.py b/serial_no_from_mo/models/__init__.py new file mode 100644 index 000000000..d648119c5 --- /dev/null +++ b/serial_no_from_mo/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import mrp_production +from . import product_template +from . import res_config_settings diff --git a/serial_no_from_mo/models/mrp_production.py b/serial_no_from_mo/models/mrp_production.py new file mode 100644 index 000000000..01beab470 --- /dev/null +++ b/serial_no_from_mo/models/mrp_production.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class MrpProduction(models.Model): + """Manufacturing Production model for managing production orders. + This model represents a production order and includes functionality for + confirming the production, generating serial/lot numbers, and other + related operations.""" + _inherit = "mrp.production" + + def action_confirm(self): + """ Confirm the production order and generate serial/lot numbers. + This method is called when the production order is confirmed. + It checks the tracking type of the product and the serial_selection + configuration parameter to determine the generation of serial/lot + numbers. It generates the numbers based on the global configuration or + product-specific configuration.""" + parms = self.env['ir.config_parameter'].sudo() + for rec in self: + if rec.product_id.tracking in ['serial', 'lot']: + if parms.get_param( + 'serial_no_from_mo.serial_selection') == 'global': + digit = int(parms.get_param('serial_no_from_mo.digit')) + prefix = parms.get_param('serial_no_from_mo.prefix') + seq = self.env['ir.sequence'].sudo().search( + [('code', '=', 'mrp.production.sequence')]) + if seq: + seq.write({ + 'prefix': prefix, + 'padding': digit + }) + if not seq: + self.env['ir.sequence'].create({ + 'name': 'Mrp Production', + 'implementation': 'standard', + 'code': 'mrp.production.sequence', + 'prefix': prefix, + 'padding': digit}) + serial_id = self.env['stock.lot'].create({ + 'name': self.env['ir.sequence'].sudo().next_by_code( + 'mrp.production.sequence'), + 'product_id': rec.product_id.id, + 'company_id': rec.company_id.id, + }) + else: + seq = self.env['ir.sequence'].sudo().search( + [('code', '=', rec.product_id.name)]) + if seq: + seq.write({ + 'prefix': rec.product_id.product_tmpl_id.prefix, + 'padding': rec.product_id.product_tmpl_id.digit, + }) + if not seq: + self.env['ir.sequence'].create({ + 'name': 'Mrp Production', + 'implementation': 'standard', + 'code': rec.product_id.name, + 'prefix': rec.product_id.product_tmpl_id.prefix, + 'padding': rec.product_id.product_tmpl_id.digit}) + serial_id = self.env['stock.lot'].create({ + 'name': self.env['ir.sequence'].sudo().next_by_code( + rec.product_id.name), + 'product_id': rec.product_id.id, + 'company_id': rec.company_id.id, + }) + rec.lot_producing_id = serial_id + return super(MrpProduction, self).action_confirm() diff --git a/serial_no_from_mo/models/product_template.py b/serial_no_from_mo/models/product_template.py new file mode 100644 index 000000000..31ef37a48 --- /dev/null +++ b/serial_no_from_mo/models/product_template.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """Product Template model for managing product templates. + This model extends the base `product.template` model to add custom fields + for specifying the number of digits and prefix for the product.""" + _inherit = 'product.template' + + digit = fields.Integer(string="Number of Digits", + help="Specify the desired number of digits.") + prefix = fields.Char(string="Prefix", + help="Enter a prefix value if needed.") diff --git a/serial_no_from_mo/models/res_config_settings.py b/serial_no_from_mo/models/res_config_settings.py new file mode 100644 index 000000000..13fc8820d --- /dev/null +++ b/serial_no_from_mo/models/res_config_settings.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """ Res Config Settings model for managing configuration settings. + This model extends the base `res.config.settings` model to add + custom fields for configuring serial number selection method, + number of digits, and prefix.""" + _inherit = 'res.config.settings' + + serial_selection = fields.Selection([('global', 'Global'), + ('product_wise', 'Product Wise')], + string="Choose Method", + help="Select the method for generating" + " serial numbers: global or " + "product-wise.", + config_parameter='serial_no_from_mo.' + 'serial_selection') + digit = fields.Integer(string="Number of Digits", + help="Specify the number of digits to use for the " + "serial numbers.", + config_parameter='serial_no_from_mo.digit', ) + prefix = fields.Char(string="Prefix", + help="Specify the prefix to be added to the serial" + " numbers.", + config_parameter='serial_no_from_mo.prefix', ) + is_serial_selection = fields.Boolean(string="Serial number Selection " + "Method", help="Enable or " + "disable the" + " serial number" + " selection " + "method.", + config_parameter='serial_no_from_mo.' + 'is_serial_selection' + ) diff --git a/serial_no_from_mo/static/description/assets/icons/capture (1).png b/serial_no_from_mo/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/capture (1).png differ diff --git a/serial_no_from_mo/static/description/assets/icons/check.png b/serial_no_from_mo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/check.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/chevron.png b/serial_no_from_mo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/chevron.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/cogs.png b/serial_no_from_mo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/cogs.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/consultation.png b/serial_no_from_mo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/consultation.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/ecom-black.png b/serial_no_from_mo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/ecom-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/education-black.png b/serial_no_from_mo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/education-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/hotel-black.png b/serial_no_from_mo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/hotel-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/img.png b/serial_no_from_mo/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/img.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/license.png b/serial_no_from_mo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/license.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/lifebuoy.png b/serial_no_from_mo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/lifebuoy.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/manufacturing-black.png b/serial_no_from_mo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/manufacturing-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/photo-capture.png b/serial_no_from_mo/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/photo-capture.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/pos-black.png b/serial_no_from_mo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/pos-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/puzzle.png b/serial_no_from_mo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/puzzle.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/restaurant-black.png b/serial_no_from_mo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/restaurant-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/service-black.png b/serial_no_from_mo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/service-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/trading-black.png b/serial_no_from_mo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/trading-black.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/training.png b/serial_no_from_mo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/training.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/update.png b/serial_no_from_mo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/update.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/user.png b/serial_no_from_mo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/user.png differ diff --git a/serial_no_from_mo/static/description/assets/icons/wrench.png b/serial_no_from_mo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/serial_no_from_mo/static/description/assets/icons/wrench.png differ diff --git a/serial_no_from_mo/static/description/assets/misc/Cybrosys R.png b/serial_no_from_mo/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/misc/Cybrosys R.png differ diff --git a/serial_no_from_mo/static/description/assets/misc/email.svg b/serial_no_from_mo/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/phone.svg b/serial_no_from_mo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/serial_no_from_mo/static/description/assets/misc/star (1) 2.svg b/serial_no_from_mo/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/support (1) 1.svg b/serial_no_from_mo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/support-email.svg b/serial_no_from_mo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/tick-mark.svg b/serial_no_from_mo/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/whatsapp 1.svg b/serial_no_from_mo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/misc/whatsapp.svg b/serial_no_from_mo/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/serial_no_from_mo/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/serial_no_from_mo/static/description/assets/modules/1.png b/serial_no_from_mo/static/description/assets/modules/1.png new file mode 100644 index 000000000..1fc10028c Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/1.png differ diff --git a/serial_no_from_mo/static/description/assets/modules/2.png b/serial_no_from_mo/static/description/assets/modules/2.png new file mode 100644 index 000000000..5eb81f6d0 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/2.png differ diff --git a/serial_no_from_mo/static/description/assets/modules/3.png b/serial_no_from_mo/static/description/assets/modules/3.png new file mode 100644 index 000000000..9256fdce5 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/3.png differ diff --git a/serial_no_from_mo/static/description/assets/modules/4.png b/serial_no_from_mo/static/description/assets/modules/4.png new file mode 100644 index 000000000..c9079653a Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/4.png differ diff --git a/serial_no_from_mo/static/description/assets/modules/5.png b/serial_no_from_mo/static/description/assets/modules/5.png new file mode 100644 index 000000000..998d6d079 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/5.png differ diff --git a/serial_no_from_mo/static/description/assets/modules/6.png b/serial_no_from_mo/static/description/assets/modules/6.png new file mode 100644 index 000000000..d0381b9c9 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/modules/6.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/1.png b/serial_no_from_mo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..d2bc57ae8 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/1.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/2.png b/serial_no_from_mo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..b2deaaf67 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/2.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/3.png b/serial_no_from_mo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..6dd00db57 Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/3.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/4.png b/serial_no_from_mo/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2ab6af4aa Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/4.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/5.png b/serial_no_from_mo/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..c6c68f6bd Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/5.png differ diff --git a/serial_no_from_mo/static/description/assets/screenshots/hero.gif b/serial_no_from_mo/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..02f8440bd Binary files /dev/null and b/serial_no_from_mo/static/description/assets/screenshots/hero.gif differ diff --git a/serial_no_from_mo/static/description/banner.jpg b/serial_no_from_mo/static/description/banner.jpg new file mode 100644 index 000000000..169895dbf Binary files /dev/null and b/serial_no_from_mo/static/description/banner.jpg differ diff --git a/serial_no_from_mo/static/description/icon.png b/serial_no_from_mo/static/description/icon.png new file mode 100644 index 000000000..b29dc418b Binary files /dev/null and b/serial_no_from_mo/static/description/icon.png differ diff --git a/serial_no_from_mo/static/description/index.html b/serial_no_from_mo/static/description/index.html new file mode 100644 index 000000000..eed22e2c3 --- /dev/null +++ b/serial_no_from_mo/static/description/index.html @@ -0,0 +1,723 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Generate Lot/Serial Number From Manufacturing Order

+

+ Automatically generates Lot/Serial number from MO. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Auto Generate Lot/Serial Number.

+
+
+
+
+
+
+ +
+
+

+ Product Wise Lot/Serial Number Sequence.

+
+
+
+
+
+
+ +
+
+

+ Global Wise Lot/Serial Number Sequence.

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

+ Configuration Settings

+

+ User can select and configure the Serial number Selection + Method. + Using Global wise user can set sequence for all + products.Product + wise used to set sequence for each + product separately.

+ +
+
+
+
+
+
+ +
+
+

+ Auto Generated Lot/Serial Number in Global Method.

+
+
+
+
+
+
+ +
+
+

+ Product Wise Method.

+
+
+
+
+
+
+ +
+
+

+ User can set sequence for each product.

+
+
+
+
+
+
+ +
+
+

+ Auto Generated Lot/Serial Number in Product Wise + Method.

+
+
+
+
+
+
+
    +
  • + Available in + Odoo 17.0 Community and Enterprise. +
  • +
  • + Generate Lot/Serial Number From Manufacturing Order +
      +
    • Automatically generates lot/serial number for product while + confirming + the manufacturing order.User can set lot/serial number + sequence + in + product wise and global wise +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:8th April 2024 +
+

+ Initial Commit for Generate Lot/Serial Number From Manufacturing Order.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/serial_no_from_mo/static/description/src/css/settings.css b/serial_no_from_mo/static/description/src/css/settings.css new file mode 100644 index 000000000..8365373f6 --- /dev/null +++ b/serial_no_from_mo/static/description/src/css/settings.css @@ -0,0 +1,3 @@ +.custom-margin-top { + margin-top: 8px; +} diff --git a/serial_no_from_mo/views/product_template_views.xml b/serial_no_from_mo/views/product_template_views.xml new file mode 100644 index 000000000..c2639af62 --- /dev/null +++ b/serial_no_from_mo/views/product_template_views.xml @@ -0,0 +1,19 @@ + + + + + product.template.view.form.inherit.serial.no.from.mo + + product.template + + + + + + + + + diff --git a/serial_no_from_mo/views/res_config_settings_views.xml b/serial_no_from_mo/views/res_config_settings_views.xml new file mode 100644 index 000000000..f461596fe --- /dev/null +++ b/serial_no_from_mo/views/res_config_settings_views.xml @@ -0,0 +1,60 @@ + + + + + res.config.settings.view.form.inherit.serial.no.from.mo + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+
diff --git a/versioning_in_sale_order/README.rst b/versioning_in_sale_order/README.rst new file mode 100755 index 000000000..f8ed3a130 --- /dev/null +++ b/versioning_in_sale_order/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Sale Order Versions +=================== +This module allow to create versions of a sale order. + +Configuration +============= +- Additional configuration not required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: + (V16) Ammu Raj @cybrosys, + (V17) Safa Faheem @cybrosys +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/versioning_in_sale_order/__init__.py b/versioning_in_sale_order/__init__.py new file mode 100644 index 000000000..6a20ad883 --- /dev/null +++ b/versioning_in_sale_order/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/versioning_in_sale_order/__manifest__.py b/versioning_in_sale_order/__manifest__.py new file mode 100644 index 000000000..6549d1c01 --- /dev/null +++ b/versioning_in_sale_order/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Sale Order Versions', + 'version': '17.0.1.0.0', + 'category': 'Sales', + 'summary': 'For creating multiple sale order versions', + 'description': """This module will help to creating multiple sale order + versions and confirming the version as needed.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'sale_management'], + 'data': [ + 'views/sale_order_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/versioning_in_sale_order/doc/RELEASE_NOTES.md b/versioning_in_sale_order/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9123e5257 --- /dev/null +++ b/versioning_in_sale_order/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 25.01.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Sale Order Versions diff --git a/versioning_in_sale_order/models/__init__.py b/versioning_in_sale_order/models/__init__.py new file mode 100644 index 000000000..9544dc8c2 --- /dev/null +++ b/versioning_in_sale_order/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import sale_order + diff --git a/versioning_in_sale_order/models/sale_order.py b/versioning_in_sale_order/models/sale_order.py new file mode 100644 index 000000000..c4b4539a1 --- /dev/null +++ b/versioning_in_sale_order/models/sale_order.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models, _ + + +class SaleOrder(models.Model): + """This class inherits the model sale order for adding fields and functions + for versioning.""" + _inherit = "sale.order" + + is_version = fields.Boolean(string="Is Version", + help="For checking version or not") + + version_count = fields.Integer(string="Sale Version Count", + compute='_compute_version_ids', + help="Count of version created") + current_version_id = fields.Many2one("sale.order", + help="For creating versions") + version_ids = fields.One2many("sale.order", + inverse_name="current_version_id", + help="Versions created") + + def action_create_versions(self): + """For creating the versions of the sale order""" + sale_order_copy_id = self.copy() + sale_order_copy_id.is_version = True + length = len(self.version_ids) + sale_order_copy_id.name = "%s-%s" % (self.name, str(length + 1)) + order_lines = [] + val = (0, 0, { + 'display_type': 'line_note', + 'name': 'This is version %s ' %(str(length + 1)), + 'product_id': False, + 'product_uom_qty': 0, + 'product_uom': False, + 'price_unit': 0, + 'order_id': sale_order_copy_id.id, + 'tax_id': False, + }) + order_lines.append(val) + sale_order_copy_id.update({'order_line': order_lines}) + + self.write({'version_ids': [(4, sale_order_copy_id.id)]}) + + @api.depends('version_ids') + def _compute_version_ids(self): + """For calculating the number of versions created""" + for sale in self: + sale.version_count = len(sale.version_ids) + + def action_view_versions(self): + """action for viewing versions""" + action = { + "type": "ir.actions.act_window", + "view_mode": "kanban,tree,form", + "name": _("Sale Order Versions"), + "res_model": self._name, + "domain": [('id', 'in', self.version_ids.ids)], + "target": "current", + } + return action + + def action_confirm(self): + """Override the confirm button of the sale order for cancelling the + other versions and making the current version main""" + res = super().action_confirm() + if not self.version_ids: + parent_sale = self.current_version_id + versions = parent_sale.mapped('version_ids').mapped('id') + if versions: + versions.append(parent_sale.id) + for version in parent_sale.version_ids: + if version.state == 'sale': + # Updating the version name into main version name and + # other versions state into cancel + version.current_version_id.update({'is_version': True, + 'state': 'cancel'}) + version.update({'version_ids': versions, + "name": version.current_version_id.name, + 'is_version': False}) + if version.state == 'draft': + version.update({'state': 'cancel'}) + else: + if self.state == 'sale': + for sale in self.version_ids: + sale.update({'state': 'cancel'}) + return res diff --git a/versioning_in_sale_order/static/description/assets/icons/capture (1).png b/versioning_in_sale_order/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/capture (1).png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/check.png b/versioning_in_sale_order/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/check.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/chevron.png b/versioning_in_sale_order/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/chevron.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/cogs.png b/versioning_in_sale_order/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/cogs.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/consultation.png b/versioning_in_sale_order/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/consultation.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/ecom-black.png b/versioning_in_sale_order/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/ecom-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/education-black.png b/versioning_in_sale_order/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/education-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/hotel-black.png b/versioning_in_sale_order/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/hotel-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/img.png b/versioning_in_sale_order/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/img.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/license.png b/versioning_in_sale_order/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/license.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/lifebuoy.png b/versioning_in_sale_order/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/lifebuoy.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/manufacturing-black.png b/versioning_in_sale_order/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/manufacturing-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/photo-capture.png b/versioning_in_sale_order/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/photo-capture.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/pos-black.png b/versioning_in_sale_order/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/pos-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/puzzle.png b/versioning_in_sale_order/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/puzzle.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/restaurant-black.png b/versioning_in_sale_order/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/restaurant-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/service-black.png b/versioning_in_sale_order/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/service-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/trading-black.png b/versioning_in_sale_order/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/trading-black.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/training.png b/versioning_in_sale_order/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/training.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/update.png b/versioning_in_sale_order/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/update.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/user.png b/versioning_in_sale_order/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/user.png differ diff --git a/versioning_in_sale_order/static/description/assets/icons/wrench.png b/versioning_in_sale_order/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/icons/wrench.png differ diff --git a/versioning_in_sale_order/static/description/assets/misc/Cybrosys R.png b/versioning_in_sale_order/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/misc/Cybrosys R.png differ diff --git a/versioning_in_sale_order/static/description/assets/misc/email.svg b/versioning_in_sale_order/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/phone.svg b/versioning_in_sale_order/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/star (1) 2.svg b/versioning_in_sale_order/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/support (1) 1.svg b/versioning_in_sale_order/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/support-email.svg b/versioning_in_sale_order/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/tick-mark.svg b/versioning_in_sale_order/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/whatsapp 1.svg b/versioning_in_sale_order/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/misc/whatsapp.svg b/versioning_in_sale_order/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/versioning_in_sale_order/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/versioning_in_sale_order/static/description/assets/modules/1.jpg b/versioning_in_sale_order/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/1.jpg differ diff --git a/versioning_in_sale_order/static/description/assets/modules/2.png b/versioning_in_sale_order/static/description/assets/modules/2.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/2.png differ diff --git a/versioning_in_sale_order/static/description/assets/modules/3.png b/versioning_in_sale_order/static/description/assets/modules/3.png new file mode 100644 index 000000000..164eb62c7 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/3.png differ diff --git a/versioning_in_sale_order/static/description/assets/modules/4.png b/versioning_in_sale_order/static/description/assets/modules/4.png new file mode 100644 index 000000000..d246d83ac Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/4.png differ diff --git a/versioning_in_sale_order/static/description/assets/modules/5.jpg b/versioning_in_sale_order/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..655cf38f5 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/5.jpg differ diff --git a/versioning_in_sale_order/static/description/assets/modules/6.jpg b/versioning_in_sale_order/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..1f3f2e27f Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/modules/6.jpg differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/hero.gif b/versioning_in_sale_order/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..eb3a6e2d1 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/hero.gif differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_01.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_01.png new file mode 100644 index 000000000..ba70951ba Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_01.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_02.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_02.png new file mode 100644 index 000000000..6a785bb06 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_02.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_03.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_03.png new file mode 100644 index 000000000..8c406007c Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_03.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_04.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_04.png new file mode 100644 index 000000000..9bfe860ae Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_04.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_05.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_05.png new file mode 100644 index 000000000..f9f1b7853 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_05.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_06.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_06.png new file mode 100644 index 000000000..50986707a Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_06.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_07.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_07.png new file mode 100644 index 000000000..fac09c093 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_07.png differ diff --git a/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_08.png b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_08.png new file mode 100644 index 000000000..13f0b24e7 Binary files /dev/null and b/versioning_in_sale_order/static/description/assets/screenshots/version_sale_order_08.png differ diff --git a/versioning_in_sale_order/static/description/banner.jpg b/versioning_in_sale_order/static/description/banner.jpg new file mode 100644 index 000000000..c1765e276 Binary files /dev/null and b/versioning_in_sale_order/static/description/banner.jpg differ diff --git a/versioning_in_sale_order/static/description/icon.png b/versioning_in_sale_order/static/description/icon.png new file mode 100644 index 000000000..1516edbfe Binary files /dev/null and b/versioning_in_sale_order/static/description/icon.png differ diff --git a/versioning_in_sale_order/static/description/index.html b/versioning_in_sale_order/static/description/index.html new file mode 100644 index 000000000..42fec3041 --- /dev/null +++ b/versioning_in_sale_order/static/description/index.html @@ -0,0 +1,688 @@ + + + + + + + Sale Order Versions + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Sale Order Versions

+

+ Allows to create multiple versions of a sale order. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Create multiple versions of a sale order

+
+
+
+
+
+
+ +
+
+

Sequence number of versions contains the version number.

+
+
+
+
+
+
+ +
+
+

Make changes on the versions

+
+
+
+
+
+
+ +
+
+

Confirm one of the version or main

+
+
+
+
+
+
+ +
+
+

The other versions will be canceled and cannot set to draft

+
+
+
+
+
+
+ +
+
+

Only the confirmed version with the actual sequence number will be visible in the tree view.

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

+ Create a sale order and Send by Email for viewing the button Create Versions. +

+
+
+
+
+
+
+ +
+
+

+ After send the mail you can see the button 'Create Version'. +

+
+
+
+
+
+
+ +
+
+

+ Smart button 'Versions' for viewing all versions. +

+
+
+
+
+
+
+ +
+
+

+ The versions are collected inside the tab. The sequence number contains the version number. +

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

+ Confirming the second version with the changes.The sequence number will change from revision to main. +

+
+
+
+
+
+
+ +
+
+

+ Other versions are canceled when confirmed the required one. The button set to draft is removed from the sale order. +

+
+
+
+
+
+
+ +
+
+

+ Only the confirmed version will visible in the tree view. All other canceled version will be collected inside the smart button. +

+
+
+
+
+
+
+
    +
  • + Create multiple versions of a sale order +
  • +
  • + Sequence number of versions contains the version number. +
  • +
  • + Make changes on the versions +
  • +
  • + Confirm one of the version or main +
  • +
  • + The other versions will be canceled and cannot set to draft +
  • +
  • + Only the confirmed version with the actual sequence number will be visible in the tree view. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:25 Jan 2024 +
+

+ Initial commit for Sale Order Versions.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/versioning_in_sale_order/views/sale_order_views.xml b/versioning_in_sale_order/views/sale_order_views.xml new file mode 100644 index 000000000..5c6aaa44c --- /dev/null +++ b/versioning_in_sale_order/views/sale_order_views.xml @@ -0,0 +1,39 @@ + + + + + sale.order.view.form.inherit.versioning.in.sale.order + sale.order + + + + + + + + + + state not in ['cancel'] or is_version + + + + + + + + + [('is_version', '=', False)] + +