diff --git a/franchise_management/README.rst b/franchise_management/README.rst new file mode 100644 index 000000000..b648b716d --- /dev/null +++ b/franchise_management/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Franchise Management +==================== +This module helps to manage franchise in odoo. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V16) Jumana Jabin MK, 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/franchise_management/__init__.py b/franchise_management/__init__.py new file mode 100644 index 000000000..9b1a360b8 --- /dev/null +++ b/franchise_management/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers +from . import models +from . import wizard diff --git a/franchise_management/__manifest__.py b/franchise_management/__manifest__.py new file mode 100644 index 000000000..ce8a701a1 --- /dev/null +++ b/franchise_management/__manifest__.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Franchise Management', + 'version': '16.0.1.0.0', + 'category': 'Marketing', + 'summary': 'This Module will help to manage franchisees and dealers.', + 'description': """This module helps to manage the franchise in odoo. + A franchise is a type of license that grants a franchisee access,thus + allowing the franchisee to sell a product or service under the + franchises business name.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['product', 'website_sale', 'contacts'], + 'data': [ + 'security/franchise_management_security.xml', + 'security/ir.model.access.csv', + 'report/franchise_dealership_contract_templates.xml', + 'report/franchise_management_report.xml', + 'report/franchise_report_templates.xml', + 'report/dealer_based_templates.xml', + 'report/dealer_sale_report_templates.xml', + 'report/dealer_sale_based_templates.xml', + 'report/agreement_based_templates.xml', + 'report/dealer_sale_on_agreement_templates.xml', + 'data/ir_sequence_data.xml', + 'data/contract_email_data.xml', + 'data/franchise_contract_data.xml', + 'data/contract_renewal_email_data.xml', + 'data/feedback_email_data.xml', + 'data/monthly_feedback_cron_data.xml', + 'data/contract_renewal_cron_data.xml', + 'wizard/dealer_report_views.xml', + 'wizard/dealer_sale_report_views.xml', + 'views/franchise_dealer_views.xml', + 'views/web_franchise_templates.xml', + 'views/franchise_agreement_views.xml', + 'views/approved_dealer_views.xml', + 'views/res_users_views.xml', + 'views/franchise_dealer_portal_templates.xml', + 'views/franchise_dealer_portal_detail_templates.xml', + 'views/franchise_sales_views.xml', + 'views/web_franchise_sales_templates.xml', + 'views/franchise_management_menus.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'franchise_management/static/src/css/website.css', + 'franchise_management/static/src/js/portalSignatureForm.js', + 'franchise_management/static/src/js/portalSignature.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/franchise_management/controllers/__init__.py b/franchise_management/controllers/__init__.py new file mode 100644 index 000000000..7caefa767 --- /dev/null +++ b/franchise_management/controllers/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import franchise_customer_portal +from . import franchise_portal +from . import web_franchise_dealer +from . import web_franchise_sale diff --git a/franchise_management/controllers/franchise_customer_portal.py b/franchise_management/controllers/franchise_customer_portal.py new file mode 100644 index 000000000..e80aac630 --- /dev/null +++ b/franchise_management/controllers/franchise_customer_portal.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise customer portal controller""" +from odoo import http +from odoo.http import request +from odoo.addons.portal.controllers.portal import CustomerPortal + + +class FranchiseCustomerPortal(CustomerPortal): + """Franchise Customer portal.""" + + def _prepare_home_portal_values(self, counters): + """Preparing franchise count to view in portal.""" + values = super(FranchiseCustomerPortal, + self)._prepare_home_portal_values(counters) + if request.env.user.has_group( + 'franchise_management.dealer_manager_access'): + franchise_count = http.request.env[ + 'franchise.dealer'].search_count( + [('state', 'in', ('e_contract', 'f_signed', 'g_declined'))]) + else: + franchise_count = 0 + values.update({'franchise_count': franchise_count}) + return values diff --git a/franchise_management/controllers/franchise_portal.py b/franchise_management/controllers/franchise_portal.py new file mode 100644 index 000000000..3165c3c07 --- /dev/null +++ b/franchise_management/controllers/franchise_portal.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise portal controller""" +import binascii +from odoo import fields, http, _ +from odoo.http import request +from odoo.exceptions import AccessError, MissingError +from odoo.addons.portal.controllers.mail import _message_post_helper + + +class FranchisePortal(http.Controller): + """Franchise Portal template.""" + + @http.route(['/my/franchise'], type='http', auth="public", + website=True) + def display_franchise_registration(self): + """function to display franchise registrations from backend.""" + franchise_registration = request.env['franchise.dealer'].sudo().search( + [('state', 'in', ('e_contract', 'f_signed', 'g_declined'))]) + dealer_dict = {'franchise_registration': franchise_registration, + 'page_name': 'franchise_registrations'} + return request.render("franchise_management.portal_my_franchise", + dealer_dict) + + @http.route(['/my/franchise/'], type='http', auth="public", + website=True) + def portal_sign_page(self, franchise_id): + """Franchise Portal Sign Page.""" + franchise = request.env['franchise.dealer'].sudo().browse(franchise_id) + return request.render("franchise_management.franchise_portal", + {'franchise': franchise, + 'page_name': 'registration_details'}) + + @http.route(['/my/franchise//decline'], type='http', auth="public", + methods=['POST'], website=True, csrf=True) + def portal_franchise_decline(self, dealer_id): + """Declining the contract sign""" + order_sudo = request.env['franchise.dealer'].sudo().browse(dealer_id) + order_sudo.contract_declined() + return request.redirect(f'my/franchise/{dealer_id}') + + @http.route(['/my/franchise//accept'], type='json', auth="public", + website=True, csrf=True) + def portal_franchise_accept(self, dealer_id, name=None, signature=None, + access_token=None): + """Accepting the contract and signing it.""" + access_token = access_token or request.httprequest.args.get( + 'access_token') + try: + order_sudo = request.env['franchise.dealer'].sudo().browse(dealer_id) + except (AccessError, MissingError): + return {'error': _('Invalid order.')} + try: + order_sudo.write({ + 'signed_by': name, + 'signed_on': fields.Datetime.now(), + 'signature': signature, + }) + request.env.cr.commit() + order_sudo.contract_signed() + list_login = request.env['res.users'].sudo().search([]).mapped( + 'login') + # Check if the dealer's mail is not in the list_login + if order_sudo.dealer_mail not in list_login: + order_sudo.create_portal_user() + order_sudo._send_order_confirmation_mail() + order_sudo.dealer_portal_user.is_dealer_user = True + if order_sudo.dealer_mail in list_login: + franchise_users_id = request.env['res.users'].sudo().search([ + ('login', '=', order_sudo.dealer_mail)]) + order_sudo.dealer_portal_user = franchise_users_id + except (TypeError, binascii.Error) as e: + return {'error': _('Invalid signature data.')} + signed_pdf = request.env['ir.actions.report'].sudo()._render_qweb_pdf( + 'franchise_management.franchise_contract_report_action', + [order_sudo.id])[0] + _message_post_helper( + 'franchise.dealer', + order_sudo.id, + _('Order signed by %s', name), + attachments=[('%s.signed_pdf' % order_sudo.dealer_name, + signed_pdf)], + token=access_token, + ) + query_string = "&message=sign_ok" + return { + 'force_refresh': True, + 'redirect_url': order_sudo.get_portal_url( + query_string=query_string), + } diff --git a/franchise_management/controllers/web_franchise_dealer.py b/franchise_management/controllers/web_franchise_dealer.py new file mode 100644 index 000000000..4426db147 --- /dev/null +++ b/franchise_management/controllers/web_franchise_dealer.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise dealer controller""" +from odoo import http +from odoo.http import request + + +class FranchiseDealer(http.Controller): + """Franchise dealer controller.""" + + @http.route(['/franchise_menu'], type='http', auth="public", website=True) + def dealer_create(self): + """Creating a dealer form in website.""" + state_rec = request.env['res.country.state'].sudo().search([]) + country_rec = request.env['res.country'].sudo().search([]) + franchise_agreement_rec = request.env[ + 'franchise.agreement'].sudo().search([]) + return http.request.render("franchise_management.tmpl_dealer_request", + { + 'state_rec': state_rec, + 'country_rec': country_rec, + 'franchise_agreement_rec': + franchise_agreement_rec, + }) + + @http.route(['/franchise_menu/form/submit'], type='http', auth="public", + website=True) + def franchise_form_submit(self, **post): + """Website dealer form submit function.""" + order = request.env['franchise.dealer'].sudo().create({ + 'dealer_name': post.get('franchisee_name'), + 'dealer_mobile': post.get('dealer_mobile') or '', + 'dealer_phone': post.get('dealer_phone') or '', + 'dealer_mail': post.get('franchisee_email') or '', + 'dealer_website': post.get('dealer_website') or '', + 'street': post.get('street') or '', + 'city': post.get('city') or '', + 'country_id': post.get('country_id'), + 'zip': post.get('zip') or '', + 'state_id': post.get('state_id'), + 'dealer_occupation': post.get('dealer_occupation') or '', + 'dealer_qualification': post.get('dealer_qualification') or '', + 'contract_type_id': post.get('contract_type_id'), + 'monthly_target_amount': post.get('monthly_target_amount'), + 'business_city': post.get('business_city'), + 'business_country': post.get('business_country'), + 'experience': post.get('experience') or '', + 'site_area': post.get('site_area') or '', + 'site_type': post.get('site_type') or '', + 'site_location': post.get('site_location'), + 'investment_from': post.get('investment_from'), + 'investment_to': post.get('investment_to'), + 'advertisement': post.get('advertisement') + }) + vals = {'order': order} + return request.render("franchise_management.website_success_page", + vals) diff --git a/franchise_management/controllers/web_franchise_sale.py b/franchise_management/controllers/web_franchise_sale.py new file mode 100644 index 000000000..aeab9043d --- /dev/null +++ b/franchise_management/controllers/web_franchise_sale.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request + + +class DealerMonthlySaleReport(http.Controller): + """Franchise dealer monthly feedback about the product sale.""" + + @http.route(['/feedback_report_menu'], type='http', auth="public", + website=True) + def dealer_feedback_form(self, **post): + """Creating a dealer feedback form in website.""" + franchise_dealer_rec = request.env['res.users'].sudo().search( + [('is_dealer_user', '=', True)]) + franchise_agreement_rec = request.env[ + 'franchise.agreement'].sudo().search([]) + values = { + 'franchise_agreement_rec': franchise_agreement_rec, + 'franchise_dealer_rec': franchise_dealer_rec, + } + if post.get('id'): + values['current_franchise'] = request.env[ + 'franchise.dealer'].sudo().browse( + int(post.get('id'))) + user = request.env['res.users'].sudo().search( + [('id', '=', int(request.env.user.id))]) + if user.is_dealer_user: + values['user_data'] = request.env[ + 'franchise.dealer'].sudo().search( + [('dealer_portal_user.id', '=', request.env.user.id)]) + return http.request.render( + "franchise_management.tmpl_dealer_feedback", values) + + @http.route(['/dealer_feedback_menu/form/submit'], type='http', + auth="public", website=True) + def franchise_form_submit(self, **post): + """Website dealer form submit function.""" + order = request.env['dealer.sale'].sudo().create({ + 'dealer_id': post.get('dealer_id'), + 'franchise_reference': post.get('franchise_reference') or '', + 'dealer_agreement_id': post.get('dealer_agreement_id'), + 'sale_quantity': post.get('sale_quantity'), + 'scrap_quantity': post.get('scrap_quantity'), + 'total_sale_amount': post.get('total_sale_amount'), + 'discount_percentage': post.get('discount_percentage'), + 'monthly_target_amount': post.get('monthly_target_amount'), + 'monthly_target_gained': post.get('monthly_target_gained'), + }) + vals = {'order': order} + return request.render("franchise_management.feedback_success_page", + vals) diff --git a/franchise_management/data/contract_email_data.xml b/franchise_management/data/contract_email_data.xml new file mode 100644 index 000000000..6a1af9625 --- /dev/null +++ b/franchise_management/data/contract_email_data.xml @@ -0,0 +1,56 @@ + + + + + + DEALERSHIP CONTRACT + + {{object.company_id.email}} + + {{ ctx.get('default_lang') }} + Dealership Contract + +

