diff --git a/website_warranty_management/README.rst b/website_warranty_management/README.rst new file mode 100644 index 000000000..d81ec0ca8 --- /dev/null +++ b/website_warranty_management/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Warranty Management +=================== +Warranty management used to manage warranty of product + +Configuration +============= +- Additional configuration not required + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: + (V16) Subina P, + (V17) Dhanya + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/website_warranty_management/__init__.py b/website_warranty_management/__init__.py new file mode 100644 index 000000000..50349d36a --- /dev/null +++ b/website_warranty_management/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers +from . import models diff --git a/website_warranty_management/__manifest__.py b/website_warranty_management/__manifest__.py new file mode 100644 index 000000000..704bd3456 --- /dev/null +++ b/website_warranty_management/__manifest__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Website Warranty Management', + 'version': '17.0.1.0.0', + 'category': 'Sale', + 'summary': 'Warranty management used to manage warranty of product', + 'description': """The "Warranty Management" module enables businesses to + efficiently track product warranties, including expiration dates and + associated customer details. Seamlessly integrated with sales processes, + it facilitates easy warranty claim creation from sales orders and enhances + customer experience with website warranty registration.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['sale_management', 'website'], + 'data': [ + 'data/website_menu_data.xml', + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + 'views/sale_order_views.xml', + 'views/website_registration_templates.xml', + 'views/warranty_claim_views.xml', + 'views/portal_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'website_warranty_management/static/src/js/website_registration.js', + 'website_warranty_management/static/src/css/warranty.css', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/website_warranty_management/controllers/__init__.py b/website_warranty_management/controllers/__init__.py new file mode 100644 index 000000000..6848254e4 --- /dev/null +++ b/website_warranty_management/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import portal +from . import website_warranty_management diff --git a/website_warranty_management/controllers/portal.py b/website_warranty_management/controllers/portal.py new file mode 100644 index 000000000..19fd69506 --- /dev/null +++ b/website_warranty_management/controllers/portal.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.addons.portal.controllers.portal import CustomerPortal +from odoo.http import request + + +class PortalAccount(CustomerPortal): + """Inherited class to add portal menu for warranty claims""" + + def _prepare_home_portal_values(self, counters): + """ Super the function to add the warranty claim menu""" + values = super()._prepare_home_portal_values(counters) + user = request.env.user.partner_id.id + claim_count = (request.env['warranty.claim']. + search_count([('customer_id', '=', user)])) + values['claim_count'] = claim_count + return values + + @http.route('/my/claims', type='http', auth="user", website=True) + def my_claims(self): + """ Define the action to open the warranty claim tree view""" + user = request.env.user.partner_id.id + claims = (request.env['warranty.claim'].sudo(). + search([('customer_id', '=', user)])) + # Extract the required fields and store them in a list of dictionaries + claim_data = [{ + 'customer_id': claim.customer_id.name, + 'product_id': claim.product_id.name, + 'sale_order_id': claim.sale_order_id.name, + 'status': claim.state, + } for claim in claims] + # Pass the claim_data to the template + return http.request.render('website_warranty_management.portal_warranty_claims', + {'claim_data': claim_data}) diff --git a/website_warranty_management/controllers/website_warranty_management.py b/website_warranty_management/controllers/website_warranty_management.py new file mode 100644 index 000000000..8962f4dc7 --- /dev/null +++ b/website_warranty_management/controllers/website_warranty_management.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request + + +class WarrantyClaimController(http.Controller): + """ Class for Warranty claim controller""" + + @http.route('/warranty', type='http', auth="public", website=True) + def warranty_claim(self): + """ Function to pass the warranty claim details to the warranty + claim page""" + customers = request.env['res.partner'].sudo().search([]) + sale_orders = request.env['sale.order'].sudo().search([]) + products = request.env['product.template'].sudo().search([]) + return request.render('website_warranty_management.warranty_claim_page', + {'sale_orders': sale_orders, + 'customers': customers, + 'products': products}) + + @http.route('/warranty/claim/submit', type='http', auth="public", + website=True) + def warranty_claim_submit(self): + """Function to render the claim thanks view""" + return request.render('website_warranty_management.claim_thanks_view') diff --git a/website_warranty_management/data/website_menu_data.xml b/website_warranty_management/data/website_menu_data.xml new file mode 100644 index 000000000..9c9811ba7 --- /dev/null +++ b/website_warranty_management/data/website_menu_data.xml @@ -0,0 +1,13 @@ + + + + + + Warranty + /warranty + + 50 + + + diff --git a/website_warranty_management/doc/RELEASE_NOTES.md b/website_warranty_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..864f364e4 --- /dev/null +++ b/website_warranty_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 07.03.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Warranty Management diff --git a/website_warranty_management/models/__init__.py b/website_warranty_management/models/__init__.py new file mode 100644 index 000000000..5b60225ee --- /dev/null +++ b/website_warranty_management/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import product_template +from . import sale_order +from . import warranty_claim diff --git a/website_warranty_management/models/product_template.py b/website_warranty_management/models/product_template.py new file mode 100644 index 000000000..6261c2720 --- /dev/null +++ b/website_warranty_management/models/product_template.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """Inherited product template to add fields""" + _inherit = 'product.template' + + is_warranty_available = fields.Boolean(string="Warranty Available", + help="Boolean field to check" + "the warranty availability") + warranty_duration = fields.Integer(string="Warranty Duration (months)", + help="Warranty duration") + warranty_expiry = fields.Date(string="Warranty Expiry Date", + help="Warranty expiry date") diff --git a/website_warranty_management/models/sale_order.py b/website_warranty_management/models/sale_order.py new file mode 100644 index 000000000..5ed7f6121 --- /dev/null +++ b/website_warranty_management/models/sale_order.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from dateutil.relativedelta import relativedelta +from odoo import fields, models + + +class SaleOrder(models.Model): + """Inherited sale order to super functions to add additional + functionalities""" + _inherit = 'sale.order' + + is_warranty_check = fields.Boolean(string='Warranty Check', + help='Check this box if the item has' + ' warranty.') + + def action_confirm(self): + """Call the super method to perform the default confirmation + behavior""" + super(SaleOrder, self).action_confirm() + # Loop through the order lines and check warranty for each product + for order in self: + for line in order.order_line: + product = line.product_id + if product.is_warranty_available: + self.is_warranty_check = True + else: + self.is_warranty_check = False + if (self.order_line. + filtered(lambda x: x.product_id.is_warranty_available)): + self.is_warranty_check = True + else: + self.is_warranty_check = False + + def action_open_smart_tab(self): + """ To open warranty smart tab""" + domain = [ + ('id', 'in', + self.order_line.mapped('product_id.product_tmpl_id.id')), + ('is_warranty_available', '=', True), + ] + products_with_warranty = self.env['product.template'].search(domain) + for product in products_with_warranty: + # Calculate the warranty expiry date based on the sale order date + warranty_expiry_date = self.date_order + relativedelta( + months=product.warranty_duration) + product.write({'warranty_expiry': warranty_expiry_date}) + return { + 'type': 'ir.actions.act_window', + 'name': 'Warranty Details', + 'view_mode': 'tree,form', + 'res_model': 'product.template', + 'views': [(self.env.ref('website_warranty_management.' + 'product_template_view_tree').id, 'tree'), + (self.env.ref('website_warranty_management.' + 'product_template_view_form').id, 'form')], + 'domain': domain + } diff --git a/website_warranty_management/models/warranty_claim.py b/website_warranty_management/models/warranty_claim.py new file mode 100644 index 000000000..d8c9178b3 --- /dev/null +++ b/website_warranty_management/models/warranty_claim.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class WarrantyClaim(models.Model): + """ Warranty claim class to add fields for warranty claim""" + _name = 'warranty.claim' + _rec_name = "sale_order_id" + _description = 'Warranty Claim' + + customer_id = fields.Many2one('res.partner', + string='Customer Name', + help="Customer selection", + required=True) + sale_order_id = fields.Many2one('sale.order', + help="To select the sale order", + string='Sale Order') + product_id = fields.Many2one('product.product', + string='Product', + help="To select the product", + required=True) + partner_id = fields.Many2one('res.users', string='User', + help="To select the partner", + default=lambda self: self.env.user) + state = fields.Selection( + [('draft', 'Draft'), ('approved', 'Approved'), + ('rejected', 'Rejected')], default='draft', String="Status", + help="To select the state") + product_expiry_date = fields.Date( + string='Product Expiry Date', help="To get the product expiry date", + related='product_id.product_tmpl_id.warranty_expiry', + store=True, readonly=True) + + def change_status_approved(self): + """ Function to change the status of the claim to approved""" + self.state = 'approved' + + def change_status_rejected(self): + """ Function to change the status of the claim to rejected""" + self.state = 'rejected' diff --git a/website_warranty_management/security/ir.model.access.csv b/website_warranty_management/security/ir.model.access.csv new file mode 100644 index 000000000..0a3bceb1b --- /dev/null +++ b/website_warranty_management/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_warranty_claim_user,access.warranty.claim.user,model_warranty_claim,base.group_user,1,1,1,1 diff --git a/website_warranty_management/static/description/assets/icons/capture (1).png b/website_warranty_management/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/capture (1).png differ diff --git a/website_warranty_management/static/description/assets/icons/check.png b/website_warranty_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/check.png differ diff --git a/website_warranty_management/static/description/assets/icons/chevron.png b/website_warranty_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/chevron.png differ diff --git a/website_warranty_management/static/description/assets/icons/cogs.png b/website_warranty_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/cogs.png differ diff --git a/website_warranty_management/static/description/assets/icons/consultation.png b/website_warranty_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/consultation.png differ diff --git a/website_warranty_management/static/description/assets/icons/ecom-black.png b/website_warranty_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/ecom-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/education-black.png b/website_warranty_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/education-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/hotel-black.png b/website_warranty_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/hotel-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/img.png b/website_warranty_management/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/img.png differ diff --git a/website_warranty_management/static/description/assets/icons/license.png b/website_warranty_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/license.png differ diff --git a/website_warranty_management/static/description/assets/icons/lifebuoy.png b/website_warranty_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/lifebuoy.png differ diff --git a/website_warranty_management/static/description/assets/icons/manufacturing-black.png b/website_warranty_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/photo-capture.png b/website_warranty_management/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/photo-capture.png differ diff --git a/website_warranty_management/static/description/assets/icons/pos-black.png b/website_warranty_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/pos-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/puzzle.png b/website_warranty_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/puzzle.png differ diff --git a/website_warranty_management/static/description/assets/icons/restaurant-black.png b/website_warranty_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/restaurant-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/service-black.png b/website_warranty_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/service-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/trading-black.png b/website_warranty_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/trading-black.png differ diff --git a/website_warranty_management/static/description/assets/icons/training.png b/website_warranty_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/training.png differ diff --git a/website_warranty_management/static/description/assets/icons/update.png b/website_warranty_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/update.png differ diff --git a/website_warranty_management/static/description/assets/icons/user.png b/website_warranty_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/user.png differ diff --git a/website_warranty_management/static/description/assets/icons/wrench.png b/website_warranty_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_warranty_management/static/description/assets/icons/wrench.png differ diff --git a/website_warranty_management/static/description/assets/misc/Cybrosys R.png b/website_warranty_management/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/website_warranty_management/static/description/assets/misc/Cybrosys R.png differ diff --git a/website_warranty_management/static/description/assets/misc/email.svg b/website_warranty_management/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/phone.svg b/website_warranty_management/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/website_warranty_management/static/description/assets/misc/star (1) 2.svg b/website_warranty_management/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/support (1) 1.svg b/website_warranty_management/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/support-email.svg b/website_warranty_management/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/tick-mark.svg b/website_warranty_management/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/whatsapp 1.svg b/website_warranty_management/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/misc/whatsapp.svg b/website_warranty_management/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/website_warranty_management/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website_warranty_management/static/description/assets/modules/m1.png b/website_warranty_management/static/description/assets/modules/m1.png new file mode 100644 index 000000000..acb4c76c6 Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m1.png differ diff --git a/website_warranty_management/static/description/assets/modules/m2.png b/website_warranty_management/static/description/assets/modules/m2.png new file mode 100644 index 000000000..3ef91f771 Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m2.png differ diff --git a/website_warranty_management/static/description/assets/modules/m3.png b/website_warranty_management/static/description/assets/modules/m3.png new file mode 100644 index 000000000..72febf6ae Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m3.png differ diff --git a/website_warranty_management/static/description/assets/modules/m4.png b/website_warranty_management/static/description/assets/modules/m4.png new file mode 100644 index 000000000..f7d7f9241 Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m4.png differ diff --git a/website_warranty_management/static/description/assets/modules/m5.png b/website_warranty_management/static/description/assets/modules/m5.png new file mode 100644 index 000000000..1d3324e88 Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m5.png differ diff --git a/website_warranty_management/static/description/assets/modules/m6.png b/website_warranty_management/static/description/assets/modules/m6.png new file mode 100644 index 000000000..80938c15a Binary files /dev/null and b/website_warranty_management/static/description/assets/modules/m6.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/6.png b/website_warranty_management/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..fc0ccd822 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/6.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/aaa.png b/website_warranty_management/static/description/assets/screenshots/aaa.png new file mode 100644 index 000000000..c1fec9886 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/aaa.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/hero.gif b/website_warranty_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..2d02e5d92 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/hero.gif differ diff --git a/website_warranty_management/static/description/assets/screenshots/request-listview.png b/website_warranty_management/static/description/assets/screenshots/request-listview.png new file mode 100644 index 000000000..3531f8cbe Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/request-listview.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-form.png b/website_warranty_management/static/description/assets/screenshots/warranty-form.png new file mode 100644 index 000000000..df09a463f Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-form.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-in-product.png b/website_warranty_management/static/description/assets/screenshots/warranty-in-product.png new file mode 100644 index 000000000..075b40655 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-in-product.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-in-sale.png b/website_warranty_management/static/description/assets/screenshots/warranty-in-sale.png new file mode 100644 index 000000000..dd43b52eb Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-in-sale.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-menu.png b/website_warranty_management/static/description/assets/screenshots/warranty-menu.png new file mode 100644 index 000000000..c6344bd63 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-menu.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-product-in-sale.png b/website_warranty_management/static/description/assets/screenshots/warranty-product-in-sale.png new file mode 100644 index 000000000..091d7bcc1 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-product-in-sale.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-request-approve.png b/website_warranty_management/static/description/assets/screenshots/warranty-request-approve.png new file mode 100644 index 000000000..3adda4338 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-request-approve.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-formview.png b/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-formview.png new file mode 100644 index 000000000..67bd3211f Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-formview.png differ diff --git a/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-listview.png b/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-listview.png new file mode 100644 index 000000000..a78d65d05 Binary files /dev/null and b/website_warranty_management/static/description/assets/screenshots/warranty-smartbutton-listview.png differ diff --git a/website_warranty_management/static/description/banner.jpg b/website_warranty_management/static/description/banner.jpg new file mode 100644 index 000000000..e09af65c2 Binary files /dev/null and b/website_warranty_management/static/description/banner.jpg differ diff --git a/website_warranty_management/static/description/icon.png b/website_warranty_management/static/description/icon.png new file mode 100644 index 000000000..072fca30e Binary files /dev/null and b/website_warranty_management/static/description/icon.png differ diff --git a/website_warranty_management/static/description/index.html b/website_warranty_management/static/description/index.html new file mode 100644 index 000000000..617e62548 --- /dev/null +++ b/website_warranty_management/static/description/index.html @@ -0,0 +1,801 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Warranty Management

