diff --git a/product_warranty_management_odoo/README.rst b/product_warranty_management_odoo/README.rst new file mode 100644 index 000000000..e9ad272bb --- /dev/null +++ b/product_warranty_management_odoo/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Warranty Management +=================== +Warranty management used to manage warranty of product + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V16) Subina P Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/product_warranty_management_odoo/__init__.py b/product_warranty_management_odoo/__init__.py new file mode 100644 index 000000000..50349d36a --- /dev/null +++ b/product_warranty_management_odoo/__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/product_warranty_management_odoo/__manifest__.py b/product_warranty_management_odoo/__manifest__.py new file mode 100644 index 000000000..6d2075a04 --- /dev/null +++ b/product_warranty_management_odoo/__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': 'Warranty Management', + 'version': '16.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': ['mail', 'sale', 'website'], + 'data': [ + 'data/website_warranty_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': [ + 'product_warranty_management_odoo/static/src/js/website_registration.js', + 'product_warranty_management_odoo/static/src/css/warranty.css', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/product_warranty_management_odoo/controllers/__init__.py b/product_warranty_management_odoo/controllers/__init__.py new file mode 100644 index 000000000..a24f90e85 --- /dev/null +++ b/product_warranty_management_odoo/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 product_warranty_management_odoo diff --git a/product_warranty_management_odoo/controllers/portal.py b/product_warranty_management_odoo/controllers/portal.py new file mode 100644 index 000000000..e0e96578d --- /dev/null +++ b/product_warranty_management_odoo/controllers/portal.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +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 = [] + for claim in claims: + claim_data.append({ + 'customer_id': claim.customer_id.name, + 'product_id': claim.product_id.name, + 'sale_order_id': claim.sale_order_id.name, + 'status': claim.state, + }) + # Pass the claim_data to the template + return http.request.render('product_warranty_management_odoo.portal_warranty_claims', + {'claim_data': claim_data}) diff --git a/product_warranty_management_odoo/controllers/product_warranty_management_odoo.py b/product_warranty_management_odoo/controllers/product_warranty_management_odoo.py new file mode 100644 index 000000000..676b816a3 --- /dev/null +++ b/product_warranty_management_odoo/controllers/product_warranty_management_odoo.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('product_warranty_management_odoo.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('product_warranty_management_odoo.claim_thanks_view') diff --git a/product_warranty_management_odoo/data/website_warranty_menu_data.xml b/product_warranty_management_odoo/data/website_warranty_menu_data.xml new file mode 100644 index 000000000..9c9811ba7 --- /dev/null +++ b/product_warranty_management_odoo/data/website_warranty_menu_data.xml @@ -0,0 +1,13 @@ + + + + + + Warranty + /warranty + + 50 + + + diff --git a/product_warranty_management_odoo/doc/RELEASE_NOTES.md b/product_warranty_management_odoo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e291c328b --- /dev/null +++ b/product_warranty_management_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.05.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for Warranty Management diff --git a/product_warranty_management_odoo/models/__init__.py b/product_warranty_management_odoo/models/__init__.py new file mode 100644 index 000000000..5b60225ee --- /dev/null +++ b/product_warranty_management_odoo/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/product_warranty_management_odoo/models/product_template.py b/product_warranty_management_odoo/models/product_template.py new file mode 100644 index 000000000..6261c2720 --- /dev/null +++ b/product_warranty_management_odoo/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/product_warranty_management_odoo/models/sale_order.py b/product_warranty_management_odoo/models/sale_order.py new file mode 100644 index 000000000..d868bcee2 --- /dev/null +++ b/product_warranty_management_odoo/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('product_warranty_management_odoo.' + 'product_template_view_tree').id, 'tree'), + (self.env.ref('product_warranty_management_odoo.' + 'product_template_view_form').id, 'form')], + 'domain': domain + } diff --git a/product_warranty_management_odoo/models/warranty_claim.py b/product_warranty_management_odoo/models/warranty_claim.py new file mode 100644 index 000000000..d8c9178b3 --- /dev/null +++ b/product_warranty_management_odoo/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/product_warranty_management_odoo/security/ir.model.access.csv b/product_warranty_management_odoo/security/ir.model.access.csv new file mode 100644 index 000000000..f252a2a50 --- /dev/null +++ b/product_warranty_management_odoo/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,access.warranty.claim,model_warranty_claim,base.group_user,1,1,1,1 diff --git a/product_warranty_management_odoo/static/description/assets/icons/check.png b/product_warranty_management_odoo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/check.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/chevron.png b/product_warranty_management_odoo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/chevron.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/cogs.png b/product_warranty_management_odoo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/cogs.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/consultation.png b/product_warranty_management_odoo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/consultation.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/ecom-black.png b/product_warranty_management_odoo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/education-black.png b/product_warranty_management_odoo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/education-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/hotel-black.png b/product_warranty_management_odoo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/license.png b/product_warranty_management_odoo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/license.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/lifebuoy.png b/product_warranty_management_odoo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/manufacturing-black.png b/product_warranty_management_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/pos-black.png b/product_warranty_management_odoo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/pos-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/puzzle.png b/product_warranty_management_odoo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/puzzle.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/restaurant-black.png b/product_warranty_management_odoo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/service-black.png b/product_warranty_management_odoo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/service-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/trading-black.png b/product_warranty_management_odoo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/trading-black.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/training.png b/product_warranty_management_odoo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/training.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/update.png b/product_warranty_management_odoo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/update.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/user.png b/product_warranty_management_odoo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/user.png differ diff --git a/product_warranty_management_odoo/static/description/assets/icons/wrench.png b/product_warranty_management_odoo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/icons/wrench.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/categories.png b/product_warranty_management_odoo/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/categories.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/check-box.png b/product_warranty_management_odoo/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/check-box.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/compass.png b/product_warranty_management_odoo/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/compass.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/corporate.png b/product_warranty_management_odoo/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/corporate.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/customer-support.png b/product_warranty_management_odoo/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/customer-support.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/cybrosys-logo.png b/product_warranty_management_odoo/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/cybrosys-logo.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/features.png b/product_warranty_management_odoo/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/features.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/logo.png b/product_warranty_management_odoo/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/logo.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/pictures.png b/product_warranty_management_odoo/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/pictures.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/pie-chart.png b/product_warranty_management_odoo/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/pie-chart.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/right-arrow.png b/product_warranty_management_odoo/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/right-arrow.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/star.png b/product_warranty_management_odoo/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/star.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/support.png b/product_warranty_management_odoo/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/support.png differ diff --git a/product_warranty_management_odoo/static/description/assets/misc/whatsapp.png b/product_warranty_management_odoo/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/misc/whatsapp.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/1.png b/product_warranty_management_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/1.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/2.png b/product_warranty_management_odoo/static/description/assets/modules/2.png new file mode 100644 index 000000000..4a9e2bd5d Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/2.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/3.png b/product_warranty_management_odoo/static/description/assets/modules/3.png new file mode 100644 index 000000000..55fb7ba18 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/3.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/4.png b/product_warranty_management_odoo/static/description/assets/modules/4.png new file mode 100644 index 000000000..359d3e4d6 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/4.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/5.png b/product_warranty_management_odoo/static/description/assets/modules/5.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/5.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/6.png b/product_warranty_management_odoo/static/description/assets/modules/6.png new file mode 100644 index 000000000..4da02a3d2 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/6.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/0.png b/product_warranty_management_odoo/static/description/assets/screenshots/0.png new file mode 100644 index 000000000..979819d8a Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/0.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/1.png b/product_warranty_management_odoo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..f782ac06f Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/1.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/10.png b/product_warranty_management_odoo/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..7a05cda6d Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/10.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/11.png b/product_warranty_management_odoo/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..202b14871 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/11.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/2.png b/product_warranty_management_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..4bc2c1bd1 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/2.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/3.png b/product_warranty_management_odoo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..3b2535c5a Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/3.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/4.png b/product_warranty_management_odoo/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..00eb89dfd Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/4.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/5.png b/product_warranty_management_odoo/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..51c5f6335 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/5.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/7.png b/product_warranty_management_odoo/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..97b1bdc7c Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/7.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/8.png b/product_warranty_management_odoo/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..84048eed7 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/8.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/9.png b/product_warranty_management_odoo/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..4243f6be1 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/9.png differ diff --git a/product_warranty_management_odoo/static/description/assets/screenshots/hero.gif b/product_warranty_management_odoo/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9c7d51d79 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/hero.gif differ diff --git a/product_warranty_management_odoo/static/description/banner.png b/product_warranty_management_odoo/static/description/banner.png new file mode 100644 index 000000000..d71f19ff8 Binary files /dev/null and b/product_warranty_management_odoo/static/description/banner.png differ diff --git a/product_warranty_management_odoo/static/description/icon.png b/product_warranty_management_odoo/static/description/icon.png new file mode 100644 index 000000000..6942e9503 Binary files /dev/null and b/product_warranty_management_odoo/static/description/icon.png differ diff --git a/product_warranty_management_odoo/static/description/index.html b/product_warranty_management_odoo/static/description/index.html new file mode 100644 index 000000000..911292ad1 --- /dev/null +++ b/product_warranty_management_odoo/static/description/index.html @@ -0,0 +1,718 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Warranty Management