+ Hi,
+ Congratulations
+ You are approved for the Dealership with us.
+ Make sure you submit your request form completely, and
+ Please read carefully the pdf contract attached here and
+ if you are agree with our terms and conditions
+ Please sign the contract below for the further procedures.
+ You can sign digitally through the button link given here. +

+

+ +
+
+ + + Login Details + + {{object.company_id.email}} + + {{ ctx.get('default_lang') }} + Franchise Login Details + +

+ Hi, + Congratulations
+ You are successfully signed our dealership contract.
+ And now you can log in to our website using the email and password.
+ email : user email address given in the franchise registration.
+ password : franchise00129 +

+

+
+
+
+
diff --git a/franchise_management/data/contract_renewal_cron_data.xml b/franchise_management/data/contract_renewal_cron_data.xml new file mode 100644 index 000000000..4103a0b90 --- /dev/null +++ b/franchise_management/data/contract_renewal_cron_data.xml @@ -0,0 +1,17 @@ + + + + + + Franchise Contract Renewal + + code + model.action_send_contract_renewal() + + 1 + days + -1 + + + + diff --git a/franchise_management/data/contract_renewal_email_data.xml b/franchise_management/data/contract_renewal_email_data.xml new file mode 100644 index 000000000..47abb1184 --- /dev/null +++ b/franchise_management/data/contract_renewal_email_data.xml @@ -0,0 +1,33 @@ + + + + + + CONTRACT RENEWAL + + {{object.company_id.email}} + + {{ ctx.get('default_lang') }} + Contract Renewal + +

+ Hi,
+ Your Franchise dealership contract has expired,
+ Please renew your dealership contract in order to continue + the services.

+ Thanks and Regards
+

+ +
+
+
+
diff --git a/franchise_management/data/feedback_email_data.xml b/franchise_management/data/feedback_email_data.xml new file mode 100644 index 000000000..d0a688939 --- /dev/null +++ b/franchise_management/data/feedback_email_data.xml @@ -0,0 +1,34 @@ + + + + + + SALES FEEDBACK + + {{object.company_id.email}} + + {{ ctx.get('default_lang') }} + Monthly Sales Feedback + +

+ Hi,
+ Please submit monthly feedback report about the sales of the + product, which you owned through the dealership.
+ Please mention your monthly business target, achieved + target, and the total sales done .
+

+ +
+
+
+
diff --git a/franchise_management/data/franchise_contract_data.xml b/franchise_management/data/franchise_contract_data.xml new file mode 100644 index 000000000..e93ec5107 --- /dev/null +++ b/franchise_management/data/franchise_contract_data.xml @@ -0,0 +1,88 @@ + + + + + yearly + + Yearly Franchise Agreement +

This Franchise Agreement ("Agreement") is made and entered into as of January 1, 2024, by and between Franchise Corp, a company organized and existing under the laws of State with its principal office located at 123 Franchise Ave, City, State ("Franchisor"), and John Doe, located at 456 Partner St, City, State ("Franchisee").

+ +

1. Grant of Franchise

+

The Franchisor hereby grants to the Franchisee the right, and the Franchisee undertakes the obligation, to operate a franchise under the Franchisor’s brand and system, using the Franchisor's trademarks, trade names, service marks, logos, and commercial symbols (the "Marks").

+ +

2. Term

+

This Agreement shall commence on the effective date and shall continue for a term of one year, subject to renewal as provided herein.

+ +

3. Fees

