diff --git a/special_product_snippet/README.rst b/special_product_snippet/README.rst new file mode 100755 index 000000000..e58d3d572 --- /dev/null +++ b/special_product_snippet/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Special Product Website Snippet +=============================== +Special Product Website Snippet + +Features +======== +* Users can select Product and Multiple Template for Product from Snippet. + +Configuration +============= +Nothing to configure. + +License +------- +General Public License, Version 3 (LGPL-3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V16) Sruthi Pavithran, + (V17) Farhana Jahan PT, + (V18) Yadhu Krishnan K, + 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/special_product_snippet/__init__.py b/special_product_snippet/__init__.py new file mode 100755 index 000000000..156acf2fb --- /dev/null +++ b/special_product_snippet/__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 controllers diff --git a/special_product_snippet/__manifest__.py b/special_product_snippet/__manifest__.py new file mode 100755 index 000000000..a23c81d7f --- /dev/null +++ b/special_product_snippet/__manifest__.py @@ -0,0 +1,55 @@ +# -*- 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': 'Special Product Website Snippet', + 'version': '18.0.1.0.0', + 'category': 'Website', + 'summary': "Select Product and Multiple Template for Product in " + "Website Snippet", + 'description': "This module gives an option to user to select product " + "and multiple template for product in website snippet.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://cybrosys.com/", + 'depends': ['sale_management', 'website', 'base', 'stock', 'website_sale'], + 'data': [ + 'views/special_product_snippet_templates.xml', + 'views/product_snippet_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'special_product_snippet/static/src/css/product_snippet.css', + ], + 'website.assets_wysiwyg': [ + '/special_product_snippet/static/src/js/options.js' + ], + 'web.assets_backend': [ + 'special_product_snippet/static/src/xml/special_product_snippet.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/special_product_snippet/controllers/__init__.py b/special_product_snippet/controllers/__init__.py new file mode 100755 index 000000000..685cc78c4 --- /dev/null +++ b/special_product_snippet/controllers/__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 special_product_snippet diff --git a/special_product_snippet/controllers/special_product_snippet.py b/special_product_snippet/controllers/special_product_snippet.py new file mode 100755 index 000000000..1bfb9add0 --- /dev/null +++ b/special_product_snippet/controllers/special_product_snippet.py @@ -0,0 +1,47 @@ +# -*- 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 . +# +############################################################################# +import json +from odoo import http +from odoo.http import request + + +class SpecialProduct(http.Controller): + """ Getting product details and passing returning + the values and rendering the templates from js""" + + @http.route('/website/snippet/special/render', type='json', auth='public', + website=True) + def render_template(self, params): + res = json.loads(params) + product = request.env['product.template'].sudo().search_read( + [('id', '=', res['id'])]) + qcontext = {} + for rec in product: + qcontext['display_name'] = rec['display_name'] + qcontext['list_price'] = rec['list_price'] + qcontext['website_url'] = rec['website_url'] + qcontext[ + 'image_url'] = '/web/image/product.template/%s/image_1920' % \ + rec['id'] + return { + 'qcontext': qcontext + } diff --git a/special_product_snippet/doc/RELEASE_NOTES.md b/special_product_snippet/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..f2732880b --- /dev/null +++ b/special_product_snippet/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 22.01.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Special Product Website Snippet diff --git a/special_product_snippet/static/description/assets/cybro-icon.png b/special_product_snippet/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/special_product_snippet/static/description/assets/cybro-icon.png differ diff --git a/special_product_snippet/static/description/assets/cybro-odoo.png b/special_product_snippet/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/special_product_snippet/static/description/assets/cybro-odoo.png differ diff --git a/special_product_snippet/static/description/assets/h2.png b/special_product_snippet/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/special_product_snippet/static/description/assets/h2.png differ diff --git a/special_product_snippet/static/description/assets/icons/arrows-repeat.svg b/special_product_snippet/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-1.png b/special_product_snippet/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/banner-1.png differ diff --git a/special_product_snippet/static/description/assets/icons/banner-2.svg b/special_product_snippet/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-bg.png b/special_product_snippet/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/banner-bg.png differ diff --git a/special_product_snippet/static/description/assets/icons/banner-bg.svg b/special_product_snippet/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-call.svg b/special_product_snippet/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-mail.svg b/special_product_snippet/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-pattern.svg b/special_product_snippet/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/banner-promo.svg b/special_product_snippet/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/brand-pair.svg b/special_product_snippet/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/check.png b/special_product_snippet/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/check.png differ diff --git a/special_product_snippet/static/description/assets/icons/chevron.png b/special_product_snippet/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/chevron.png differ diff --git a/special_product_snippet/static/description/assets/icons/close-icon.svg b/special_product_snippet/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/special_product_snippet/static/description/assets/icons/cogs.png b/special_product_snippet/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/cogs.png differ diff --git a/special_product_snippet/static/description/assets/icons/collabarate-icon.svg b/special_product_snippet/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/special_product_snippet/static/description/assets/icons/consultation.png b/special_product_snippet/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/consultation.png differ diff --git a/special_product_snippet/static/description/assets/icons/cybro-logo.png b/special_product_snippet/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/cybro-logo.png differ diff --git a/special_product_snippet/static/description/assets/icons/down.svg b/special_product_snippet/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/special_product_snippet/static/description/assets/icons/ecom-black.png b/special_product_snippet/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/ecom-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/education-black.png b/special_product_snippet/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/education-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/faq.png b/special_product_snippet/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/faq.png differ diff --git a/special_product_snippet/static/description/assets/icons/feature-icon.svg b/special_product_snippet/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/feature.png b/special_product_snippet/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/feature.png differ diff --git a/special_product_snippet/static/description/assets/icons/gear.svg b/special_product_snippet/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/hero.gif b/special_product_snippet/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..e69de29bb diff --git a/special_product_snippet/static/description/assets/icons/hire-odoo.svg b/special_product_snippet/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/hotel-black.png b/special_product_snippet/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/hotel-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/license.png b/special_product_snippet/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/license.png differ diff --git a/special_product_snippet/static/description/assets/icons/life-ring-icon.svg b/special_product_snippet/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/lifebuoy.png b/special_product_snippet/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/lifebuoy.png differ diff --git a/special_product_snippet/static/description/assets/icons/mail.svg b/special_product_snippet/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/special_product_snippet/static/description/assets/icons/manufacturing-black.png b/special_product_snippet/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/manufacturing-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/notes.png b/special_product_snippet/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/notes.png differ diff --git a/special_product_snippet/static/description/assets/icons/notification icon.svg b/special_product_snippet/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/odoo-consultancy.svg b/special_product_snippet/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/special_product_snippet/static/description/assets/icons/odoo-licencing.svg b/special_product_snippet/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/special_product_snippet/static/description/assets/icons/odoo-logo.png b/special_product_snippet/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/odoo-logo.png differ diff --git a/special_product_snippet/static/description/assets/icons/patter.svg b/special_product_snippet/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/pattern1.png b/special_product_snippet/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/pattern1.png differ diff --git a/special_product_snippet/static/description/assets/icons/pos-black.png b/special_product_snippet/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/pos-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/puzzle-piece-icon.svg b/special_product_snippet/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/puzzle.png b/special_product_snippet/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/puzzle.png differ diff --git a/special_product_snippet/static/description/assets/icons/replace-icon.svg b/special_product_snippet/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/restaurant-black.png b/special_product_snippet/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/restaurant-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/screenshot-main.png b/special_product_snippet/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/screenshot-main.png differ diff --git a/special_product_snippet/static/description/assets/icons/screenshot.png b/special_product_snippet/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/screenshot.png differ diff --git a/special_product_snippet/static/description/assets/icons/service-black.png b/special_product_snippet/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/service-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/skype-fill.svg b/special_product_snippet/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/skype.png b/special_product_snippet/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/skype.png differ diff --git a/special_product_snippet/static/description/assets/icons/skype.svg b/special_product_snippet/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/special_product_snippet/static/description/assets/icons/star-1.svg b/special_product_snippet/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/star-2.svg b/special_product_snippet/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/support.png b/special_product_snippet/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/support.png differ diff --git a/special_product_snippet/static/description/assets/icons/test-1 - Copy.png b/special_product_snippet/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/test-1 - Copy.png differ diff --git a/special_product_snippet/static/description/assets/icons/test-1.png b/special_product_snippet/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/test-1.png differ diff --git a/special_product_snippet/static/description/assets/icons/test-2.png b/special_product_snippet/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/test-2.png differ diff --git a/special_product_snippet/static/description/assets/icons/trading-black.png b/special_product_snippet/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/trading-black.png differ diff --git a/special_product_snippet/static/description/assets/icons/training.png b/special_product_snippet/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/training.png differ diff --git a/special_product_snippet/static/description/assets/icons/translate.svg b/special_product_snippet/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/update.png b/special_product_snippet/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/update.png differ diff --git a/special_product_snippet/static/description/assets/icons/user.png b/special_product_snippet/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/user.png differ diff --git a/special_product_snippet/static/description/assets/icons/video.png b/special_product_snippet/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/video.png differ diff --git a/special_product_snippet/static/description/assets/icons/whatsapp.png b/special_product_snippet/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/whatsapp.png differ diff --git a/special_product_snippet/static/description/assets/icons/wrench-icon.svg b/special_product_snippet/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/special_product_snippet/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/special_product_snippet/static/description/assets/icons/wrench.png b/special_product_snippet/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/special_product_snippet/static/description/assets/icons/wrench.png differ diff --git a/special_product_snippet/static/description/assets/modules/1.jpg b/special_product_snippet/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..3cb15fe01 Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/1.jpg differ diff --git a/special_product_snippet/static/description/assets/modules/2.jpg b/special_product_snippet/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..662cadcc3 Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/2.jpg differ diff --git a/special_product_snippet/static/description/assets/modules/3.jpg b/special_product_snippet/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..717a00443 Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/3.jpg differ diff --git a/special_product_snippet/static/description/assets/modules/4.png b/special_product_snippet/static/description/assets/modules/4.png new file mode 100644 index 000000000..00ebf54ad Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/4.png differ diff --git a/special_product_snippet/static/description/assets/modules/5.jpg b/special_product_snippet/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..7c67e2eec Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/5.jpg differ diff --git a/special_product_snippet/static/description/assets/modules/6.gif b/special_product_snippet/static/description/assets/modules/6.gif new file mode 100644 index 000000000..a35ece8df Binary files /dev/null and b/special_product_snippet/static/description/assets/modules/6.gif differ diff --git a/special_product_snippet/static/description/assets/screenshots/S1.png b/special_product_snippet/static/description/assets/screenshots/S1.png new file mode 100644 index 000000000..c5fc24c01 Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S1.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S2.png b/special_product_snippet/static/description/assets/screenshots/S2.png new file mode 100644 index 000000000..057bf453d Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S2.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S3.png b/special_product_snippet/static/description/assets/screenshots/S3.png new file mode 100644 index 000000000..352c6effd Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S3.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S4.png b/special_product_snippet/static/description/assets/screenshots/S4.png new file mode 100644 index 000000000..31ddde919 Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S4.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S5.png b/special_product_snippet/static/description/assets/screenshots/S5.png new file mode 100644 index 000000000..2e57ea07c Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S5.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S6.png b/special_product_snippet/static/description/assets/screenshots/S6.png new file mode 100644 index 000000000..796fcf34f Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S6.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/S7.png b/special_product_snippet/static/description/assets/screenshots/S7.png new file mode 100644 index 000000000..56bcc909a Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/S7.png differ diff --git a/special_product_snippet/static/description/assets/screenshots/hero.gif b/special_product_snippet/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..d2ec48bc7 Binary files /dev/null and b/special_product_snippet/static/description/assets/screenshots/hero.gif differ diff --git a/special_product_snippet/static/description/assets/y18.jpg b/special_product_snippet/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/special_product_snippet/static/description/assets/y18.jpg differ diff --git a/special_product_snippet/static/description/banner.jpg b/special_product_snippet/static/description/banner.jpg new file mode 100644 index 000000000..68377cdfa Binary files /dev/null and b/special_product_snippet/static/description/banner.jpg differ diff --git a/special_product_snippet/static/description/icon.png b/special_product_snippet/static/description/icon.png new file mode 100644 index 000000000..a9059d670 Binary files /dev/null and b/special_product_snippet/static/description/icon.png differ diff --git a/special_product_snippet/static/description/index.html b/special_product_snippet/static/description/index.html new file mode 100644 index 000000000..3d13ffa14 --- /dev/null +++ b/special_product_snippet/static/description/index.html @@ -0,0 +1,956 @@ + + + + + + Special Product Website Snippet + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Special Product Snippet for Website. +