+

+ Detailed Warranty Management View. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Dedicated Website Views for Users.

+
+
+
+
+
+
+ +
+
+

+ Users can Easily submit the warranty + claims

+
+
+
+
+
+
+ +
+

+ Warranty Menu in Website.

+
+
+
+
+
+
+ +
+
+

+ Warranty claim requests can be seen by + admin +

+
+
+
+
+
+
+ +
+
+

+ Automatic calculation of warranty expiry +

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

+ In the product form a warranty page is + added, if the product has warranty + available,then can be added the duration in + the field

+
+
+
+
+
+
+ +
+
+

+ If we add the warranty enabled product in a + sale order line then a warranty smart + button will be shown on confirmation.

+
+
+
+
+
+
+ +
+
+

+ Warranty details on clicking the smart + tab.

+
+
+
+
+
+
+ +
+
+

+ Warranty detail form view,The expiry date is + automatically calculated.

+
+
+
+
+
+
+ +
+
+

+ Warranty menu in website.

+
+
+
+
+
+
+ +
+
+

+ Warranty menu in website.

+
+
+
+
+
+
+ +
+
+

+ After Successful submission this page will + be shown: + +

+
+
+
+
+
+
+
    +
  • + Community & + Enterprise Support +
  • +
  • + Manages product + warranty policies & warranty claims. +
  • +
  • + Allows users to + declare warranty policies applicable to each + product. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on: 7 March 2024 +