+

The Franchisee shall pay to the Franchisor an initial franchise fee of $10,000 and an ongoing royalty fee of 5% of the Franchisee's gross revenue.

+ +

4. Duties of Franchisee

+
    +
  • Operate the franchise in compliance with the Franchisor’s standards and specifications.
  • +
  • Maintain the quality and image of the Franchisor’s brand.
  • +
  • Participate in all required training programs.
  • +
+ +

5. Confidentiality

+

The Franchisee agrees to maintain the confidentiality of all proprietary information provided by the Franchisor.

+ +

6. Termination

+

This Agreement may be terminated by either party upon thirty (30) days' written notice to the other party in the event of a breach of any provision of this Agreement.

+ +

7. Governing Law

+

This Agreement shall be governed by and construed in accordance with the laws of the State of [State].

+ +

8. Entire Agreement

+

This Agreement constitutes the entire agreement between the parties and supersedes all prior agreements and understandings, whether written or oral, relating to the subject matter hereof.

+ +

IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the day and year first above written.

+ +

____________________________
Franchisor Representative

+

____________________________
John Doe, Franchisee

+ ]]> +
+
+ + monthly + + Monthly Franchise Agreement +

This Franchise Agreement ("Agreement") is made and entered into as of May 1, 2024, by and between Franchise Corp, a company organized and existing under the laws of State with its principal office located at 123 Franchise Ave, City, State ("Franchisor"), and John Doe, located at 456 Partner St, City, State ("Franchisee").

+ +

1. Grant of Franchise

+

The Franchisor hereby grants to the Franchisee the right, and the Franchisee undertakes the obligation, to operate a franchise under the Franchisor’s brand and system, using the Franchisor's trademarks, trade names, service marks, logos, and commercial symbols (the "Marks").

+ +

2. Term

+

This Agreement shall commence on the effective date and shall continue for a term of one month, subject to renewal as provided herein.

+ +

3. Fees

+

The Franchisee shall pay to the Franchisor an initial franchise fee of $1,000 and an ongoing royalty fee of 5% of the Franchisee's gross revenue.

+ +

4. Duties of Franchisee

+
    +
  • Operate the franchise in compliance with the Franchisor’s standards and specifications.
  • +
  • Maintain the quality and image of the Franchisor’s brand.
  • +
  • Participate in all required training programs.
  • +
+ +

5. Confidentiality

+

The Franchisee agrees to maintain the confidentiality of all proprietary information provided by the Franchisor.

+ +

6. Termination

+

This Agreement may be terminated by either party upon seven (7) days' written notice to the other party in the event of a breach of any provision of this Agreement.

+ +

7. Governing Law

+

This Agreement shall be governed by and construed in accordance with the laws of the State of [State].

+ +

8. Entire Agreement

+

This Agreement constitutes the entire agreement between the parties and supersedes all prior agreements and understandings, whether written or oral, relating to the subject matter hereof.

+ +

IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the day and year first above written.

+ +

____________________________
Franchisor Representative

+

____________________________
John Doe, Franchisee

