@ -0,0 +1,51 @@ | 
				
			|||
.. 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 | 
				
			|||
 | 
				
			|||
Website Product Customization | 
				
			|||
============================= | 
				
			|||
This Module allows users to customize the the product they buy from website/shop | 
				
			|||
by applying individual designs. | 
				
			|||
 | 
				
			|||
Configuration | 
				
			|||
============= | 
				
			|||
* Add appropriate number of designs in the product.design model for the customer | 
				
			|||
to choose from the front-end. | 
				
			|||
 | 
				
			|||
License | 
				
			|||
------- | 
				
			|||
Affero General Public License v3.0 (AGPL v3) | 
				
			|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) | 
				
			|||
 | 
				
			|||
Company | 
				
			|||
------- | 
				
			|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Credits | 
				
			|||
------- | 
				
			|||
* Developers: 	(V15)Nisiya K @ cybrosys, | 
				
			|||
                (V16)Vivek @ cybrosys, | 
				
			|||
                (V17) Gayathri V | 
				
			|||
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 <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Further information | 
				
			|||
=================== | 
				
			|||
HTML Description: `<static/description/index.html>`__ | 
				
			|||
@ -0,0 +1,23 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from . import controllers | 
				
			|||
from . import models | 
				
			|||
@ -0,0 +1,56 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
{ | 
				
			|||
    'name': 'Website Product Customization', | 
				
			|||
    'version': '15.0.1.0.0', | 
				
			|||
    'category': 'Website', | 
				
			|||
    'summary': 'Customize products from website', | 
				
			|||
    'description': 'This module helps to customise the products from website' | 
				
			|||
                   'according to the customer wish', | 
				
			|||
    'author': 'Cybrosys Techno Solutions', | 
				
			|||
    'company': 'Cybrosys Techno Solutions', | 
				
			|||
    'maintainer': 'Cybrosys Techno Solutions', | 
				
			|||
    'website': "https://www.cybrosys.com", | 
				
			|||
    'depends': ['website_sale', 'website_sale_product_configurator'], | 
				
			|||
    'data': [ | 
				
			|||
        'security/ir.model.access.csv', | 
				
			|||
        'views/product_design_views.xml', | 
				
			|||
        'views/website_sale_templates.xml', | 
				
			|||
        'views/sale_order_views.xml', | 
				
			|||
    ], | 
				
			|||
    'assets': { | 
				
			|||
        'web.assets_frontend': [ | 
				
			|||
            "website_product_customization/static/src/js/website_sale_patch.js", | 
				
			|||
            "/website_product_customization/static/src/css/style.css", | 
				
			|||
            "/website_product_customization/static/src/lib/js/Fabric/fabric.js", | 
				
			|||
            "/website_product_customization/static/src/js/website_product_custom.js", | 
				
			|||
        ], | 
				
			|||
 | 
				
			|||
    }, | 
				
			|||
    'images': ['static/description/banner.png'], | 
				
			|||
    'license': 'AGPL-3', | 
				
			|||
    'installable': True, | 
				
			|||
    'auto_install': False, | 
				
			|||
    'application': True, | 
				
			|||
} | 
				
			|||
 | 
				
			|||
 | 
				
			|||
@ -0,0 +1,22 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from . import website_product_customization | 
				
			|||