+

+ Detailed + Warranty Management View.

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

+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module manages product warranty policies & warranty claims and + allows users to declare warranty policies applicable to each product. +
+ Furthermore, Warranty policies can be applied by the warranty period. + Allow users to manage the process of warranty claims +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Dedicated Website + Views + for Users. +
+
+ + Users can Easily submit the warranty claims +
+
+ + + Available in Odoo 16.0 Community and Enterprise. +
+
+ + Warranty Menu in Website. +
+
+ + Warranty claim requests can be seen by admin +
+
+
+ +
+ + Automatic calculation of warranty expiry +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +

+ 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 +

+

+ customer can submit their warranty claims through the + website

+ +

+ After Successful submission this page will be shown:

+ + + +
+ +
+

+ Warranty claim request will be created on backend +

+ + +
+ +
+

+ Warranty claim request will be shown like this: +

+ +
+ +
+

+ Admin can Approve or Reject the request . +

+ +
+ +
+

+ Status of the warranty claim can be seen on the portal menu as + "My Claims" +

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

Related Modules

+

Explore our related modules

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

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/product_warranty_management_odoo/static/src/css/warranty.css b/product_warranty_management_odoo/static/src/css/warranty.css new file mode 100644 index 000000000..00f905a1f --- /dev/null +++ b/product_warranty_management_odoo/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/product_warranty_management_odoo/static/src/js/website_registration.js b/product_warranty_management_odoo/static/src/js/website_registration.js new file mode 100644 index 000000000..0cb7df83a --- /dev/null +++ b/product_warranty_management_odoo/static/src/js/website_registration.js @@ -0,0 +1,133 @@ +/**@odoo-module*/ +var publicWidget = require('web.public.widget'); +import rpc from 'web.rpc'; +publicWidget.registry.WarrantyClaim = publicWidget.Widget.extend({ + selector: '.container', + events: { + 'click #customer_id': '_onClickCustomer', + 'click #sale_order_id': '_onClickSaleOrder', + 'submit #form_submit': '_onSubmit' + }, + _onClickCustomer: function (ev) { + // To show the sale order of the selected customer only + ev.preventDefault(); + var selectedCustomerId = this.$('#customer_id').val(); + var $saleOrderDropdown = this.$('#sale_order_id'); + var $productDropdown = this.$('#products_id'); + $saleOrderDropdown.empty().append('').prop('disabled', true); + $productDropdown.empty().append('').prop('disabled', true); + if (selectedCustomerId) { + rpc.query({ + model: 'sale.order', + method: 'search_read', + args: [ + [['partner_id', '=', parseInt(selectedCustomerId)]], // Apply domain condition + ['name'], + ], + }).then(function (result) { + if (result.length > 0) { + $saleOrderDropdown.prop('disabled', false); + $.each(result, function (i, saleOrder) { + $saleOrderDropdown.append($('').prop('disabled', true); + if (selectedSaleOrderId) { + rpc.query({ + model: 'sale.order.line', + method: 'search_read', + args: [ + [['order_id', '=', parseInt(selectedSaleOrderId)]], + ['product_id'], + ], + }).then(function (result) { + var $productDropdown = $('#products_id'); + $productDropdown.prop('disabled', false); + $productDropdown.empty(); + $.each(result, function (i, saleOrderLine) { + $productDropdown.append($('