+

Special Product Website Snippet +

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

Key + Highlights

+
+
+
+
+ +
+
+ Add Special Snippet in Website +
+

+ Users can select Product and Multiple + Template for Product from Snippet.

+
+
+
+
+ +
+
+
+ Automatic Database Backup +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Drag and Drop the + + Snippet + in Website. + +

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

+ User can add Product and Choose Product Template from that Snippet. +

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

+ First Template. + +

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

+ Second Template. +

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

+ Third Template. +

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

+ Fourth Template. +

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

+ When we click on the 'View' button, redirects to the Shop to view the Product Details. +

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

+ Special Product Website Snippet .

+
+
+

+ Select Multiple Template and Product +

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

+ No need any other + configuration, just + install the module. +

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

+ Latest Release 18.0.1.0.0 +

+ + 30th November, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/special_product_snippet/static/src/css/product_snippet.css b/special_product_snippet/static/src/css/product_snippet.css new file mode 100755 index 000000000..56f15a080 --- /dev/null +++ b/special_product_snippet/static/src/css/product_snippet.css @@ -0,0 +1,181 @@ +.first-product-page { + display: flex; + align-items: center; + justify-content: center; + height: 100vh; + background-color: #f4f4f4; +} +.product-image { + width: 300px; + height: 300px; + object-fit: cover; + margin-right: 10px; + border-radius: 50px; + margin-top: 40px; +} +.second-product-image { + width: 300px; + height: 300px; + object-fit: cover; + border-radius: 0px; +} +.product-details { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} +.second-product-details { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} +.product-name { + font-size: 30px; + font-weight: bold; + color: #333; + margin-top: 100px; +} +.second-product-name { + font-size: 30px; + font-weight: bold; + color: #333; + margin-top: 40px; + margin-left: 90px; +} +.product-description { + font-size: 22px; + color: #888; + margin-top: 40px; + max-width: 700px; +} +.product-price { + font-size: 24px; + color: #ff5252; + margin-top: 10px; +} +.second-product-price { + font-size: 30px; + color: #ff5252; + margin-top: 5px; + font-style: italic; + margin-left: 75px; +} +.third-product-price { + color: grey; + font-size: 22px; +} +.cta-button { + margin-top: 40px; + padding: 20px 40px; + background-color: #ff5252; + color: #fff; + border: none; + border-radius: 100px; + font-size: 22px; + font-weight: bold; + cursor: pointer; +} +.cta-button:hover { + background-color: #e63939; +} +.cta-button2 { + padding: 20px 40px; + background-color: #ff5252; + color: #fff; + border: none; + border-radius: 100px; + font-size: 22px; + font-weight: bold; + cursor: pointer; + box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2); + margin-left: 60px; +} +.cta-button:hover2 { + background-color: #e63939; +} +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; +} +.third-product-page { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); + max-width: 300px; + margin: auto; + text-align: center; + font-family: arial; +} +.third-product-name { + font-size: 24px; +} +.third-product-image { + width: 300px; +} +.third-cta-button { + padding: 20px 40px; + background-color: #ff5252; + color: #fff; + border: none; + border-radius: 100px; + font-size: 22px; + font-weight: bold; + cursor: pointer; + box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2); +} +.fourth-cta-button { + border: none; + outline: 0; + padding: 12px; + color: white; + background-color: #ff5252; + text-align: center; + cursor: pointer; + width: 100%; + font-size: 18px; +} +.cta-button:hover3 { + background-color: #e63939; +} +.s_special_products_options { + border: 1px solid #EAEAEA; + padding: 20px; +} +.fourth-product-image { + width: 400px; + border: 1px solid black; + box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); + animation: slide-in 1s ease-in-out; +} +@keyframes slide-in { + 0% { + transform: translateX(-100%); + opacity: 0; + } + 100% { + transform: translateX(0); + opacity: 1; + } +} +.fourth-product-details { + display: flex; + flex-direction: column; + align-items: center; +} +.fourth-product-price { + font-size: 20px; + font-weight: bold; + color: black; + margin-bottom: 10px; +} +.fourth-view-button { + padding: 10px 30px; + background-color: #ff5252; + color: #fff; + border: none; + border-radius: 100px; + font-size: 22px; + font-weight: bold; + cursor: pointer; + box-shadow: 0px 0px 20px 0px rgb(0 0 0 / 20%); +} +} diff --git a/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg b/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg new file mode 100755 index 000000000..57c4406d9 --- /dev/null +++ b/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/special_product_snippet/static/src/js/options.js b/special_product_snippet/static/src/js/options.js new file mode 100755 index 000000000..dc2293f62 --- /dev/null +++ b/special_product_snippet/static/src/js/options.js @@ -0,0 +1,94 @@ +/** @odoo-module **/ +var globalVariable; +import { rpc } from "@web/core/network/rpc"; +import options from "@web_editor/js/editor/snippets.options"; +import { renderToFragment } from "@web/core/utils/render"; +const Many2oneSpecialWidget = options.userValueWidgetsRegistry['we-many2one']; +options.registry.SpecialProduct = options.registry.SelectTemplate.extend({ + /** + * @constructor + */ + init() { + this._super(...arguments); + this.containerSelector = ''; + this.selectTemplateWidgetName = 'special_product_snippet'; + this.orm = this.bindService("orm"); + }, + async selectTemplate(previewMode, widgetValue, params) { + var self = this; + if (globalVariable) { + await this._templatesLoading; + // Call the controller method with parameters + const response = await rpc("/website/snippet/special/render", { + 'template': widgetValue, + 'params': globalVariable + }); + if (previewMode === 'reset') { + if (!this.beforePreviewNodes) { + // FIXME should not be necessary: only needed because we have a + // strange 'reset' sent after a non-preview + return; + } + // Empty the container and restore the original content + while (this.containerEl.lastChild) { + this.containerEl.removeChild(this.containerEl.lastChild); + } + for (const node of this.beforePreviewNodes) { + this.containerEl.appendChild(node); + } + this.beforePreviewNodes = null; + return; + } + if (!this.beforePreviewNodes) { + // We are about the apply a template on non-previewed content, + // save that content's nodes. + this.beforePreviewNodes = [...this.containerEl.childNodes]; + } + // Empty the container and add the template content + while (this.containerEl.lastChild) { + this.containerEl.removeChild(this.containerEl.lastChild); + } + const temp = renderToFragment(widgetValue, response); + this.$target.append(temp) + if (!previewMode) { + // The original content to keep saved has to be retrieved just + // before the preview (if we save it now, we might miss other items + // added by other options or custo). + this.beforePreviewNodes = null; + } + } + }, +}); +// getting product from Many2one widget and setting the value in a global +// variable and passing to python and fetching data +const SpecialProductSnippetProduct = Many2oneSpecialWidget.include({ + init(parent, title, options, $target) { + return this._super(...arguments); + }, + _onUserValueNotification(ev) { + const { + widget + } = ev.data; + globalVariable = widget._methodsParams.recordData + if (widget && widget === this.createInput) { + ev.stopPropagation(); + return; + } + if (widget && widget === this.createButton) { + if (!this.createInput._value) { + ev.stopPropagation(); + } + return; + } + if (widget !== this.createButton && this.createInput) { + this.createInput._value = ''; + } + return this._super(ev); + }, +}); +options.userValueWidgetsRegistry['we-many2one-special'] = Many2oneSpecialWidget; +return { + SpecialProductSnippetProduct: SpecialProductSnippetProduct, + SpecialProduct: options.registry.SpecialProduct, + Many2oneSpecialWidget: Many2oneSpecialWidget, +}; diff --git a/special_product_snippet/static/src/xml/special_product_snippet.xml b/special_product_snippet/static/src/xml/special_product_snippet.xml new file mode 100755 index 000000000..47e26cbdd --- /dev/null +++ b/special_product_snippet/static/src/xml/special_product_snippet.xml @@ -0,0 +1,89 @@ + + + + +
+ Product Image +
+

+ +

+

+ +

+

Starting at + +

+ + View + +
+
+
+ +
+
+ Product Image +
+
+

+ +

+

+ +

+

Starting at + +

+ + View + +
+
+
+ +
+
+

+ +

+
+
+ Product Image +
+ +
+
+

Starting at + +

+ View + +
+
+
+
+ +
+
+ Product Image +
+
+ + + View +
+
+
+
diff --git a/special_product_snippet/views/product_snippet_templates.xml b/special_product_snippet/views/product_snippet_templates.xml new file mode 100755 index 000000000..b8fd89c96 --- /dev/null +++ b/special_product_snippet/views/product_snippet_templates.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + diff --git a/special_product_snippet/views/special_product_snippet_templates.xml b/special_product_snippet/views/special_product_snippet_templates.xml new file mode 100755 index 000000000..4d32e4599 --- /dev/null +++ b/special_product_snippet/views/special_product_snippet_templates.xml @@ -0,0 +1,11 @@ + + + + +