+ ]]> +
+
+
diff --git a/franchise_management/data/ir_sequence_data.xml b/franchise_management/data/ir_sequence_data.xml new file mode 100644 index 000000000..481b9d311 --- /dev/null +++ b/franchise_management/data/ir_sequence_data.xml @@ -0,0 +1,21 @@ + + + + + Franchise Dealer + franchise.dealer + DL + 5 + + 1 + + + + Franchise Feedback + dealer.sale + FS + 5 + + 1 + + diff --git a/franchise_management/data/monthly_feedback_cron_data.xml b/franchise_management/data/monthly_feedback_cron_data.xml new file mode 100644 index 000000000..b67989582 --- /dev/null +++ b/franchise_management/data/monthly_feedback_cron_data.xml @@ -0,0 +1,17 @@ + + + + + + Monthly Franchise Sales Feedback + + code + model.action_send_feedback() + + 1 + months + -1 + + + + diff --git a/franchise_management/doc/RELEASE_NOTES.md b/franchise_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..efe7b1382 --- /dev/null +++ b/franchise_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 20.05.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Franchise Management diff --git a/franchise_management/models/__init__.py b/franchise_management/models/__init__.py new file mode 100644 index 000000000..c486e1ffc --- /dev/null +++ b/franchise_management/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import business_experience +from . import franchise_agreement +from . import franchise_dealer +from . import franchise_sales +from . import res_users diff --git a/franchise_management/models/business_experience.py b/franchise_management/models/business_experience.py new file mode 100644 index 000000000..64bf2b5a4 --- /dev/null +++ b/franchise_management/models/business_experience.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Business Experience model""" +from odoo import fields, models + + +class BusinessExperience(models.Model): + """Business experience inverse model.""" + _name = 'business.experience' + _description = 'Business Experience' + + experience_name = fields.Char(string='Experience', + help='Business Experience') + from_date = fields.Date(string='From Date', help='Experience start Date') + to_date = fields.Date(string='To Date', help='Experience To Date') + experience_id = fields.Many2one('franchise.dealer', + help='Inverse field for Business' + ' Experience model') diff --git a/franchise_management/models/franchise_agreement.py b/franchise_management/models/franchise_agreement.py new file mode 100644 index 000000000..2b05aee3c --- /dev/null +++ b/franchise_management/models/franchise_agreement.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise Dealer Agreement Model""" +from odoo import fields, models + + +class FranchiseAgreement(models.Model): + """Franchise Agreement Model.""" + _name = "franchise.agreement" + _description = "Franchise Agreement Type." + _inherit = ['mail.thread', 'mail.activity.mixin'] + _rec_name = "agreement_type" + + agreement_type = fields.Selection( + [('monthly', 'Monthly'), ('yearly', 'Yearly')], + string='Agreement Type', + help='Franchise Agreement type') + agreement_body = fields.Html(string='Agreement Body', render_engine='qweb', + translate=True, + help='Franchise Agreement contents', + prefetch=True, sanitize=False) diff --git a/franchise_management/models/franchise_dealer.py b/franchise_management/models/franchise_dealer.py new file mode 100644 index 000000000..926edfb29 --- /dev/null +++ b/franchise_management/models/franchise_dealer.py @@ -0,0 +1,337 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise Dealer Model""" +import base64 +from datetime import datetime, timedelta +from odoo import api, fields, models, SUPERUSER_ID,_ +from odoo.exceptions import ValidationError, UserError + + +class FranchiseDealer(models.Model): + """Franchise Dealer Model.""" + _name = "franchise.dealer" + _inherit = ['portal.mixin', 'mail.thread', 'mail.activity.mixin', + 'utm.mixin'] + _description = "Dealers" + _rec_name = "dealer_name" + + serial_no = fields.Char(string="Sl No", readonly=True, copy=False, + default='New', help='Record serial no') + dealer_name = fields.Char(string='Franchisee Name', help='Franchisee Name') + dealer_user_id = fields.Many2one('res.users', string="user", + help='User') + street = fields.Char(string="Street", help='Street1 Name') + street2 = fields.Char(string="Street2", help='Street2 Name') + zip = fields.Char(change_default=True, string='Zip code', + help='Franchisee Zip code') + city = fields.Char(string='City', help='City Name') + state_id = fields.Many2one("res.country.state", string='State', + ondelete='restrict', help='Franchisee state', + domain="[('country_id', '=?', country_id)]") + country_id = fields.Many2one('res.country', string='Country', + help='Franchisee Country', + ondelete='restrict') + country_code = fields.Char(related='country_id.code', + string="Country Code", + help='Franchisee Country code') + dealer_qualification = fields.Char(string='Qualification', + help='Franchise Qualification') + dealer_occupation = fields.Char(string='Current Occupation', + help='Franchisee Occupation') + dealer_phone = fields.Char(string='Phone', help='Franchise Phone') + dealer_mobile = fields.Char(string='Mobile', help='Mobile number') + dealer_mail = fields.Char(string='Email', required=True, + help='Franchise email') + dealer_website = fields.Char(string='Website', help='Franchisee Website') + advertisement = fields.Selection( + selection=[('advertisement', 'Advertisement'), + ('area_sales_manager', 'Area Sales Manager'), + ('regional_manager', 'Regional Manager'), + ('others', 'Others')], + string='Advertisement', + help='Dealer Vacancy Known Through', + default='advertisement') + business_city = fields.Char(string='City Interested in', + help='City Interested to Franchise') + business_country = fields.Many2one('res.country', + string='Country Interested in', + help='Country Interested to Franchise', + ondelete='restrict') + experience = fields.Text(string='Experience in this Business', + help='Experience in this Business') + earnings = fields.Char(string='Last year Earnings', + help='Last year earnings in the business') + business_experience_ids = fields.One2many('business.experience', + 'experience_id', + string='Experience', + help='Business Experience') + site_location = fields.Char(string='Site Location', + help='Business Site location') + site_type = fields.Selection( + selection=[('owned', 'Owned'), ('rented', 'Rented'), + ('leased', 'Leased'), ('others', 'Others')], + string='Site Type', default='owned', help='Business Site Type') + site_area = fields.Float(string='Total Area(in sq/ft)', + help='Total site area in sq ft') + investment_from = fields.Float(string='From', help='Investment From') + investment_to = fields.Float(string='To', help='Investment To') + company_id = fields.Many2one('res.company', string='Company', + help='Company Name', + change_default=True, + default=lambda self: self.env.company, + required=False) + user_id = fields.Many2one('res.users', string='Responsible', + help='Responsible User', + default=lambda self: self.env.user) + url = fields.Char(string='url', help='url to website') + feedback_url = fields.Char(string='Feedback url', + help='Feedback Url to feedback form') + signature = fields.Image(string="Signature", copy=False, attachment=True, + help='Franchise Dealer Signature', + max_width=1024, max_height=1024) + signed_by = fields.Char(string="Signed By", copy=False, + help='Franchise Contract Signed By') + signed_on = fields.Date(string="Signed On", copy=False, + help='Franchise Contract Signed On') + contract_renewal_date = fields.Date(string="Renewal Date", store=True, + help='Contract Renewal Date', + compute='_compute_renewal_date') + priority = fields.Selection( + selection=[('0', 'Low'), ('1', 'Medium'), + ('2', 'High'), ('3', 'Very High')], + default='0', help='Prioritise the dealer', + index=True, string="Priority", tracking=True) + dealer_portal_user = fields.Many2one('res.users', + string='Portal User Name', + help='Dealer Portal User Name') + monthly_target_amount = fields.Float(string='Monthly Target Amount', + required=True, + help='Franchise Monthly Target Amount') + state = fields.Selection( + selection=[('a_draft', 'Draft'), ('b_to_approve', 'To Approve'), + ('c_approve', 'Approved'), ('d_cancel', 'Rejected'), + ('e_contract', 'Contract Proposal'), + ('g_declined', 'Declined'), + ('f_signed', 'Contract Signed'), + ('h_feedback', 'Feedback Sent') + ], + string='Status', help='Status', required=True, readonly=True, + copy=False, tracking=True, default='a_draft') + # contract + contract_type_id = fields.Many2one('franchise.agreement', + string='Agreement Type', + required=True, + help='Franchise Agreement Type') + body_html = fields.Html(string='Body', render_engine='qweb', + translate=True, prefetch=True, sanitize=False, + compute="_compute_body_html", + help='Franchise Agreement Body', + inverse="_inverse_contract", store=True) + + @api.constrains('monthly_target_amount') + def _monthly_target_amount(self): + """ Constraint to validate the number of featured blogs. + Raises: ValidationError: If more than three blogs are added.""" + if self.monthly_target_amount == 0.00: + raise UserError(_('Please enter the monthly target amount.')) + + @api.depends('contract_type_id') + def _compute_body_html(self): + """Contract type computation function.""" + for rec in self: + rec.body_html = rec.contract_type_id.agreement_body + + def _inverse_contract(self): + """Inverse function to make the compute field editable""" + self.body_html = self.body_html + + def _compute_renewal_date(self): + """Franchise dealer contract renewal date computation function.""" + for record in self: + record.contract_renewal_date = 0 + if record.signed_on: + if record.contract_type_id.agreement_type == 'yearly': + record.contract_renewal_date = (record.signed_on + + timedelta(days=365)) + if record.contract_type_id.agreement_type == 'monthly': + record.contract_renewal_date = (record.signed_on + + timedelta(days=30)) + else: + record.contract_renewal_date = 0 + + # EXTENDS portal portal.mixin + def _compute_access_url(self): + """Compute url in portal mixin.""" + super()._compute_access_url() + for move in self: + move.access_url = '/my/franchise/%s' % (move.id) + + @api.model_create_multi + def create(self, vals_list): + """Franchise dealer model sequence create method.""" + for vals in vals_list: + if vals.get('serial_no', _("New")) == _("New"): + vals['serial_no'] = self.env['ir.sequence'].next_by_code( + 'franchise.dealer') or 'New' + if vals.get('contract_type_id', False): + vals['body_html'] = self.env['franchise.agreement'].browse( + int(vals['contract_type_id'])).agreement_body + result = super(FranchiseDealer, self).create(vals) + return result + + def action_confirm(self): + """Function of confirm button.""" + self.write({'state': "b_to_approve"}) + + def action_approve(self): + """Function of approve button.""" + self.write({'state': "c_approve"}) + + def action_cancel(self): + """Function of cancel button.""" + self.write({'state': "d_cancel"}) + + def contract_signed(self): + """Function of contract sign button.""" + self.write({'state': "f_signed"}) + + def contract_declined(self): + """Function of reject_sign button in website portal.""" + self.write({'state': "g_declined"}) + + def action_send_contract(self): + """Contract send on button function.""" + base_url = str(self.get_base_url()) + str("/@/my/franchise/") + str( + self.id) + self.url = base_url + self.write({'state': "e_contract"}) + template = self.env.ref('franchise_management.contract_email_template') + self.argument_function(template) + return True + + def action_send_contract_renewal(self): + """Contract renewal schedule action.""" + today_renewals = self.env['franchise.dealer'].search( + [('contract_renewal_date', '=', datetime.today().date())]) + if today_renewals: + for i in today_renewals: + template = self.env.ref( + 'franchise_management.contract_renewal_email_template') + self.argument_function(template) + return True + + def argument_function(self, template): + """Contract send and renewal argument function.""" + current_dealer_order = self.env['franchise.dealer'].browse(self.id) + email_values = {'email_to': current_dealer_order.dealer_mail, } + form_data = { + 'data': current_dealer_order, + } + report_template_id = self.env.ref( + 'franchise_management.franchise_contract_report_action' + )._render_qweb_pdf( + 'franchise_management.franchise_contract_report_action', self.id, + data=form_data) + data_record = base64.b64encode(report_template_id[0]) + ir_values = { + 'name': "Dealership Contract", + 'type': 'binary', + 'datas': data_record, + 'store_fname': data_record, + 'mimetype': 'application/x-pdf', + } + data_id = self.env['ir.attachment'].create(ir_values) + template.attachment_ids = [(6, 0, [data_id.id])] + template.send_mail(self.id, email_values=email_values, force_send=True) + template.attachment_ids = [(3, data_id.id)] + + def _get_confirmation_template(self): + """ Get the mail template sent on SO confirmation (or for confirmed + Sales).:return: `mail.template` record or None if default template + wasn't found""" + return self.env.ref('franchise_management.portal_user_email_template', + raise_if_not_found=False) + + def _send_order_confirmation_mail(self): + """Dealer request confirmation mail after signing the contract.""" + if not self: + return + if self.env.su: + # sending mail in sudo was meant for it being sent from superuser + self = self.with_user(SUPERUSER_ID) + for record in self: + mail_template = record._get_confirmation_template() + if not mail_template: + continue + record.with_context(force_send=True).message_post_with_template( + mail_template.id, + composition_mode='comment', + ) + + def create_portal_user(self): + """After contract signed,the dealer created as portal user.""" + user = self.env['res.users'].create({ + 'name': self.dealer_name, + 'login': self.dealer_mail, + 'email': self.dealer_mail, + 'phone': self.dealer_phone, + 'website': self.dealer_website, + 'password': 'franchise00129', + 'street': self.street, + 'zip': self.zip, + 'groups_id': [(4, self.env.ref('base.group_portal').id)] + }) + self.dealer_portal_user = user.id + return user + + def action_preview_dealer_order(self): + """Dealer portal preview from backend.""" + return { + 'type': 'ir.actions.act_url', + 'target': 'self', + 'url': self.url, + } + + def action_dealer_feedback(self): + """Dealer sale feedback smart button to view feedback report + of the product""" + feedback_ids = self.env['dealer.sale'].search([ + ('dealer_id', '=', self.id)]).ids + return { + 'type': 'ir.actions.act_window', + 'name': 'Dealership feedback', + 'view_mode': 'tree,form', + 'res_model': 'dealer.sale', + 'domain': [('id', 'in', feedback_ids)], + 'context': "{'create': False}" + } + + def action_send_feedback(self): + """Method to send franchise feedback""" + base_url = str(self.get_base_url()) + str( + "/@/feedback_report_menu?id=") + str(self.id) + self.feedback_url = base_url + current_dealer_order = self.env['franchise.dealer'].browse(self.id) + email_values = {'email_to': current_dealer_order.dealer_mail, } + template = self.env.ref('franchise_management.feedback_email_template') + template.send_mail(self.id, email_values=email_values, force_send=True) + return True diff --git a/franchise_management/models/franchise_sales.py b/franchise_management/models/franchise_sales.py new file mode 100644 index 000000000..b93cd2dee --- /dev/null +++ b/franchise_management/models/franchise_sales.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Franchise feedback form""" +from odoo import api, fields, models, _ + + +class DealerSale(models.Model): + """Franchise Dealer Monthly Sales Feedback.""" + _name = "dealer.sale" + _inherit = ['portal.mixin', 'mail.thread', 'mail.activity.mixin', + 'utm.mixin'] + _description = "Dealer Sales" + _rec_name = "dealer_id" + + serial_no = fields.Char(string="Sl No", help='Serial no', readonly=True, + copy=False, default='New') + dealer_id = fields.Many2one('franchise.dealer', + string="Franchise Dealer", + help='Franchise dealer name') + franchise_reference = fields.Char(string="Franchise Reference", + readonly=True, + help='Franchise Reference Number') + dealer_mail = fields.Char(string='mail', help='Franchise Dealer email') + dealer_agreement_id = fields.Many2one('franchise.agreement', + string="Franchise agreement type", + help='Franchise Agreement Type') + dealership_signed_on = fields.Date(string='Dealership Signed on', + readonly=True, + help='Dealership Contract Signed on') + sale_quantity = fields.Integer(string="Sale Quantity", + help='Total Sale Quantity') + scrap_quantity = fields.Integer(string="Scrap Quantity", + help='Total Scrap Quantity') + total_sale_amount = fields.Float(string="Sale Amount", + help='Total Sale Amount') + discount_percentage = fields.Float(string="Discount Given in(%)", + help='Discount Given in(%)') + monthly_target_amount = fields.Float(string="Monthly Target", + help='Monthly Target Amount') + monthly_target_gained = fields.Float(string="Monthly Target Gained in (%)", + help='Monthly Target Gained in (%)') + state = fields.Selection(selection=[('a_to_verify', 'To Verify'), + ('b_verified', 'Verified')], + string='Status', required=True, + help='Status of the Franchise Registration', + readonly=True, copy=False, + tracking=True, default='a_to_verify') + + def action_verify_sale(self): + """Method to verify the sales feedback""" + self.write({'state': "b_verified"}) + + @api.model_create_multi + def create(self, vals_list): + """Method to create Franchise dealer sales record sequences.""" + for vals in vals_list: + if vals.get('serial_no', _("New")) == _("New"): + vals['serial_no'] = self.env['ir.sequence'].next_by_code( + 'dealer.sale') or 'New' + result = super(DealerSale, self).create(vals) + return result diff --git a/franchise_management/models/res_users.py b/franchise_management/models/res_users.py new file mode 100644 index 000000000..bdd345adf --- /dev/null +++ b/franchise_management/models/res_users.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MK() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +"""Res Users Inherited model""" +from odoo import fields, models + + +class ResUsers(models.Model): + """Inherited the res_users model to add a boolean field to ensure + a dealer after contract signed.""" + _inherit = 'res.users' + + is_dealer_user = fields.Boolean(string='Is Dealer', + help='Dealer User identification field') diff --git a/franchise_management/report/agreement_based_templates.xml b/franchise_management/report/agreement_based_templates.xml new file mode 100644 index 000000000..0bf4a8b5a --- /dev/null +++ b/franchise_management/report/agreement_based_templates.xml @@ -0,0 +1,94 @@ + + + + + diff --git a/franchise_management/report/dealer_based_templates.xml b/franchise_management/report/dealer_based_templates.xml new file mode 100644 index 000000000..3fbc55991 --- /dev/null +++ b/franchise_management/report/dealer_based_templates.xml @@ -0,0 +1,73 @@ + + + + + diff --git a/franchise_management/report/dealer_sale_based_templates.xml b/franchise_management/report/dealer_sale_based_templates.xml new file mode 100644 index 000000000..9131a474b --- /dev/null +++ b/franchise_management/report/dealer_sale_based_templates.xml @@ -0,0 +1,94 @@ + + + + + diff --git a/franchise_management/report/dealer_sale_on_agreement_templates.xml b/franchise_management/report/dealer_sale_on_agreement_templates.xml new file mode 100644 index 000000000..19aa89b6f --- /dev/null +++ b/franchise_management/report/dealer_sale_on_agreement_templates.xml @@ -0,0 +1,95 @@ + + + + + diff --git a/franchise_management/report/dealer_sale_report_templates.xml b/franchise_management/report/dealer_sale_report_templates.xml new file mode 100644 index 000000000..f97d3be7a --- /dev/null +++ b/franchise_management/report/dealer_sale_report_templates.xml @@ -0,0 +1,83 @@ + + + + + diff --git a/franchise_management/report/franchise_dealership_contract_templates.xml b/franchise_management/report/franchise_dealership_contract_templates.xml new file mode 100644 index 000000000..8b62b121b --- /dev/null +++ b/franchise_management/report/franchise_dealership_contract_templates.xml @@ -0,0 +1,935 @@ + + + + + diff --git a/franchise_management/report/franchise_management_report.xml b/franchise_management/report/franchise_management_report.xml new file mode 100644 index 000000000..f0d1856a9 --- /dev/null +++ b/franchise_management/report/franchise_management_report.xml @@ -0,0 +1,68 @@ + + + + + Contract + franchise.dealer + qweb-pdf + franchise_management.franchise_dealership_contract_template + franchise_management.franchise_dealership_contract_template + + report + + + + franchise Dealer Details + franchise.dealer + qweb-pdf + franchise_management.all_dealer_based_report_pdf + franchise_management.all_dealer_based_report_pdf + report + + + + Dealer Franchisee + franchise.dealer + qweb-pdf + franchise_management.dealer_based_report_pdf + franchise_management.dealer_based_report_pdf + report + + + + Agreement Based Report + franchise.dealer + qweb-pdf + franchise_management.agreement_based_report_pdf + franchise_management.agreement_based_report_pdf + report + + + + Dealer Based Report + dealer.sale + qweb-pdf + franchise_management.all_dealer_sale_report_pdf + franchise_management.all_dealer_sale_report_pdf + report + + + + Dealer Based Sale Report + dealer.sale + qweb-pdf + franchise_management.dealer_sale_on_dealer_report_pdf + franchise_management.dealer_sale_on_dealer_report_pdf + report + + + + Agreement Based Sale Report + dealer.sale + qweb-pdf + franchise_management.dealer_sale_on_agreement_report_pdf + franchise_management.dealer_sale_on_agreement_report_pdf + report + + diff --git a/franchise_management/report/franchise_report_templates.xml b/franchise_management/report/franchise_report_templates.xml new file mode 100644 index 000000000..dbeac1b86 --- /dev/null +++ b/franchise_management/report/franchise_report_templates.xml @@ -0,0 +1,74 @@ + + + + + diff --git a/franchise_management/security/franchise_management_security.xml b/franchise_management/security/franchise_management_security.xml new file mode 100644 index 000000000..d0dabc901 --- /dev/null +++ b/franchise_management/security/franchise_management_security.xml @@ -0,0 +1,20 @@ + + + + + + Dealer + User access levels for Franchise Management + 10 + + + Franchise User + + + + Franchise Manager + + + + + diff --git a/franchise_management/security/ir.model.access.csv b/franchise_management/security/ir.model.access.csv new file mode 100644 index 000000000..bc458db4a --- /dev/null +++ b/franchise_management/security/ir.model.access.csv @@ -0,0 +1,8 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_dealer_manager,access.dealer.manager,franchise_management.model_franchise_dealer,base.group_user,1,1,1,1 +access_dealer_agreement_user,access.dealer.agreement.user,franchise_management.model_franchise_agreement,base.group_user,1,1,1,1 +access_dealer_sale_user,access.dealer.sale.user,franchise_management.model_dealer_sale,base.group_user,1,1,1,1 +access_portal_dealer_user,access.portal.dealer.user,franchise_management.model_franchise_dealer,base.group_portal,1,0,0,0 +access_dealer_experience_user,access.dealer.experience.user,model_business_experience,base.group_user,1,1,1,1 +access_dealer_report_user,access.dealer.report.user,model_dealer_report,base.group_user,1,1,1,1 +access_dealer_sale_report_user,access.dealer.sales.report.user,model_dealer_sale_report,base.group_user,1,1,1,1 diff --git a/franchise_management/static/description/assets/icons/check.png b/franchise_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/franchise_management/static/description/assets/icons/check.png differ diff --git a/franchise_management/static/description/assets/icons/chevron.png b/franchise_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/franchise_management/static/description/assets/icons/chevron.png differ diff --git a/franchise_management/static/description/assets/icons/cogs.png b/franchise_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/franchise_management/static/description/assets/icons/cogs.png differ diff --git a/franchise_management/static/description/assets/icons/consultation.png b/franchise_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/franchise_management/static/description/assets/icons/consultation.png differ diff --git a/franchise_management/static/description/assets/icons/ecom-black.png b/franchise_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/franchise_management/static/description/assets/icons/ecom-black.png differ diff --git a/franchise_management/static/description/assets/icons/education-black.png b/franchise_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/franchise_management/static/description/assets/icons/education-black.png differ diff --git a/franchise_management/static/description/assets/icons/hotel-black.png b/franchise_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/franchise_management/static/description/assets/icons/hotel-black.png differ diff --git a/franchise_management/static/description/assets/icons/license.png b/franchise_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/franchise_management/static/description/assets/icons/license.png differ diff --git a/franchise_management/static/description/assets/icons/lifebuoy.png b/franchise_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/franchise_management/static/description/assets/icons/lifebuoy.png differ diff --git a/franchise_management/static/description/assets/icons/logo.png b/franchise_management/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/franchise_management/static/description/assets/icons/logo.png differ diff --git a/franchise_management/static/description/assets/icons/manufacturing-black.png b/franchise_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/franchise_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/franchise_management/static/description/assets/icons/pos-black.png b/franchise_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/franchise_management/static/description/assets/icons/pos-black.png differ diff --git a/franchise_management/static/description/assets/icons/puzzle.png b/franchise_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/franchise_management/static/description/assets/icons/puzzle.png differ diff --git a/franchise_management/static/description/assets/icons/restaurant-black.png b/franchise_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/franchise_management/static/description/assets/icons/restaurant-black.png differ diff --git a/franchise_management/static/description/assets/icons/service-black.png b/franchise_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/franchise_management/static/description/assets/icons/service-black.png differ diff --git a/franchise_management/static/description/assets/icons/trading-black.png b/franchise_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/franchise_management/static/description/assets/icons/trading-black.png differ diff --git a/franchise_management/static/description/assets/icons/training.png b/franchise_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/franchise_management/static/description/assets/icons/training.png differ diff --git a/franchise_management/static/description/assets/icons/update.png b/franchise_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/franchise_management/static/description/assets/icons/update.png differ diff --git a/franchise_management/static/description/assets/icons/user.png b/franchise_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/franchise_management/static/description/assets/icons/user.png differ diff --git a/franchise_management/static/description/assets/icons/wrench.png b/franchise_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/franchise_management/static/description/assets/icons/wrench.png differ diff --git a/franchise_management/static/description/assets/misc/categories.png b/franchise_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/franchise_management/static/description/assets/misc/categories.png differ diff --git a/franchise_management/static/description/assets/misc/check-box.png b/franchise_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/franchise_management/static/description/assets/misc/check-box.png differ diff --git a/franchise_management/static/description/assets/misc/compass.png b/franchise_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/franchise_management/static/description/assets/misc/compass.png differ diff --git a/franchise_management/static/description/assets/misc/corporate.png b/franchise_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/franchise_management/static/description/assets/misc/corporate.png differ diff --git a/franchise_management/static/description/assets/misc/customer-support.png b/franchise_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/franchise_management/static/description/assets/misc/customer-support.png differ diff --git a/franchise_management/static/description/assets/misc/cybrosys-logo.png b/franchise_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/franchise_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/franchise_management/static/description/assets/misc/features.png b/franchise_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/franchise_management/static/description/assets/misc/features.png differ diff --git a/franchise_management/static/description/assets/misc/logo.png b/franchise_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/franchise_management/static/description/assets/misc/logo.png differ diff --git a/franchise_management/static/description/assets/misc/pictures.png b/franchise_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/franchise_management/static/description/assets/misc/pictures.png differ diff --git a/franchise_management/static/description/assets/misc/pie-chart.png b/franchise_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/franchise_management/static/description/assets/misc/pie-chart.png differ diff --git a/franchise_management/static/description/assets/misc/right-arrow.png b/franchise_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/franchise_management/static/description/assets/misc/right-arrow.png differ diff --git a/franchise_management/static/description/assets/misc/star.png b/franchise_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/franchise_management/static/description/assets/misc/star.png differ diff --git a/franchise_management/static/description/assets/misc/support.png b/franchise_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/franchise_management/static/description/assets/misc/support.png differ diff --git a/franchise_management/static/description/assets/misc/whatsapp.png b/franchise_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/franchise_management/static/description/assets/misc/whatsapp.png differ diff --git a/franchise_management/static/description/assets/modules/w1.gif b/franchise_management/static/description/assets/modules/w1.gif new file mode 100644 index 000000000..db040e0de Binary files /dev/null and b/franchise_management/static/description/assets/modules/w1.gif differ diff --git a/franchise_management/static/description/assets/modules/w2.png b/franchise_management/static/description/assets/modules/w2.png new file mode 100644 index 000000000..b3c3ca084 Binary files /dev/null and b/franchise_management/static/description/assets/modules/w2.png differ diff --git a/franchise_management/static/description/assets/modules/w3.png b/franchise_management/static/description/assets/modules/w3.png new file mode 100644 index 000000000..082948398 Binary files /dev/null and b/franchise_management/static/description/assets/modules/w3.png differ diff --git a/franchise_management/static/description/assets/modules/w4.png b/franchise_management/static/description/assets/modules/w4.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/franchise_management/static/description/assets/modules/w4.png differ diff --git a/franchise_management/static/description/assets/modules/w5.png b/franchise_management/static/description/assets/modules/w5.png new file mode 100644 index 000000000..33372bdc1 Binary files /dev/null and b/franchise_management/static/description/assets/modules/w5.png differ diff --git a/franchise_management/static/description/assets/modules/w6.png b/franchise_management/static/description/assets/modules/w6.png new file mode 100644 index 000000000..1b57f61b3 Binary files /dev/null and b/franchise_management/static/description/assets/modules/w6.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0001.png b/franchise_management/static/description/assets/screenshots/FR-0001.png new file mode 100644 index 000000000..a4a884222 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0001.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0002.png b/franchise_management/static/description/assets/screenshots/FR-0002.png new file mode 100644 index 000000000..6ad4374c2 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0002.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0003.png b/franchise_management/static/description/assets/screenshots/FR-0003.png new file mode 100644 index 000000000..0cd18fbc7 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0003.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0004.png b/franchise_management/static/description/assets/screenshots/FR-0004.png new file mode 100644 index 000000000..ab109fc39 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0004.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0005.png b/franchise_management/static/description/assets/screenshots/FR-0005.png new file mode 100644 index 000000000..3439a7a93 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0005.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0006.png b/franchise_management/static/description/assets/screenshots/FR-0006.png new file mode 100644 index 000000000..0f114affe Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0006.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0007.png b/franchise_management/static/description/assets/screenshots/FR-0007.png new file mode 100644 index 000000000..fe0b7d474 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0007.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0008.png b/franchise_management/static/description/assets/screenshots/FR-0008.png new file mode 100644 index 000000000..7fcc378ef Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0008.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0009.png b/franchise_management/static/description/assets/screenshots/FR-0009.png new file mode 100644 index 000000000..4370348a4 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0009.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0010.png b/franchise_management/static/description/assets/screenshots/FR-0010.png new file mode 100644 index 000000000..7b3da2cb9 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0010.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0011.png b/franchise_management/static/description/assets/screenshots/FR-0011.png new file mode 100644 index 000000000..fca036970 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0011.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0012.png b/franchise_management/static/description/assets/screenshots/FR-0012.png new file mode 100644 index 000000000..11cd4630f Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0012.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0013.png b/franchise_management/static/description/assets/screenshots/FR-0013.png new file mode 100644 index 000000000..423c97884 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0013.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0014.png b/franchise_management/static/description/assets/screenshots/FR-0014.png new file mode 100644 index 000000000..5b66596b2 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0014.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0015.png b/franchise_management/static/description/assets/screenshots/FR-0015.png new file mode 100644 index 000000000..21587f1f1 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0015.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0016.png b/franchise_management/static/description/assets/screenshots/FR-0016.png new file mode 100644 index 000000000..6bedb3ea5 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0016.png differ diff --git a/franchise_management/static/description/assets/screenshots/FR-0017.png b/franchise_management/static/description/assets/screenshots/FR-0017.png new file mode 100644 index 000000000..5eac70e6c Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/FR-0017.png differ diff --git a/franchise_management/static/description/assets/screenshots/hero.gif b/franchise_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..fa91b32f3 Binary files /dev/null and b/franchise_management/static/description/assets/screenshots/hero.gif differ diff --git a/franchise_management/static/description/banner.png b/franchise_management/static/description/banner.png new file mode 100644 index 000000000..1b13d23c5 Binary files /dev/null and b/franchise_management/static/description/banner.png differ diff --git a/franchise_management/static/description/icon.png b/franchise_management/static/description/icon.png new file mode 100644 index 000000000..b5814b829 Binary files /dev/null and b/franchise_management/static/description/icon.png differ diff --git a/franchise_management/static/description/index.html b/franchise_management/static/description/index.html new file mode 100644 index 000000000..7d48bf81c --- /dev/null +++ b/franchise_management/static/description/index.html @@ -0,0 +1,653 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