@ -0,0 +1,196 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Gayathri V @ cybrosys,(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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
import json | 
				
			|||
import re | 
				
			|||
from odoo import fields, http | 
				
			|||
from odoo.http import request | 
				
			|||
from odoo.addons.website_sale.controllers.main import WebsiteSale | 
				
			|||
from odoo.addons.website_sale.controllers import main | 
				
			|||
from odoo.tools.json import scriptsafe as json_scriptsafe | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class WebsiteProductCustomization(WebsiteSale): | 
				
			|||
    """ | 
				
			|||
    Inheriting 'WebsiteSale' class from 'website_sale.controllers.main' to | 
				
			|||
    modify the method 'cart_update_json'. | 
				
			|||
    """ | 
				
			|||
 | 
				
			|||
    @http.route() | 
				
			|||
    def cart_update_json(self, product_id, design_image=None, line_id=None, add_qty=None, | 
				
			|||
                         set_qty=None, display=True, **kw): | 
				
			|||
        """ | 
				
			|||
        This route is called : | 
				
			|||
            - When changing quantity from the cart. | 
				
			|||
            - When adding a product from the wishlist. | 
				
			|||
            - When adding a product to cart on the same page (without redirection). | 
				
			|||
        """ | 
				
			|||
        order = request.website.sale_get_order(force_create=1) | 
				
			|||
        if order.state != 'draft': | 
				
			|||
            request.website.sale_reset() | 
				
			|||
            if kw.get('force_create'): | 
				
			|||
                order = request.website.sale_get_order(force_create=1) | 
				
			|||
            else: | 
				
			|||
                return {} | 
				
			|||
 | 
				
			|||
        pcav = kw.get('product_custom_attribute_values') | 
				
			|||
        nvav = kw.get('no_variant_attribute_values') | 
				
			|||
 | 
				
			|||
        value = order._cart_update( | 
				
			|||
            product_id=product_id, | 
				
			|||
            line_id=line_id, | 
				
			|||
            add_qty=add_qty, | 
				
			|||
            set_qty=set_qty, | 
				
			|||
            design_image=design_image, | 
				
			|||
            product_custom_attribute_values=json_scriptsafe.loads( | 
				
			|||
                pcav) if pcav else None, | 
				
			|||
            no_variant_attribute_values=json_scriptsafe.loads( | 
				
			|||
                nvav) if nvav else None, | 
				
			|||
 | 
				
			|||
        ) | 
				
			|||
 | 
				
			|||
        if design_image: | 
				
			|||
            for record in order.order_line: | 
				
			|||
                if record.id == value["line_id"]: | 
				
			|||
                    record.product_design = str( | 
				
			|||
                        re.sub("^data:image\/\w+;base64,", "", design_image), | 
				
			|||
                    ) | 
				
			|||
                    record.is_customized_product = True | 
				
			|||
 | 
				
			|||
        if not order.cart_quantity: | 
				
			|||
            request.website.sale_reset() | 
				
			|||
            return value | 
				
			|||
 | 
				
			|||
        order = request.website.sale_get_order() | 
				
			|||
        value['cart_quantity'] = order.cart_quantity | 
				
			|||
 | 
				
			|||
        if not display: | 
				
			|||
            return value | 
				
			|||
 | 
				
			|||
        value['website_sale.cart_lines'] = request.env[ | 
				
			|||
            'ir.ui.view']._render_template("website_sale.cart_lines", { | 
				
			|||
            'website_sale_order': order, | 
				
			|||
            'date': fields.Date.today(), | 
				
			|||
            'suggested_products': order._cart_accessories() | 
				
			|||
        }) | 
				
			|||
        value['website_sale.short_cart_summary'] = request.env[ | 
				
			|||
            'ir.ui.view']._render_template("website_sale.short_cart_summary", { | 
				
			|||
            'website_sale_order': order, | 
				
			|||
        }) | 
				
			|||
        return value | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class WebsiteSale(main.WebsiteSale): | 
				
			|||
    """ | 
				
			|||
    Inheriting 'WebsiteSale' class from | 
				
			|||
    'website_sale_product_configurator.controllers.main' to modify the method | 
				
			|||
    'cart_options_update_json'. | 
				
			|||
    """ | 
				
			|||
 | 
				
			|||
    @http.route() | 
				
			|||
    def cart_options_update_json( | 
				
			|||
        self, product_and_options, goto_shop=None, lang=None, **kwargs | 
				
			|||
    ): | 
				
			|||
        """This route is called when submitting the optional product modal. | 
				
			|||
        The product without parent is the main product, the other are options. | 
				
			|||
        Options need to be linked to their parents with a unique ID. | 
				
			|||
        The main product is the first product in the list and the options | 
				
			|||
        need to be right after their parent. | 
				
			|||
        product_and_options { | 
				
			|||
            'product_id', | 
				
			|||
            'product_template_id', | 
				
			|||
            'quantity', | 
				
			|||
            'parent_unique_id', | 
				
			|||
            'unique_id', | 
				
			|||
            'product_custom_attribute_values', | 
				
			|||
            'no_variant_attribute_values' | 
				
			|||
        } | 
				
			|||
        """ | 
				
			|||
        if lang: | 
				
			|||
            request.website = request.website.with_context(lang=lang) | 
				
			|||
        order = request.website.sale_get_order(force_create=True) | 
				
			|||
        if order.state != "draft": | 
				
			|||
            request.session["sale_order_id"] = None | 
				
			|||
            order = request.website.sale_get_order(force_create=True) | 
				
			|||
        product_and_options = json.loads(product_and_options) | 
				
			|||
        if product_and_options: | 
				
			|||
            # The main product is the first, optional products are the rest | 
				
			|||
            main_product = product_and_options[0] | 
				
			|||
            design_image = ( | 
				
			|||
                main_product["design_image"] if "design_image" in main_product else None | 
				
			|||
            ) | 
				
			|||
            value = order._cart_update( | 
				
			|||
                product_id=main_product["product_id"], | 
				
			|||
                add_qty=main_product["quantity"], | 
				
			|||
                product_custom_attribute_values=main_product[ | 
				
			|||
                    "product_custom_attribute_values" | 
				
			|||
                ], | 
				
			|||
                no_variant_attribute_values=main_product["no_variant_attribute_values"], | 
				
			|||
                design_image=design_image, | 
				
			|||
                **kwargs | 
				
			|||
            ) | 
				
			|||
            if value["line_id"]: | 
				
			|||
                # Link option with its parent if line has been created. | 
				
			|||
                option_parent = {main_product["unique_id"]: value["line_id"]} | 
				
			|||
                for option in product_and_options[1:]: | 
				
			|||
                    parent_unique_id = option["parent_unique_id"] | 
				
			|||
                    option_value = order._cart_update( | 
				
			|||
                        product_id=option["product_id"], | 
				
			|||
                        set_qty=option["quantity"], | 
				
			|||
                        linked_line_id=option_parent[parent_unique_id], | 
				
			|||
                        product_custom_attribute_values=option[ | 
				
			|||
                            "product_custom_attribute_values" | 
				
			|||
                        ], | 
				
			|||
                        no_variant_attribute_values=option[ | 
				
			|||
                            "no_variant_attribute_values" | 
				
			|||
                        ], | 
				
			|||
                        design_image=design_image, | 
				
			|||
                        **kwargs | 
				
			|||
                    ) | 
				
			|||
                    option_parent[option["unique_id"]] = option_value["line_id"] | 
				
			|||
                    for record in order.order_line: | 
				
			|||
                        if record.id == option_value["line_id"]: | 
				
			|||
                            record.product_design = ( | 
				
			|||
                                request.env["product.product"] | 
				
			|||
                                .sudo() | 
				
			|||
                                .browse(option["product_id"]).cart_quantity.image_1920) | 
				
			|||
 | 
				
			|||
                if design_image: | 
				
			|||
                    for record in order.order_line: | 
				
			|||
                        if record.id == value["line_id"]: | 
				
			|||
                            record.product_design = str( | 
				
			|||
                                re.sub( | 
				
			|||
                                    "^data:image\/\w+;base64,", | 
				
			|||
                                    "", | 
				
			|||
                                    main_product["design_image"], | 
				
			|||
                                ), | 
				
			|||
                            ) | 
				
			|||
                            record.is_customized_product = True | 
				
			|||
                else: | 
				
			|||
                    if not order.order_line.browse(value["line_id"]).product_design: | 
				
			|||
                        order.order_line.browse(value["line_id"]).product_design = ( | 
				
			|||
                            request.env["product.product"] | 
				
			|||
                            .sudo() | 
				
			|||
                            .browse(main_product["product_id"]) | 
				
			|||
                            .image_1920 | 
				
			|||
                        ) | 
				
			|||
        request.session["website_sale_cart_quantity"] = order.cart_quantity | 
				
			|||
        return str(order.cart_quantity) | 
				
			|||
@ -0,0 +1,5 @@ | 
				
			|||
## Module <website_product_customization> | 
				
			|||
#### 17.07.2024 | 
				
			|||
#### Version 15.0.1.0.0 | 
				
			|||
#### ADD | 
				
			|||
- Initial Commit for Website Product Customization. | 
				
			|||
@ -0,0 +1,24 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from . import product_design | 
				
			|||
from . import sale_order_line | 
				
			|||
from . import sale_order | 
				
			|||
@ -0,0 +1,36 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class ProductDesign(models.Model): | 
				
			|||
    """ | 
				
			|||
    Creating the product.design model to add product designs in the back-end | 
				
			|||
    """ | 
				
			|||
    _name = 'product.design' | 
				
			|||
    _description = "Product Design" | 
				
			|||
 | 
				
			|||
    name = fields.Char(string='Product Design', | 
				
			|||
                       help="Name field for product design", required=True) | 
				
			|||
    product_design = fields.Image(string='Design', | 
				
			|||
                                  help="Binary field for adding product design", | 
				
			|||
                                  required=True) | 
				
			|||
@ -0,0 +1,59 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from odoo import models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class SaleOrder(models.Model): | 
				
			|||
    """Inherited the class sale.order to match the order line.""" | 
				
			|||
    _inherit = "sale.order" | 
				
			|||
 | 
				
			|||
    def _cart_find_product_line(self, product_id, line_id=None, **kwargs): | 
				
			|||
        """Find the cart line matching the given parameters. | 
				
			|||
        If a product_id is given, the line will match the product only if the | 
				
			|||
        line also has the same special attributes: `no_variant` attributes and | 
				
			|||
        `is_custom` values. | 
				
			|||
        """ | 
				
			|||
 | 
				
			|||
        self.ensure_one() | 
				
			|||
        SaleOrderLine = self.env["sale.order.line"] | 
				
			|||
        if not self.order_line: | 
				
			|||
            return SaleOrderLine | 
				
			|||
        product = self.env["product.product"].browse(product_id) | 
				
			|||
        if not line_id and ( | 
				
			|||
                product.product_tmpl_id.has_dynamic_attributes() | 
				
			|||
                or product.product_tmpl_id._has_no_variant_attributes() | 
				
			|||
        ): | 
				
			|||
            return SaleOrderLine | 
				
			|||
 | 
				
			|||
        if kwargs.get("design_image"): | 
				
			|||
            return SaleOrderLine | 
				
			|||
        else: | 
				
			|||
            domain = [("order_id", "=", self.id), | 
				
			|||
                      ("product_id", "=", product_id)] | 
				
			|||
            if line_id: | 
				
			|||
                domain += [("id", "=", line_id)] | 
				
			|||
            else: | 
				
			|||
                domain += [ | 
				
			|||
                    ("product_custom_attribute_value_ids", "=", False), | 
				
			|||
                    ("is_customized_product", "=", False), | 
				
			|||
                ] | 
				
			|||
        return SaleOrderLine.search(domain) | 
				
			|||
@ -0,0 +1,37 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class SaleOrderLine(models.Model): | 
				
			|||
    """ | 
				
			|||
    Inheriting the 'sale.order.line' model add the product_design field | 
				
			|||
    """ | 
				
			|||
    _inherit = 'sale.order.line' | 
				
			|||
 | 
				
			|||
    product_design = fields.Binary(string="Product Design", | 
				
			|||
                                   help="Binary field to show product design") | 
				
			|||
    is_customized_product = fields.Boolean(string="Customized Product" | 
				
			|||
                                                  "product", | 
				
			|||
                                           help="Indicates whether the product " | 
				
			|||
                                                "is customized or not", | 
				
			|||
                                           default=False) | 
				
			|||
		
		
			
  | 
| 
		 After Width: | Height: | Size: 36 KiB  | 
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
| 
		 After Width: | Height: | Size: 310 B  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 576 B  | 
| 
		 After Width: | Height: | Size: 733 B  | 
| 
		 After Width: | Height: | Size: 911 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 3.4 KiB  | 
| 
		 After Width: | Height: | Size: 673 B  | 
| 
		 After Width: | Height: | Size: 11 KiB  | 
| 
		 After Width: | Height: | Size: 878 B  | 
| 
		 After Width: | Height: | Size: 653 B  | 
| 
		 After Width: | Height: | Size: 905 B  | 
| 
		 After Width: | Height: | Size: 839 B  | 
| 
		 After Width: | Height: | Size: 427 B  | 
| 
		 After Width: | Height: | Size: 627 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 988 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 80 KiB  | 
| 
		 After Width: | Height: | Size: 1.5 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 4.4 KiB  | 
| 
		 After Width: | Height: | Size: 3.2 KiB  | 
| 
		 After Width: | Height: | Size: 589 B  | 
| 
		 After Width: | Height: | Size: 3.4 KiB  | 
| 
		 After Width: | Height: | Size: 565 B  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
| 
		 After Width: | Height: | Size: 967 B  | 
| 
		 After Width: | Height: | Size: 26 KiB  | 
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
| 
		 After Width: | Height: | Size: 43 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 3.8 KiB  | 
| 
		 After Width: | Height: | Size: 4.0 KiB  | 
| 
		 After Width: | Height: | Size: 38 KiB  | 
| 
		 After Width: | Height: | Size: 5.0 KiB  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 49 KiB  | 
| 
		 After Width: | Height: | Size: 48 KiB  | 
| 
		 After Width: | Height: | Size: 47 KiB  | 
| 
		 After Width: | Height: | Size: 60 KiB  | 
| 
		 After Width: | Height: | Size: 47 KiB  | 
| 
		 After Width: | Height: | Size: 38 KiB  | 
| 
		 After Width: | Height: | Size: 100 KiB  | 
| 
		 After Width: | Height: | Size: 71 KiB  | 
| 
		 After Width: | Height: | Size: 101 KiB  | 
| 
		 After Width: | Height: | Size: 101 KiB  | 
| 
		 After Width: | Height: | Size: 184 KiB  | 
| 
		 After Width: | Height: | Size: 140 KiB  | 
| 
		 After Width: | Height: | Size: 48 KiB  | 
| 
		 After Width: | Height: | Size: 7.9 KiB  | 
@ -0,0 +1,597 @@ | 
				
			|||
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;"> | 
				
			|||
  <div class="row"> | 
				
			|||
    <div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;"> | 
				
			|||
      <div class="my-3"> | 
				
			|||
        <img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;"> | 
				
			|||
      </div> | 
				
			|||
      <div class="my-3 d-flex align-items-center"> | 
				
			|||
        <div | 
				
			|||
          style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> | 
				
			|||
          <i class="fa fa-check mr-1"></i>Community | 
				
			|||
        </div> | 
				
			|||
        <div | 
				
			|||
          style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> | 
				
			|||
          <i class="fa fa-check mr-1"></i>Enterprise | 
				
			|||
        </div> | 
				
			|||
 | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
  </div> | 
				
			|||
</div> | 
				
			|||
 | 
				
			|||
<div class="container" style="padding: 0rem 1.5rem 4rem !important"> | 
				
			|||
  <div class="row" style="height: 900px !important;"> | 
				
			|||
    <div class="col-sm-12 col-md-12 col-lg-12" | 
				
			|||
      style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;"> | 
				
			|||
      <h1 | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important;  font-size: 3.5rem !important; text-align: center !important;"> | 
				
			|||
        Website Product Customization</h1> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important;  font-size: 1.4rem !important; text-align: center !important;"> | 
				
			|||
        Customize Product Design From Website.</p> | 
				
			|||
      <img src="./assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto" /> | 
				
			|||
    </div> | 
				
			|||
  </div> | 
				
			|||
 | 
				
			|||
  <div class="row"> | 
				
			|||
    <div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important"> | 
				
			|||
      <h2 | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | 
				
			|||
        <i class="fa fa-compass mr-2"></i>Explore this module | 
				
			|||
      </h2> | 
				
			|||
      <div class="row"> | 
				
			|||
        <div class="col-md-6"> | 
				
			|||
          <a href="#overview" style="text-decoration: none !important;"> | 
				
			|||
            <div class="row" | 
				
			|||
              style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | 
				
			|||
              <div class="col-8"> | 
				
			|||
                <h3 | 
				
			|||
                  style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | 
				
			|||
                  Overview</h3> | 
				
			|||
                <p | 
				
			|||
                  style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | 
				
			|||
                  Learn more about this module</p> | 
				
			|||
              </div> | 
				
			|||
              <div class="col-4 text-right d-flex justify-content-end align-items-center"> | 
				
			|||
                <i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> | 
				
			|||
              </div> | 
				
			|||
            </div> | 
				
			|||
          </a> | 
				
			|||
        </div> | 
				
			|||
        <div class="col-md-6"> | 
				
			|||
          <a href="#features" style="text-decoration: none !important;"> | 
				
			|||
            <div class="row" | 
				
			|||
              style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | 
				
			|||
              <div class="col-8"> | 
				
			|||
                <h3 | 
				
			|||
                  style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | 
				
			|||
                  Features</h3> | 
				
			|||
                <p | 
				
			|||
                  style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | 
				
			|||
                  View features of this module</p> | 
				
			|||
              </div> | 
				
			|||
              <div class="col-4 text-right d-flex justify-content-end align-items-center"> | 
				
			|||
                <i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> | 
				
			|||
              </div> | 
				
			|||
            </div> | 
				
			|||
          </a> | 
				
			|||
        </div> | 
				
			|||
        <div class="col-md-6"> | 
				
			|||
          <a href="#screenshots" style="text-decoration: none !important;"> | 
				
			|||
            <div class="row" | 
				
			|||
              style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> | 
				
			|||
              <div class="col-8"> | 
				
			|||
                <h3 | 
				
			|||
                  style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> | 
				
			|||
                  Screenshots</h3> | 
				
			|||
                <p | 
				
			|||
                  style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> | 
				
			|||
                  See key screenshots of this module</p> | 
				
			|||
              </div> | 
				
			|||
              <div class="col-4 text-right d-flex justify-content-end align-items-center"> | 
				
			|||
                <i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> | 
				
			|||
              </div> | 
				
			|||
            </div> | 
				
			|||
          </a> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
  </div> | 
				
			|||
 | 
				
			|||
  <div class="row" id="overview"> | 
				
			|||
    <div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | 
				
			|||
      <h2 | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | 
				
			|||
        <i class="fa fa-pie-chart mr-2"></i>Overview | 
				
			|||
      </h2> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-mg-12 pl-3"> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;"> | 
				
			|||
        This module allows to customize the product image from website.</p> | 
				
			|||
    </div> | 
				
			|||
    </p> | 
				
			|||
 | 
				
			|||
  </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
  <div class="row" id="features"> | 
				
			|||
    <div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | 
				
			|||
      <h2 | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | 
				
			|||
        <i class="fa fa-star mr-2"></i>Features | 
				
			|||
      </h2> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-md-6 pl-3 py-3 d-flex"> | 
				
			|||
      <div> | 
				
			|||
        <img src="assets/icons/check.png"> | 
				
			|||
      </div> | 
				
			|||
      <div> | 
				
			|||
        <h4 | 
				
			|||
          style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
          Create customized designs. </h4> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-md-6 pl-3 py-3 d-flex"> | 
				
			|||
      <div> | 
				
			|||
        <img src="assets/icons/check.png"> | 
				
			|||
      </div> | 
				
			|||
      <div> | 
				
			|||
        <h4 | 
				
			|||
          style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
          Allows users to customize products by choosing the designs from front-end</h4> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
  </div> | 
				
			|||
 | 
				
			|||
  <div class="row" id="screenshots"> | 
				
			|||
    <div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> | 
				
			|||
      <h2 | 
				
			|||
        style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> | 
				
			|||
        <i class="fa fa-image mr-2"></i>Screenshots | 
				
			|||
      </h2> | 
				
			|||
    </div> | 
				
			|||
    <div class="col-lg-12 my-2"> | 
				
			|||
      <h4 class="mt-2" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Create designs in the back-end</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        Go to Product Design --> Product Design view and create a new design. This design will then be available for customers on the front end. | 
				
			|||
        </p> | 
				
			|||
      <img src="assets/screenshots/1.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-lg-12 my-2"> | 
				
			|||
      <h4 class="mt-2" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Click on the 'CUSTOMIZE PRODUCT' button.</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        Click on the 'CUSTOMIZE PRODUCT' button to customize the design of the product. | 
				
			|||
        </p> | 
				
			|||
      <img src="assets/screenshots/2.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-lg-12 my-3"> | 
				
			|||
      <h4 class="mt-3" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Choose preferred design.</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        Select the preferred design from the available options. | 
				
			|||
      </p> | 
				
			|||
      <img src="assets/screenshots/3.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-lg-12 my-3"> | 
				
			|||
      <h4 class="mt-3" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Design appears on the product</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        After choosing appropriate design, the design will automatically appear on the product. | 
				
			|||
      </p> | 
				
			|||
      <img src="assets/screenshots/4.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-lg-12 my-3"> | 
				
			|||
      <h4 class="mt-3" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Save the design</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        After customizing the design by moving the design, resizing the design, or rotating the design etc., save the changes by clicking on the 'Save' button. | 
				
			|||
      </p> | 
				
			|||
     <img src="assets/screenshots/5.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <div class="col-lg-12 my-3"> | 
				
			|||
      <h4 class="mt-3" | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> | 
				
			|||
        Updated product in the back-end</h4> | 
				
			|||
      <p | 
				
			|||
        style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | 
				
			|||
        Product with design will appear on the associated sale order in the back-end | 
				
			|||
      </p> | 
				
			|||
      <img src="assets/screenshots/6.png" class="img-responsive img-thumbnail border" width="100%" | 
				
			|||
        height="auto" /> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
  </div> | 
				
			|||
  <!-- SUGGESTED PRODUCTS --> | 
				
			|||
  <div class="row"> | 
				
			|||
    <div class="col-lg-12 d-flex flex-column justify-content-center" | 
				
			|||
      style="text-align: center; padding: 2.5rem 1rem !important;"> | 
				
			|||
      <h2 style="color: #212529 !important;">Suggested Products</h2> | 
				
			|||
      <hr | 
				
			|||
        style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> | 
				
			|||
 | 
				
			|||
      <div id="demo1" class="row carousel slide" data-ride="carousel"> | 
				
			|||
        <!-- The slideshow --> | 
				
			|||
        <div class="carousel-inner"> | 
				
			|||
          <div class="carousel-item active" style="min-height:0px"> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/customize_signup" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/1.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/website_product_stock_information" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/2.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/project_website_kanban_view" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/3.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
          </div> | 
				
			|||
          <div class="carousel-item" style="min-height:0px"> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/website_cancel_sale_order" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/4.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/product_visibility_website" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/5.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
            <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> | 
				
			|||
              <a href="https://apps.odoo.com/apps/modules/15.0/website_hide_variants" target="_blank"> | 
				
			|||
                <div style="border-radius:10px"> | 
				
			|||
                  <img class="img img-responsive center-block" | 
				
			|||
                    style="border-top-left-radius:10px; border-top-right-radius:10px" | 
				
			|||
                    src="assets/modules/6.png"> | 
				
			|||
                </div> | 
				
			|||
              </a> | 
				
			|||
            </div> | 
				
			|||
          </div> | 
				
			|||
        </div> | 
				
			|||
        <!-- Left and right controls --> | 
				
			|||
        <a class="carousel-control-prev" href="#demo1" data-slide="prev" style="left:-25px;width: 35px;color: #000;"> | 
				
			|||
          <span class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> | 
				
			|||
        <a class="carousel-control-next" href="#demo1" data-slide="next" style="right:-25px;width: 35px;color: #000;"> | 
				
			|||
          <span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span> | 
				
			|||
        </a> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
  </div> | 
				
			|||
  <!-- END OF SUGGESTED PRODUCTS --> | 
				
			|||
 | 
				
			|||
  <!-- OUR SERVICES --> | 
				
			|||
  <section class="container" style="margin-top: 6rem !important;"> | 
				
			|||
    <div class="row"> | 
				
			|||
      <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | 
				
			|||
        <h2 style="color: #212529 !important;">Our Services</h2> | 
				
			|||
        <hr | 
				
			|||
          style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Customization</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Implementation</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Support</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Hire | 
				
			|||
          Odoo | 
				
			|||
          Developer</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Integration</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Migration</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Consultancy</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Implementation</h6> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | 
				
			|||
        <div class="d-flex justify-content-center align-items-center mx-3 my-3" | 
				
			|||
          style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | 
				
			|||
          <img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px"> | 
				
			|||
        </div> | 
				
			|||
        <h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | 
				
			|||
          Odoo | 
				
			|||
          Licensing Consultancy</h6> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
  </section> | 
				
			|||
  <!-- END OF END OF OUR SERVICES --> | 
				
			|||
 | 
				
			|||
  <!-- OUR INDUSTRIES --> | 
				
			|||
  <section class="container" style="margin-top: 6rem !important;"> | 
				
			|||
    <div class="row"> | 
				
			|||
      <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | 
				
			|||
        <h2 style="color: #212529 !important;">Our Industries</h2> | 
				
			|||
        <hr | 
				
			|||
          style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Trading | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Easily procure | 
				
			|||
            and | 
				
			|||
            sell your products</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            POS | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Easy | 
				
			|||
            configuration | 
				
			|||
            and convivial experience</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Education | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            A platform for | 
				
			|||
            educational management</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Manufacturing | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Plan, track and | 
				
			|||
            schedule your operations</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            E-commerce & Website | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Mobile | 
				
			|||
            friendly, | 
				
			|||
            awe-inspiring product pages</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Service Management | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Keep track of | 
				
			|||
            services and invoice</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Restaurant | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            Run your bar or | 
				
			|||
            restaurant methodically</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-3"> | 
				
			|||
        <div class="my-4 d-flex flex-column justify-content-center" | 
				
			|||
          style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> | 
				
			|||
          <img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px"> | 
				
			|||
          <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | 
				
			|||
            Hotel Management | 
				
			|||
          </h5> | 
				
			|||
          <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | 
				
			|||
            An | 
				
			|||
            all-inclusive | 
				
			|||
            hotel management application</p> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
    </div> | 
				
			|||
  </section> | 
				
			|||
 | 
				
			|||
  <!-- END OF END OF OUR INDUSTRIES --> | 
				
			|||
 | 
				
			|||
  <!-- FOOTER --> | 
				
			|||
  <!-- Footer Section --> | 
				
			|||
  <section class="container" style="margin: 5rem auto 2rem;"> | 
				
			|||
    <div class="row" style="max-width:1540px;"> | 
				
			|||
      <div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> | 
				
			|||
        <h2 style="color: #212529 !important;">Need Help?</h2> | 
				
			|||
        <hr | 
				
			|||
          style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
 | 
				
			|||
    <!-- Contact Cards --> | 
				
			|||
    <div class="row d-flex justify-content-center align-items-center" | 
				
			|||
      style="max-width:1540px; margin: 0 auto 2rem auto;"> | 
				
			|||
 | 
				
			|||
      <div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; "> | 
				
			|||
 | 
				
			|||
        <div class="row mt-4"> | 
				
			|||
          <div class="col-lg-6"> | 
				
			|||
            <a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover" | 
				
			|||
              style="text-decoration: none;  background-color: #4d4d4d; color: #FFF;  border-radius: 4px;"><i | 
				
			|||
                class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a> | 
				
			|||
          </div> | 
				
			|||
          <div class="col-lg-6"> | 
				
			|||
            <a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank" | 
				
			|||
              class="btn btn-block mb-2 deep_hover" | 
				
			|||
              style="text-decoration: none;  background-color: #25D366; color: #FFF;  border-radius: 4px;"><i | 
				
			|||
                class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a> | 
				
			|||
          </div> | 
				
			|||
        </div> | 
				
			|||
      </div> | 
				
			|||
 | 
				
			|||
    </div> | 
				
			|||
    <!-- End of Contact Cards --> | 
				
			|||
  </section> | 
				
			|||
  <!-- Footer --> | 
				
			|||
  <section class="oe_container" style="padding: 2rem 3rem 1rem;"> | 
				
			|||
    <div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; "> | 
				
			|||
      <!-- Logo --> | 
				
			|||
      <div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;"> | 
				
			|||
        <img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" /> | 
				
			|||
      </div> | 
				
			|||
      <!-- End of Logo --> | 
				
			|||
      <div class="col-lg-12"> | 
				
			|||
        <hr | 
				
			|||
          style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;"> | 
				
			|||
        <!-- End of Footer Section --> | 
				
			|||
      </div> | 
				
			|||
    </div> | 
				
			|||
  </section> | 
				
			|||
  <!-- END OF FOOTER --> | 
				
			|||
 | 
				
			|||
</div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
@ -0,0 +1,44 @@ | 
				
			|||
 | 
				
			|||
.product_customisation_image{ | 
				
			|||
    width:350px; | 
				
			|||
    height:400px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.drawing-area { | 
				
			|||
  position: absolute; | 
				
			|||
  top: 1px; | 
				
			|||
  left: 50px; | 
				
			|||
  z-index: 10; | 
				
			|||
  width: 350px; | 
				
			|||
  height: 400px; | 
				
			|||
  border: 1px solid #ccc; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.canvas-container { | 
				
			|||
  width: 350px !important; | 
				
			|||
  height: 400px !important; | 
				
			|||
  position: relative; | 
				
			|||
  user-select: none; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
#tshirt-div { | 
				
			|||
  width: 450px; | 
				
			|||
  height: 550px; | 
				
			|||
  position: relative; | 
				
			|||
  background-color: #fff; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
#canvas { | 
				
			|||
  position: absolute; | 
				
			|||
  width: 100px !important; | 
				
			|||
  height: 100px !important; | 
				
			|||
  left: 0px; | 
				
			|||
  top: 0px; | 
				
			|||
  user-select: none; | 
				
			|||
  cursor: default; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.oe_structure { | 
				
			|||
    display: grid; | 
				
			|||
    justify-content: center; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,61 @@ | 
				
			|||
/** @odoo-module **/ | 
				
			|||
 | 
				
			|||
    // Import required modules
 | 
				
			|||
    import publicWidget from "@web/legacy/js/public/public_widget"; | 
				
			|||
 | 
				
			|||
    let canvas = new fabric.Canvas('tshirt-canvas'); | 
				
			|||
    var count = 0; | 
				
			|||
    // Event listener for the "Delete" key
 | 
				
			|||
    document.addEventListener("keydown", function(event){ | 
				
			|||
        var value = event.key; | 
				
			|||
        if (value=="Delete"){ | 
				
			|||
            canvas.remove(canvas.getActiveObject()); | 
				
			|||
        } | 
				
			|||
    }); | 
				
			|||
    // Define a custom widget
 | 
				
			|||
    publicWidget.registry.canvasWidget = publicWidget.Widget.extend({ | 
				
			|||
    selector: '#product_detail', | 
				
			|||
    events: { | 
				
			|||
        'change #product-design': '_onChangeSelect', | 
				
			|||
        'click .design_save': '_onSave', | 
				
			|||
        'click #product_customize_btn': '_addProductDesign', | 
				
			|||
    }, | 
				
			|||
    // Event handler for the change event on the product-design element
 | 
				
			|||
    _onChangeSelect: function(){ | 
				
			|||
        var selectedOption = this.$el.find('#product-design').val().toString(); | 
				
			|||
        var design_image = new Image(); | 
				
			|||
        design_image.src = '/web/image/product.design/' + selectedOption + '/product_design' | 
				
			|||
        design_image.onload = function () { | 
				
			|||
                        var image = new fabric.Image(design_image); | 
				
			|||
                        image.scaleToHeight(100); | 
				
			|||
                        image.scaleToWidth(100); | 
				
			|||
                        canvas.centerObject(image); | 
				
			|||
                        canvas.add(image) | 
				
			|||
                        canvas.renderAll(); | 
				
			|||
                    }; | 
				
			|||
        }, | 
				
			|||
    // Event handl  er for the click event on elements with the design_save class
 | 
				
			|||
    _onSave: function(design_image){ | 
				
			|||
        var node = design_image.delegateTarget.lastElementChild.querySelector('#tshirt-div'); | 
				
			|||
        domtoimage.toPng(node).then(function (dataUrl) { | 
				
			|||
        var img = new Image(); | 
				
			|||
        img.classList.add("design_image_doc"); | 
				
			|||
        img.src = dataUrl; | 
				
			|||
        document.body.appendChild(img); | 
				
			|||
        alert('Saved your customized Image!!!!!!, Now you can Add it in to the cart') | 
				
			|||
        }) | 
				
			|||
    }, | 
				
			|||
    // Event handler for the click event on the product_customize_btn element
 | 
				
			|||
    _addProductDesign: function(ev){ | 
				
			|||
        count++; | 
				
			|||
        const productDesignBody = document.querySelector('.product_design_body'); | 
				
			|||
        if (count%2 == 0){ | 
				
			|||
           productDesignBody.classList.add("d-none"); | 
				
			|||
        } | 
				
			|||
        else{ | 
				
			|||
            productDesignBody.classList.remove("d-none"); | 
				
			|||
        } | 
				
			|||
    }, | 
				
			|||
}); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
@ -0,0 +1,72 @@ | 
				
			|||
/** @odoo-module **/ | 
				
			|||
 | 
				
			|||
import { WebsiteSale } from '@website_sale/js/website_sale'; | 
				
			|||
//website_sale/static/src/js/website_sale.js
 | 
				
			|||
//import { patch } from '@web/core/utils/patch';
 | 
				
			|||
import { patch } from 'web.utils'; | 
				
			|||
import { jsonrpc } from "@web/core/network/rpc_service"; | 
				
			|||
 | 
				
			|||
// Patch the WebsiteSale class with custom modifications
 | 
				
			|||
patch(WebsiteSale.prototype, "my patch", { | 
				
			|||
    // Override the _submitForm method
 | 
				
			|||
 | 
				
			|||
    async _submitForm(){ | 
				
			|||
        var image_element = document.getElementsByClassName("design_image_doc") | 
				
			|||
        if (parseInt(image_element.length) == parseInt(0)) { | 
				
			|||
            return super._submitForm(...arguments); | 
				
			|||
        } | 
				
			|||
        else { | 
				
			|||
            const params = this.rootProduct; | 
				
			|||
 | 
				
			|||
            if (document.getElementsByClassName('design_image_doc')[0]){ | 
				
			|||
                var design_image = document.getElementsByClassName('design_image_doc')[0].currentSrc; | 
				
			|||
            } | 
				
			|||
            params.design_image = design_image; | 
				
			|||
                return super._submitForm(...arguments); | 
				
			|||
        }; | 
				
			|||
    }, | 
				
			|||
 | 
				
			|||
    // Override the _onModalSubmit method
 | 
				
			|||
    _onModalSubmit: function (goToShop) { | 
				
			|||
        const mainProduct = this.$('.js_product.in_cart.main_product').children('.product_id'); | 
				
			|||
        const productTrackingInfo = mainProduct.data('product-tracking-info'); | 
				
			|||
        if (productTrackingInfo) { | 
				
			|||
            const currency = productTrackingInfo['currency']; | 
				
			|||
            const productsTrackingInfo = []; | 
				
			|||
            this.$('.js_product.in_cart').each((i, el) => { | 
				
			|||
                productsTrackingInfo.push({ | 
				
			|||
                    'item_id': el.getElementsByClassName('product_id')[0].value, | 
				
			|||
                    'item_name': el.getElementsByClassName('product_display_name')[0].textContent, | 
				
			|||
                    'quantity': el.getElementsByClassName('js_quantity')[0].value, | 
				
			|||
                    'currency': currency, | 
				
			|||
                    'price': el.getElementsByClassName('oe_price')[0].getElementsByClassName('oe_currency_value')[0].textContent, | 
				
			|||
                }); | 
				
			|||
            }); | 
				
			|||
        if (productsTrackingInfo) { | 
				
			|||
                this.$el.trigger('add_to_cart_event', productsTrackingInfo); | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
        const callService = this.call.bind(this) | 
				
			|||
        this.optionalProductsModal.getAndCreateSelectedProducts() | 
				
			|||
            .then((products) => { | 
				
			|||
                var product_id = products[0].product_id | 
				
			|||
                if (document.getElementsByClassName('design_image_doc')[0]){ | 
				
			|||
                 products[0].design_image = document.getElementsByClassName('design_image_doc')[0].currentSrc; | 
				
			|||
                } | 
				
			|||
                const productAndOptions = JSON.stringify(products); | 
				
			|||
                this.rpc('/shop/cart/update_option', { | 
				
			|||
                    product_and_options: productAndOptions, | 
				
			|||
                    ...this._getOptionalCombinationInfoParam(), | 
				
			|||
                }).then(function (values) { | 
				
			|||
                    if (goToShop) { | 
				
			|||
                        window.location.pathname = "/shop/cart"; | 
				
			|||
                    } else { | 
				
			|||
                        wSaleUtils.updateCartNavBar(values); | 
				
			|||
                        wSaleUtils.showCartNotification(callService, values.notification_info); | 
				
			|||
                    } | 
				
			|||
                }).then(() => { | 
				
			|||
                    this._getCombinationInfo($.Event('click', {target: $("#add_to_cart")})); | 
				
			|||
                }); | 
				
			|||
            }); | 
				
			|||
    } | 
				
			|||
}) | 
				
			|||
@ -0,0 +1,87 @@ | 
				
			|||
odoo.define('website_sale.product_customization', function (require) { | 
				
			|||
'use strict'; | 
				
			|||
 | 
				
			|||
var core = require('web.core'); | 
				
			|||
var ajax = require('web.ajax'); | 
				
			|||
var publicWidget = require('web.public.widget'); | 
				
			|||
require('website_sale.website_sale'); | 
				
			|||
 | 
				
			|||
publicWidget.registry.WebsiteSale.include({ | 
				
			|||
 | 
				
			|||
     /** | 
				
			|||
     * Overridden to resolve _opened promise on modal | 
				
			|||
     * when stayOnPageOption is activated. | 
				
			|||
     * | 
				
			|||
     * @override | 
				
			|||
     */ | 
				
			|||
    _submitForm() { | 
				
			|||
       var image_element = document.getElementsByClassName("design_image_doc") | 
				
			|||
       if (parseInt(image_element.length) == parseInt(0)) { | 
				
			|||
            return this._super.apply(this, arguments); | 
				
			|||
        } | 
				
			|||
       else { | 
				
			|||
            if (image_element[0]){ | 
				
			|||
                var design_image = image_element[0].currentSrc | 
				
			|||
            } | 
				
			|||
            this.rootProduct.design_image = design_image; | 
				
			|||
                return this._super.apply(this, arguments); | 
				
			|||
        }; | 
				
			|||
    }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * Submits the form with additional parameters | 
				
			|||
     * - lang | 
				
			|||
     * - product_custom_attribute_values: The products custom variant values | 
				
			|||
     * | 
				
			|||
     * @private | 
				
			|||
     * @param {Boolean} goToShop Triggers a page refresh to the url "shop/cart" | 
				
			|||
     */ | 
				
			|||
    _onModalSubmit: function (goToShop) { | 
				
			|||
        const $product = $('#product_detail'); | 
				
			|||
        let currency; | 
				
			|||
        if ($product.length) { | 
				
			|||
            currency = $product.data('product-tracking-info')['currency']; | 
				
			|||
        } else { | 
				
			|||
            // Add to cart from /shop page
 | 
				
			|||
            currency = this.$('[itemprop="priceCurrency"]').first().text(); | 
				
			|||
        } | 
				
			|||
        const productsTrackingInfo = []; | 
				
			|||
        this.$('.js_product.in_cart').each((i, el) => { | 
				
			|||
            productsTrackingInfo.push({ | 
				
			|||
                'item_id': parseInt(el.getElementsByClassName('product_id')[0].value), | 
				
			|||
                'item_name': el.getElementsByClassName('product_display_name')[0].textContent, | 
				
			|||
                'quantity': parseFloat(el.getElementsByClassName('js_quantity')[0].value), | 
				
			|||
                'currency': currency, | 
				
			|||
                'price': parseFloat(el.getElementsByClassName('oe_price')[0].getElementsByClassName('oe_currency_value')[0].textContent), | 
				
			|||
            }); | 
				
			|||
        }); | 
				
			|||
        if (productsTrackingInfo.length) { | 
				
			|||
            this.$el.trigger('add_to_cart_event', productsTrackingInfo); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        this.optionalProductsModal.getAndCreateSelectedProducts() | 
				
			|||
            .then((products) => { | 
				
			|||
                var product_id = products[0].product_id | 
				
			|||
                if (document.getElementsByClassName('design_image_doc')[0]){ | 
				
			|||
                 products[0].design_image = document.getElementsByClassName('design_image_doc')[0].currentSrc; | 
				
			|||
                } | 
				
			|||
                const productAndOptions = JSON.stringify(products); | 
				
			|||
                ajax.post('/shop/cart/update_option', {product_and_options: productAndOptions}) | 
				
			|||
                    .then(function (quantity) { | 
				
			|||
                        if (goToShop) { | 
				
			|||
                            window.location.pathname = "/shop/cart"; | 
				
			|||
                        } | 
				
			|||
                        const $quantity = $(".my_cart_quantity"); | 
				
			|||
                        $quantity.parent().parent().removeClass('d-none'); | 
				
			|||
                        $quantity.text(quantity).hide().fadeIn(600); | 
				
			|||
                    }).then(()=>{ | 
				
			|||
                        this._getCombinationInfo($.Event('click', {target: $("#add_to_cart")})); | 
				
			|||
                    }); | 
				
			|||
            }); | 
				
			|||
    }, | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
 | 
				
			|||
return publicWidget.registry.ProductCustomization; | 
				
			|||
}); | 
				
			|||
@ -0,0 +1,48 @@ | 
				
			|||
<?xml version="1.0"?> | 
				
			|||
<odoo> | 
				
			|||
    <!--This code defines a tree view for the "product.design" model, displaying | 
				
			|||
     only the "name" field for each record in the view.--> | 
				
			|||
    <record id="product_design_view_tree" model="ir.ui.view"> | 
				
			|||
        <field name="name">product.design.view.tree</field> | 
				
			|||
        <field name="model">product.design</field> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <tree> | 
				
			|||
                <field name="name"/> | 
				
			|||
            </tree> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
    <!--This code defines a form view for the "product.design" model, displaying | 
				
			|||
        the "name" field and an "image" widget field called "product_design" | 
				
			|||
        within a group.--> | 
				
			|||
    <record id="product_design_view_form" model="ir.ui.view"> | 
				
			|||
        <field name="name">Product.design.view.form</field> | 
				
			|||
        <field name="model">product.design</field> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <form> | 
				
			|||
                <sheet> | 
				
			|||
                    <group> | 
				
			|||
                        <group> | 
				
			|||
                            <field name="name"/> | 
				
			|||
                            <field name="product_design" widget="image" | 
				
			|||
                                   class="oe_avatar" | 
				
			|||
                            /> | 
				
			|||
                        </group> | 
				
			|||
                    </group> | 
				
			|||
                </sheet> | 
				
			|||
            </form> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
    <!--Defines an action for opening the "product.design" model, allowing the | 
				
			|||
        user to view records in both tree view and form view.--> | 
				
			|||
    <record id="product_design_action" model="ir.actions.act_window"> | 
				
			|||
        <field name="name">Product Design View</field> | 
				
			|||
        <field name="res_model">product.design</field> | 
				
			|||
        <field name="view_mode">tree,form</field> | 
				
			|||
    </record> | 
				
			|||
    <!--Creates a menu item named "Product Design" that is linked to | 
				
			|||
    the action "product_design_action", providing a way to access the | 
				
			|||
    "product.design" view from the menu.--> | 
				
			|||
    <menuitem id="product_design_menu_action" name="Product Design" | 
				
			|||
              web_icon="website_product_customization,static/description/icon.png" | 
				
			|||
              action="product_design_action"/> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,20 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <!--Adds an "image" field called "product_design" after | 
				
			|||
         the "name" field in the tree view of the "sale.order" model. It allows | 
				
			|||
         displaying product design images in the order line view.--> | 
				
			|||
    <record id="view_order_form" model="ir.ui.view"> | 
				
			|||
        <field name="name"> | 
				
			|||
            sale.order.view.tree.inherit.website.product.customisation | 
				
			|||
        </field> | 
				
			|||
        <field name="model">sale.order</field> | 
				
			|||
        <field name="inherit_id" ref="sale.view_order_form"/> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='name']" | 
				
			|||
                   position="after"> | 
				
			|||
                <field name="product_design" widget="image" class="oe_avatar"/> | 
				
			|||
                <field name="is_customized_product" invisible="1"/> | 
				
			|||
            </xpath> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,110 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8" ?> | 
				
			|||
<odoo> | 
				
			|||
    <!--This code snippet adds a "CUSTOMIZE PRODUCT" button after a specific | 
				
			|||
     div element on a website page. It also includes functionality for | 
				
			|||
     designing a product by allowing the user to select and change designs.--> | 
				
			|||
    <template id="website_product_customization_product" | 
				
			|||
              inherit_id="website_sale.product" | 
				
			|||
              name="Website Product Customization Product"> | 
				
			|||
        <xpath expr="//div[@id='o_product_terms_and_share']" position="after"> | 
				
			|||
            <br/> | 
				
			|||
            <div id="product_customize"> | 
				
			|||
                <a role="button" id="product_customize_btn" | 
				
			|||
                   t-attf-class="btn btn-primary"> | 
				
			|||
                    <span style="font-weight: bold">CUSTOMIZE PRODUCT</span> | 
				
			|||
                </a> | 
				
			|||
            </div> | 
				
			|||
        </xpath> | 
				
			|||
        <xpath expr="//section[@id='product_detail']" position="inside"> | 
				
			|||
            <div class="oe_structure product_design_body d-none"> | 
				
			|||
                <!-- Create the container of the tool --> | 
				
			|||
                <br/> | 
				
			|||
                <div id="tshirt-div"> | 
				
			|||
                    <script src="https://cdnjs.cloudflare.com/ajax/libs/dom-to-image/2.5.2/dom-to-image.min.js"/> | 
				
			|||
                    <img t-att-src="'/web/image/product.template/' + str(product.id) + '/image_1920'" | 
				
			|||
                         class="img-responsive product_customisation_image mx-auto" | 
				
			|||
                         alt=""/> | 
				
			|||
                    <div id="drawingArea" class="drawing-area"> | 
				
			|||
                        <div class="canvas-container"> | 
				
			|||
                            <canvas id="tshirt-canvas" width="350" | 
				
			|||
                                    height="400"/> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
                </div> | 
				
			|||
                <p>To remove a loaded picture, select it and press | 
				
			|||
                    the <kbd>DEL</kbd> key. | 
				
			|||
                </p> | 
				
			|||
                <!-- The select that will allow the user to pick one of the static designs --> | 
				
			|||
                <br/> | 
				
			|||
                <label for="product-design">Design:</label> | 
				
			|||
                <div class="product_design"> | 
				
			|||
                    <select id="product-design"> | 
				
			|||
                        <option value="">Select one of our designs ...</option> | 
				
			|||
                        <option t-foreach="env['product.design'].sudo().search([])" | 
				
			|||
                                t-as="design" | 
				
			|||
                                t-att-value="design.id" t-key="design.id"> | 
				
			|||
                            <t t-esc="design.name"/> | 
				
			|||
                        </option> | 
				
			|||
                    </select> | 
				
			|||
                </div> | 
				
			|||
                <br/> | 
				
			|||
                <br/> | 
				
			|||
                <div> | 
				
			|||
                    <button class="design_save btn-primary">Save</button> | 
				
			|||
                </div> | 
				
			|||
                <br/> | 
				
			|||
            </div> | 
				
			|||
        </xpath> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <!--        Replace the cart images--> | 
				
			|||
    <template id="cart_image" inherit_id="website_sale.cart_lines"> | 
				
			|||
        <xpath expr="//td[@t-if='not line.product_id.product_tmpl_id']" | 
				
			|||
               position="replace"/> | 
				
			|||
        <xpath expr="//td[hasclass('td-img')]" position="replace"> | 
				
			|||
            <td align="center" t-if="line.product_id.product_tmpl_id" | 
				
			|||
                class='td-img'> | 
				
			|||
                <span t-if="line.product_design" | 
				
			|||
                      t-field="line.product_design" | 
				
			|||
                      t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}"/> | 
				
			|||
                <span t-elif="line._is_not_sellable_line() and line.product_id.image_128"> | 
				
			|||
                    <img t-att-src="image_data_uri(line.product_id.image_128)" | 
				
			|||
                         class="img o_image_64_max rounded" | 
				
			|||
                         t-att-alt="line.name_short"/> | 
				
			|||
                </span> | 
				
			|||
                <span t-else="" | 
				
			|||
                      t-field="line.product_id.image_128" | 
				
			|||
                      t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}"/> | 
				
			|||
            </td> | 
				
			|||
            <td colspan="2" t-elif="not line.product_id.product_tmpl_id" | 
				
			|||
                class='td-img'/> | 
				
			|||
        </xpath> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <template id="checkout_image" inherit_id="website_sale.cart_summary"> | 
				
			|||
        <xpath expr="//td[@t-if='not line.product_id.product_tmpl_id']" | 
				
			|||
               position="replace"/> | 
				
			|||
        <xpath expr="//td[hasclass('td-img')]" position="replace"> | 
				
			|||
            <td align="center" t-if="line.product_id.product_tmpl_id" | 
				
			|||
                class='td-img'> | 
				
			|||
                <span t-if="line.product_design" | 
				
			|||
                      t-field="line.product_design" | 
				
			|||
                      t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}"/> | 
				
			|||
                <span t-elif="line._is_not_sellable_line() and line.product_id.image_128"> | 
				
			|||
                    <img t-att-src="image_data_uri(line.product_id.image_128)" | 
				
			|||
                         class="img o_image_64_max rounded" | 
				
			|||
                         t-att-alt="line.name_short"/> | 
				
			|||
                </span> | 
				
			|||
                <span t-else="" | 
				
			|||
                      t-field="line.product_id.image_128" | 
				
			|||
                      t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}"/> | 
				
			|||
            </td> | 
				
			|||
            <td colspan="2" t-elif="not line.product_id.product_tmpl_id" | 
				
			|||
                class='td-img'/> | 
				
			|||
        </xpath> | 
				
			|||
    </template> | 
				
			|||
</odoo> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||