+

+ + Initial Commit for Warranty Management.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

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

Odoo + Customization

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

Odoo + Implementation

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

Odoo + Support

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

Hire + Odoo Developer

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

Odoo + Integration

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

Odoo + Migration

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

Odoo + Consultancy

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

Odoo + Implementation

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

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/website_warranty_management/static/src/css/warranty.css b/website_warranty_management/static/src/css/warranty.css new file mode 100644 index 000000000..00f905a1f --- /dev/null +++ b/website_warranty_management/static/src/css/warranty.css @@ -0,0 +1,42 @@ +/* Style the labels */ +.error-message{ +color:red; +font:20px; +} +/* Style the labels */ +.o_form_label { + width: 300px; /* Adjust label width as needed */ + text-align: left; + display: inline-block; + /* Add spacing between label and input */ +} + +/* Style the input elements */ +.o_row .o_form_input { + display: inline-block; + width:600px; + /* Add spacing between input and next label */ +} + +/* Style the form buttons */ +.button { + background-color: #007bff; + color: #fff; + border: none; + padding: 10px 20px; + cursor: pointer; + border-radius: 5px; +} + +/* Style the button on hover */ +.button:hover { + background-color: #0056b3; +} + +/* Style the select dropdowns */ +select { + width: 100%; + padding: 5px; + border: 1px solid #ccc; + border-radius: 3px; +} diff --git a/website_warranty_management/static/src/js/website_registration.js b/website_warranty_management/static/src/js/website_registration.js new file mode 100644 index 000000000..17141aef8 --- /dev/null +++ b/website_warranty_management/static/src/js/website_registration.js @@ -0,0 +1,92 @@ +/** @odoo-module **/ + +import publicWidget from "@web/legacy/js/public/public_widget"; + +publicWidget.registry.WarrantyClaim = publicWidget.Widget.extend({ + selector: '.container', + events: { + 'click #customer_id': '_onClickCustomer', + 'click #sale_order_id': '_onClickSaleOrder', + 'submit #form_submit': '_onSubmit' + }, + init() { + this._super(...arguments); + this.orm = this.bindService("orm"); + }, + async _onClickCustomer(ev) { + ev.preventDefault(); + var selectedCustomerId = this.$('#customer_id').val(); + if (selectedCustomerId) { + var NameId = parseInt(selectedCustomerId); + await this.orm.call("sale.order", "search_read", [[['partner_id', '=', parseInt(selectedCustomerId)]]]).then(function (result) { + var $saleOrderDropdown = $('#sale_order_id'); + $saleOrderDropdown.empty(); + $.each(result, function (i, saleOrder) { + $saleOrderDropdown.append($('