Franchise Management

+

This Module Helps To Manage The Franchise In Odoo

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

Explore This Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to manage the franchise in odoo.A franchise is a type of license that grants a franchisee access + to a franchises proprietary business knowledge, processes, and trademarks, thus allowing the franchisee to sell + a product or service under the franchises business name. In exchange for acquiring a franchise, + the franchisee usually pays the franchise an initial start-up fee and annual licensing fees. + A website user can request for a franchise by submitting the website form and after submitting the form + admin can manage this request from backend and after verify and approve he can send the contract to the customer + to corresponding mail, which describes the terms and conditions of becoming a franchise + with our company,if he agrees the contract then he can sign the contract through website portal. if he signed + it will be recorded in the backend, and he will be converted as a portal user and a confirmation mail also send to him + by notifying his username and password to log in to the odoo as portal user. A yearly contract renewal mail also send to him.
+ This module also manages monthly tracking of sales of the franchisee. that is, monthly sending an email for submitting + the franchise sales feedback form. if he submits it based on the information, admin can generate reports about the sales feedback and + understand the growth of the company in franchise, And also manages the dealership registration reports. +
+
+ + + + +
+
+ +
+

Features +

+
+
+
+
+ + User Friendly Interface. +
+
+ + Compatible with Community, Enterprise, and Odoo.sh +
+
+ + User can manage all the website Franchise Requests in backend. +
+
+ + Admin user can Accept or Cancel the Franchise Requests based on the details +
+
+ + After approving admin can send contract to the customer. +
+
+ + Customer can agree the terms and conditions and sign the + contract through portal. +
+
+ + Every year after he signed the contract, he will get a + contract renewal email. +
+
+ + Admin can request the monthly franchise sales feedback. +
+
+ + Available both Franchise Registrations and Franchise Sales + Feedback Reports. +
+
+ + Admin can manage all Registrations in website portal account + also. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Franchise Registration Form.

