diff --git a/product_warranty_management_odoo/README.rst b/product_warranty_management_odoo/README.rst new file mode 100644 index 000000000..4667e0d38 --- /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 + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developers: (V17) Swaraj R Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. 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..f51d50c18 --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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..9c4de0ca7 --- /dev/null +++ b/product_warranty_management_odoo/__manifest__.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Swaraj R (odoo@cybrosys.com) +# +# 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': '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': ['mail', 'sale_management', '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' + '/product_warranty_management_odoo.css', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': 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..366703d8b --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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..84a9037e4 --- /dev/null +++ b/product_warranty_management_odoo/controllers/portal.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Swaraj R (odoo@cybrosys.com) +# +# 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..42c45f67b --- /dev/null +++ b/product_warranty_management_odoo/controllers/product_warranty_management_odoo.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Swaraj R (odoo@cybrosys.com) +# +# 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') + + @http.route('/partner/sale_order', type='json', auth="public", + website=True) + def get_sale_order_data(self, partner_id): + """Get sale order data of selected customer""" + return request.env['sale.order'].search_read([ + ('partner_id', '=', partner_id)]) + + @http.route('/partner/sale_order_line', type='json', auth="public", + website=True) + def get_sale_order_line_data(self, order_id): + """Get sale order line data of selected order""" + return request.env['sale.order.line'].search_read([ + ('order_id', '=', order_id)]) + + @http.route('/partner/warranty_claim_count', type='json', auth="public", + website=True) + def warranty_claim_count(self, sale_order_id): + """Get claim count of selected sale order""" + return request.env['warranty.claim'].search_count([ + ('sale_order_id', '=', sale_order_id) + ]) + + @http.route('/read/sale_order', type='json', auth="public", + website=True) + def read_sale_order(self, order_id): + """Read sale order data""" + return request.env['sale.order'].search([('id', '=', order_id), + ( + 'is_warranty_check', '=', True) + ]).read() + + @http.route('/check/selected_product', type='json', auth="public", + website=True) + def check_selected_product(self, product_id): + """Check weather the selected product is a warranty product""" + return request.env['product.product'].search([ + ('id', '=', product_id), + ('is_warranty_available', '=', True) + ]).read() + + @http.route('/create_warranty_claim', type='json', auth="public", + website=True) + def create_warranty_claim(self, sale_order_id, customer_id, product_id): + """create a warranty claim for the selected user""" + request.env['warranty.claim'].create({ + 'customer_id': customer_id, + 'product_id': product_id, + 'sale_order_id': sale_order_id, + }) 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..4622710c9 --- /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..57d275666 --- /dev/null +++ b/product_warranty_management_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 16.08.2024 +#### Version 17.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..8296717d3 --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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..de9113139 --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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..9bdcc99a0 --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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..dc87bac8f --- /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: Swaraj R (odoo@cybrosys.com) +# +# 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/phone.svg b/product_warranty_management_odoo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/product_warranty_management_odoo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + 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 (1) 1.svg b/product_warranty_management_odoo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/product_warranty_management_odoo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_warranty_management_odoo/static/description/assets/misc/support-email.svg b/product_warranty_management_odoo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/product_warranty_management_odoo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + 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 1.svg b/product_warranty_management_odoo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/product_warranty_management_odoo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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.gif b/product_warranty_management_odoo/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/1.gif 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..d0f36b007 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..8513873ea 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..cb17cf612 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.jpg b/product_warranty_management_odoo/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/4.jpg differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/5.jpg b/product_warranty_management_odoo/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/5.jpg 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..0e311ca87 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/modules/l2.png b/product_warranty_management_odoo/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/l2.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/l3.png b/product_warranty_management_odoo/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/l3.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/l4.png b/product_warranty_management_odoo/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/l4.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/l5.png b/product_warranty_management_odoo/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/l5.png differ diff --git a/product_warranty_management_odoo/static/description/assets/modules/l6.png b/product_warranty_management_odoo/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/modules/l6.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..cb47b814c 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..a11503138 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..8319650d6 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..352bb3f78 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..57ea5d23a 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..ab4fd94b0 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..5c7b95940 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/6.png b/product_warranty_management_odoo/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..4b2ff3f58 Binary files /dev/null and b/product_warranty_management_odoo/static/description/assets/screenshots/6.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..0e81c97e2 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..59029f774 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..dc4215acb 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..95a14e892 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.jpg b/product_warranty_management_odoo/static/description/banner.jpg new file mode 100644 index 000000000..d06408b36 Binary files /dev/null and b/product_warranty_management_odoo/static/description/banner.jpg 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..584fcb643 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..b5af1b45e --- /dev/null +++ b/product_warranty_management_odoo/static/description/index.html @@ -0,0 +1,818 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Warranty Management

+

+ Warranty management used to manage warranty of product. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Users can Easily submit the warranty claims

+

Use the new + User can easily submit the Warranty Claim through website. +

+
+
+
+
+
+
+ +
+
+

+ Warranty claim requests can be seen by admin

+

View and + Warranty claim requests can be seen and approve admin. +

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

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

+
+
+
+
+
+
+ +
+
+

+ Notification

+

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

+
+
+
+
+
+
+ +
+
+

+ Website view of warranty claim.

+
+
+
+
+
+
+
    +
  • + Dedicated Website Views for Users. +
  • +
  • + Users can Easily submit the warranty claims. +
  • +
  • + Available in Odoo 17.0 Community and Enterprise.. +
  • +
  • + Warranty Menu in Website. +
  • +
  • + Warranty claim requests can be seen by admin. +
  • +
  • + Automatic calculation of warranty expiry. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:29th July 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/product_warranty_management_odoo/static/src/css/product_warranty_management_odoo.css b/product_warranty_management_odoo/static/src/css/product_warranty_management_odoo.css new file mode 100644 index 000000000..00f905a1f --- /dev/null +++ b/product_warranty_management_odoo/static/src/css/product_warranty_management_odoo.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..e6fa92b44 --- /dev/null +++ b/product_warranty_management_odoo/static/src/js/website_registration.js @@ -0,0 +1,123 @@ +/**@odoo-module*/ +import publicWidget from "@web/legacy/js/public/public_widget"; + +publicWidget.registry.WarrantyClaim = publicWidget.Widget.extend({ +//init function to bind rpc +init(){ + this.rpc = this.bindService("rpc"); +}, + selector: '.container', + events: { + 'click #customer_id': '_onClickCustomer', + 'change #customer_id': '_onClickCustomer', + 'click #sale_order_id': '_onClickSaleOrder', + 'change #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) { + this.rpc('/partner/sale_order', { + 'partner_id': parseInt(selectedCustomerId) + }).then(function (result) { + if (result.length > 0) { + $saleOrderDropdown.prop('disabled', false); + $.each(result, function (i, saleOrder) { + $saleOrderDropdown.append($('').prop('disabled', true); + var self = this + if (selectedSaleOrderId) { + this.rpc('/partner/sale_order_line', { + 'order_id': parseInt(selectedSaleOrderId) + }).then(function (result) { + var $productDropdown = self.$('#products_id'); + $productDropdown.prop('disabled', false); + $productDropdown.empty(); + $.each(result, function (i, saleOrderLine) { + $productDropdown.append($('