+

Customer can submit the franchise requests from website.

+ +
+
+

Franchise Agreement Type.

+

Customer can select his Franchise Agreement Type.

+ +
+
+

Franchise Registrations.

+

User can manage all the website Franchise Requests in backend.

+ +
+
+

Admin user can Accept or Cancel the Registration.

+ +
+
+

Franchise Agreement.

+

Based on the Agreement Type chosen by the customer from the website, + Agreement format will be automatically filled to the backend.

+ +
+
+

After verifying the registration admin can send the + franchise dealership contract to the customer via mail mentioned in registration form.

+ +
+
+

Send contract to customer.

+

In the mail template a pdf contract with all the terms and + conditions are attached along with a button to sign and confirm + the contract. +

+ +
+
+

Sign and confirm the contract.

+

Customer will be redirected to the customer portal and from there + he can sign and confirm the contract. +

+ +
+
+

Customer can Sign or Reject the Franchise + Dealership contract.

+ +
+
+

Accept and Sign.

+

The sign will be added to the portal template. +

+ + +
+
+

The Customer will be created as Dealer.

+

After sign the contract, the customer will be converted as the + franchise dealer.He has the portal user access now. + A confirmation mail also sent to him about + notifying the email and password to log into the portal. + The sign and signed date will also be recorded in the backend. +

+ +
+
+

Admin user can request the sales feedback of the + franchise products.

+

On click of request sale feedback button , a request mail will + be sent to the dealer about submitting the monthly sales review + of the franchise product. +

+ +
+
+

Monthly sales feedback form.

+

The email template contains a button to redirect to the sales + feedback form. +

+ +
+
+

Submitted sales feedbacks will be recorded in + the backend.

+ +
+
+

Admin can manage the sales feedbacks.

+ +
+
+

Portal franchise registrations.

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

Related + Products +

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

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/franchise_management/static/src/css/website.css b/franchise_management/static/src/css/website.css new file mode 100644 index 000000000..a28ee6126 --- /dev/null +++ b/franchise_management/static/src/css/website.css @@ -0,0 +1,73 @@ +.head{ +margin-top:25px; +margin-left:20px; +} +.image{ +background-image:url("/franchise_management/static/src/img/franchise.jpg"); +background-size:cover; +height:300px; +width:600px; +margin-top: 200px; +} +.fd_image{ + background-image: url("/franchise_management/static/src/img/fd_franchise.jpg"); + background-size: cover; + height: 500px; + width: 700px; + margin-top: -900px; + margin-left: 500px +} + +} +.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { + color: #533ee2; + background-color: #FFFFFF; + border-color: #dee2e6 #dee2e6 #FFFFFF; +} +.nav-link { + display: block; + padding: 0.5rem 1rem; + color: #533ee2; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} +.body{ +margin-top:-326px; +margin-left:875px; +margin-bottom:10px; +} +h1{ +color:royalblue; +font-family:"Lucida consol","Courier Nem",monospace; +font-size:50px; +margin-top:50px; +} +h6{ +color:royalblue; +} + +.link-style{ +width:500px; +height:50px; +border-color: royalblue; +border-width: 1px; +} +.btn-fill-primary, .btn-primary { + color: #FFFFFF; + background-color: #533ee2; + border-color: #533ee2; +} +.col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; + color: deepskyblue; +} +.button{ +width:500px; +height:50px; + color: #FFFFFF; + background-color: #533ee2; + border-color: #533ee2; +} \ No newline at end of file diff --git a/franchise_management/static/src/img/fd_franchise.jpg b/franchise_management/static/src/img/fd_franchise.jpg new file mode 100644 index 000000000..9cfdb9161 Binary files /dev/null and b/franchise_management/static/src/img/fd_franchise.jpg differ diff --git a/franchise_management/static/src/img/franchise.jpg b/franchise_management/static/src/img/franchise.jpg new file mode 100644 index 000000000..c785509c4 Binary files /dev/null and b/franchise_management/static/src/img/franchise.jpg differ diff --git a/franchise_management/static/src/js/portalSignature.js b/franchise_management/static/src/js/portalSignature.js new file mode 100644 index 000000000..8fccbf04b --- /dev/null +++ b/franchise_management/static/src/js/portalSignature.js @@ -0,0 +1,78 @@ +/** @odoo-module */ + +import core from 'web.core'; +import publicWidget from 'web.public.widget'; +import { NameAndSignature } from 'web.name_and_signature'; +const _t = core._t; +const qweb = core.qweb; + +export const SignatureForm = publicWidget.Widget.extend({ + template: 'portal.portal_signature', + events: { + 'click .o_portal_sign_submit': 'async _onClickSignSubmit', + }, + custom_events: { + 'signature_changed': '_onChangeSignature', + }, + init: function (parent, options) { + this._super.apply(this, arguments); + this.csrf_token = odoo.csrf_token; + this.callUrl = options.callUrl || ''; + this.rpcParams = options.rpcParams || {}; + this.sendLabel = options.sendLabel || _t("Accept & Sign"); + this.nameAndSignature = new NameAndSignature(this, + options.nameAndSignatureOptions || {}); + }, + start: function () { + var self = this; + this.$confirm_btn = this.$('.o_portal_sign_submit'); + this.$controls = this.$('.o_portal_sign_controls'); + var subWidgetStart = this.nameAndSignature.replace(this.$('.o_web_sign_name_and_signature')); + return Promise.all([subWidgetStart, this._super.apply(this, arguments)]).then(function () { + self.nameAndSignature.resetSignature(); + }); + }, + focusName: function () { + this.nameAndSignature.focusName(); + }, + resetSignature: function () { + return this.nameAndSignature.resetSignature(); + }, + _onClickSignSubmit: function (ev) { + var self = this; + ev.preventDefault(); + if (!this.nameAndSignature.validateSignature()) { + return; + } + var name = this.nameAndSignature.getName(); + var signature = this.nameAndSignature.getSignatureImage()[1]; + return this._rpc({ + route: this.callUrl, + params: _.extend(this.rpcParams, { + 'name': name, + 'signature': signature, + }), + }).then(function (data) { + if (data.error) { + self.$('.o_portal_sign_error_msg').remove(); + self.$controls.prepend(qweb.render('portal.portal_signature_error', {widget: data})); + } else if (data.success) { + var $success = qweb.render('portal.portal_signature_success', {widget: data}); + self.$el.empty().append($success); + } + if (data.force_refresh) { + if (data.redirect_url) { + window.location = data.redirect_url; + } else { + window.location.reload(); + } + // No resolve if we reload the page + return new Promise(function () { }); + } + }); + }, + _onChangeSignature: function () { + var isEmpty = this.nameAndSignature.isSignatureEmpty(); + this.$confirm_btn.prop('disabled', isEmpty); + }, +}); diff --git a/franchise_management/static/src/js/portalSignatureForm.js b/franchise_management/static/src/js/portalSignatureForm.js new file mode 100644 index 000000000..6fcc776b4 --- /dev/null +++ b/franchise_management/static/src/js/portalSignatureForm.js @@ -0,0 +1,44 @@ +/** @odoo-module */ + +import { registry } from '@web/core/registry'; +import core from 'web.core'; +import publicWidget from 'web.public.widget'; +import { NameAndSignature } from 'web.name_and_signature'; +import { SignatureForm } from '@franchise_management/js/portalSignature'; + +//extending the public widget for adding signature form and sign the contract +publicWidget.registry.SignatureForm = publicWidget.Widget.extend({ + selector: '.o_portal_signature_form', + start: function () { + var hasBeenReset = false; + var callUrl = this.$el.data('call-url'); + var nameAndSignatureOptions = { + defaultName: this.$el.data('default-name'), + mode: this.$el.data('mode'), + displaySignatureRatio: this.$el.data('signature-ratio'), + signatureType: this.$el.data('signature-type'), + fontColor: this.$el.data('font-color') || 'black', + }; + var sendLabel = this.$el.data('send-label'); + var form = new SignatureForm(this, { + callUrl: callUrl, + nameAndSignatureOptions: nameAndSignatureOptions, + sendLabel: sendLabel, + }); + // Correctly set up the signature area if it is inside a modal + this.$el.closest('.modal').on('shown.bs.modal', function (ev) { + if (!hasBeenReset) { + // Reset it only the first time it is open to get correct + // size. After we want to keep its content on reopen. + hasBeenReset = true; + form.resetSignature(); + } else { + form.focusName(); + } + }); + return Promise.all([ + this._super.apply(this, arguments), + form.appendTo(this.$el) + ]); + }, +}); diff --git a/franchise_management/views/approved_dealer_views.xml b/franchise_management/views/approved_dealer_views.xml new file mode 100644 index 000000000..0a08c4330 --- /dev/null +++ b/franchise_management/views/approved_dealer_views.xml @@ -0,0 +1,10 @@ + + + + + Dealer + franchise.dealer + tree,form + [('state', '=', 'f_signed')] + + diff --git a/franchise_management/views/franchise_agreement_views.xml b/franchise_management/views/franchise_agreement_views.xml new file mode 100644 index 000000000..5ba5bb1e5 --- /dev/null +++ b/franchise_management/views/franchise_agreement_views.xml @@ -0,0 +1,42 @@ + + + + + franchise.agreement.view.form + franchise.agreement + +
+ + + + + + +
+ + + +
+
+
+
+ + + franchise.agreement.view.tree + franchise.agreement + + + + + + + + + Franchise Agreement + franchise.agreement + tree,form + +
diff --git a/franchise_management/views/franchise_dealer_portal_detail_templates.xml b/franchise_management/views/franchise_dealer_portal_detail_templates.xml new file mode 100644 index 000000000..83215e3ab --- /dev/null +++ b/franchise_management/views/franchise_dealer_portal_detail_templates.xml @@ -0,0 +1,194 @@ + + + + + +