diff --git a/.gitignore b/.gitignore index 438fe08c3..0307226b1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ __pycache__/ env/ build/ develop-eggs/ -dist/ downloads/ eggs/ .eggs/ diff --git a/account_bank_charges/README.rst b/account_bank_charges/README.rst new file mode 100644 index 000000000..b1c8a11e8 --- /dev/null +++ b/account_bank_charges/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Account Bank Charges In Payment +=============================== +This module allows us to have separate journal entries for bank charges. + +Configuration +============= +Add default bank charges account in bank journal, to allow us to have separate journal entries for bank charges. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(http://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: (V16)Swaroop N P + +* Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/account_bank_charges/__init__.py b/account_bank_charges/__init__.py new file mode 100644 index 000000000..7b2c59c1c --- /dev/null +++ b/account_bank_charges/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/account_bank_charges/__manifest__.py b/account_bank_charges/__manifest__.py new file mode 100644 index 000000000..bc864f874 --- /dev/null +++ b/account_bank_charges/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Account Bank Charges In Payment", + 'version': '16.0.1.0.0', + 'category': 'Accounting', + 'summary': """This Module Allows to Add Separate Journal Entries for Bank Charges in Payment""", + 'description': """This Module Allows to Add Separate Journal Entries for Bank Charges in Payment""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'account'], + 'data': [ + 'views/account_account_views.xml', + 'views/account_journal_views.xml', + 'views/account_payment_register_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/account_bank_charges/doc/RELEASE_NOTES.md b/account_bank_charges/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..810246206 --- /dev/null +++ b/account_bank_charges/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.01.2024 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit for Account Bank Charges In Payment diff --git a/account_bank_charges/models/__init__.py b/account_bank_charges/models/__init__.py new file mode 100644 index 000000000..5dfca2235 --- /dev/null +++ b/account_bank_charges/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import account_account +from . import account_journal +from . import account_payment +from . import account_payment_register diff --git a/account_bank_charges/models/account_account.py b/account_bank_charges/models/account_account.py new file mode 100644 index 000000000..94e5c76d5 --- /dev/null +++ b/account_bank_charges/models/account_account.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class AccountAccount(models.Model): + """Added custom field account_account to add the bank charges""" + _inherit = "account.account" + + bank_charge = fields.Monetary(currency_field='currency_id', + string="Bank Charge", + help="Bank charge amount") diff --git a/account_bank_charges/models/account_journal.py b/account_bank_charges/models/account_journal.py new file mode 100644 index 000000000..13f3d609c --- /dev/null +++ b/account_bank_charges/models/account_journal.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class AccountJournal(models.Model): + """Added custom field default_bank_charges_account_id to + account.journal model""" + _inherit = 'account.journal' + + account_id = fields.Many2one( + comodel_name='account.account', check_company=True, copy=False, + ondelete='restrict', + string='Default Bank Charges Account', + domain="[('deprecated', '=', False), ('company_id', '=', company_id),]", + help="The default bank charges account") diff --git a/account_bank_charges/models/account_payment.py b/account_bank_charges/models/account_payment.py new file mode 100644 index 000000000..4d452af70 --- /dev/null +++ b/account_bank_charges/models/account_payment.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class AccountPayment(models.Model): + """Added custom field bank_charges to add the extra charges""" + _inherit = "account.payment" + + bank_charges = fields.Monetary(currency_field='currency_id', + string="Bank Charges", + help="Bank charge amount") + + def _prepare_move_line_default_vals(self, write_off_line_vals=None): + """Adding bank charges in move line""" + res = super(AccountPayment, self)._prepare_move_line_default_vals( + write_off_line_vals=write_off_line_vals) + if self.bank_charges: + # Compute default label in journal items for bank charges. + liquidity_line_name = ''.join( + x[1] for x in self._get_liquidity_aml_display_name_list()) + bank_charges_line_name = liquidity_line_name.replace( + str(("{:,}".format(self.amount))), + str(self.bank_charges)) + move = self.env['account.move'].create({ + 'journal_id': self.journal_id.id, + 'move_type': 'entry', + 'partner_id': self.partner_id.id, + 'line_ids': [ + (0, 0, { + 'name': bank_charges_line_name, + 'partner_id': self.partner_id.id, + 'journal_id': self.journal_id.id, + 'account_id': self.journal_id.account_id.id, + 'debit': self.bank_charges, + 'credit': 0.0, + }), + (0, 0, { + 'name': bank_charges_line_name, + 'partner_id': self.partner_id.id, + 'journal_id': self.journal_id.id, + 'account_id': self.journal_id.default_account_id.id, + 'debit': 0.0, + 'credit': self.bank_charges, + }), + ], + }) + move.action_post() + return res diff --git a/account_bank_charges/models/account_payment_register.py b/account_bank_charges/models/account_payment_register.py new file mode 100644 index 000000000..fcdea8671 --- /dev/null +++ b/account_bank_charges/models/account_payment_register.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class AccountPaymentRegister(models.TransientModel): + """Added custom field bank_charges to add the extra charges""" + _inherit = 'account.payment.register' + + bank_charges = fields.Monetary(currency_field='currency_id', + related="journal_id.account_id.bank_charge", + string="Bank Charges", + readonly=False, + help="Bank charge amount") + + def _create_payment_vals_from_wizard(self, batch_result): + """Create payment using values received from wizard.""" + res = super()._create_payment_vals_from_wizard(batch_result) + res['bank_charges'] = self.bank_charges + return res + + def _create_payment_vals_from_batch(self, batch_result): + """Create payment using values received from wizard.""" + res = super(AccountPaymentRegister, + self)._create_payment_vals_from_batch(batch_result) + res['bank_charges'] = self.bank_charges + return res diff --git a/portal_stock_check/static/description/assets/icons/check.png b/account_bank_charges/static/description/assets/icons/check.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/check.png rename to account_bank_charges/static/description/assets/icons/check.png diff --git a/portal_stock_check/static/description/assets/icons/chevron.png b/account_bank_charges/static/description/assets/icons/chevron.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/chevron.png rename to account_bank_charges/static/description/assets/icons/chevron.png diff --git a/portal_stock_check/static/description/assets/icons/cogs.png b/account_bank_charges/static/description/assets/icons/cogs.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/cogs.png rename to account_bank_charges/static/description/assets/icons/cogs.png diff --git a/portal_stock_check/static/description/assets/icons/consultation.png b/account_bank_charges/static/description/assets/icons/consultation.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/consultation.png rename to account_bank_charges/static/description/assets/icons/consultation.png diff --git a/portal_stock_check/static/description/assets/icons/ecom-black.png b/account_bank_charges/static/description/assets/icons/ecom-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/ecom-black.png rename to account_bank_charges/static/description/assets/icons/ecom-black.png diff --git a/portal_stock_check/static/description/assets/icons/education-black.png b/account_bank_charges/static/description/assets/icons/education-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/education-black.png rename to account_bank_charges/static/description/assets/icons/education-black.png diff --git a/portal_stock_check/static/description/assets/icons/hotel-black.png b/account_bank_charges/static/description/assets/icons/hotel-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/hotel-black.png rename to account_bank_charges/static/description/assets/icons/hotel-black.png diff --git a/portal_stock_check/static/description/assets/icons/license.png b/account_bank_charges/static/description/assets/icons/license.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/license.png rename to account_bank_charges/static/description/assets/icons/license.png diff --git a/portal_stock_check/static/description/assets/icons/lifebuoy.png b/account_bank_charges/static/description/assets/icons/lifebuoy.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/lifebuoy.png rename to account_bank_charges/static/description/assets/icons/lifebuoy.png diff --git a/product_to_rfq_pro/static/description/assets/misc/logo.png b/account_bank_charges/static/description/assets/icons/logo.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/logo.png rename to account_bank_charges/static/description/assets/icons/logo.png diff --git a/portal_stock_check/static/description/assets/icons/manufacturing-black.png b/account_bank_charges/static/description/assets/icons/manufacturing-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/manufacturing-black.png rename to account_bank_charges/static/description/assets/icons/manufacturing-black.png diff --git a/portal_stock_check/static/description/assets/icons/pos-black.png b/account_bank_charges/static/description/assets/icons/pos-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/pos-black.png rename to account_bank_charges/static/description/assets/icons/pos-black.png diff --git a/portal_stock_check/static/description/assets/icons/puzzle.png b/account_bank_charges/static/description/assets/icons/puzzle.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/puzzle.png rename to account_bank_charges/static/description/assets/icons/puzzle.png diff --git a/portal_stock_check/static/description/assets/icons/restaurant-black.png b/account_bank_charges/static/description/assets/icons/restaurant-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/restaurant-black.png rename to account_bank_charges/static/description/assets/icons/restaurant-black.png diff --git a/portal_stock_check/static/description/assets/icons/service-black.png b/account_bank_charges/static/description/assets/icons/service-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/service-black.png rename to account_bank_charges/static/description/assets/icons/service-black.png diff --git a/portal_stock_check/static/description/assets/icons/trading-black.png b/account_bank_charges/static/description/assets/icons/trading-black.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/trading-black.png rename to account_bank_charges/static/description/assets/icons/trading-black.png diff --git a/portal_stock_check/static/description/assets/icons/training.png b/account_bank_charges/static/description/assets/icons/training.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/training.png rename to account_bank_charges/static/description/assets/icons/training.png diff --git a/portal_stock_check/static/description/assets/icons/update.png b/account_bank_charges/static/description/assets/icons/update.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/update.png rename to account_bank_charges/static/description/assets/icons/update.png diff --git a/portal_stock_check/static/description/assets/icons/user.png b/account_bank_charges/static/description/assets/icons/user.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/user.png rename to account_bank_charges/static/description/assets/icons/user.png diff --git a/portal_stock_check/static/description/assets/icons/wrench.png b/account_bank_charges/static/description/assets/icons/wrench.png old mode 100755 new mode 100644 similarity index 100% rename from portal_stock_check/static/description/assets/icons/wrench.png rename to account_bank_charges/static/description/assets/icons/wrench.png diff --git a/product_to_rfq_pro/static/description/assets/misc/categories.png b/account_bank_charges/static/description/assets/misc/categories.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/categories.png rename to account_bank_charges/static/description/assets/misc/categories.png diff --git a/product_to_rfq_pro/static/description/assets/misc/check-box.png b/account_bank_charges/static/description/assets/misc/check-box.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/check-box.png rename to account_bank_charges/static/description/assets/misc/check-box.png diff --git a/product_to_rfq_pro/static/description/assets/misc/compass.png b/account_bank_charges/static/description/assets/misc/compass.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/compass.png rename to account_bank_charges/static/description/assets/misc/compass.png diff --git a/product_to_rfq_pro/static/description/assets/misc/corporate.png b/account_bank_charges/static/description/assets/misc/corporate.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/corporate.png rename to account_bank_charges/static/description/assets/misc/corporate.png diff --git a/product_to_rfq_pro/static/description/assets/misc/customer-support.png b/account_bank_charges/static/description/assets/misc/customer-support.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/customer-support.png rename to account_bank_charges/static/description/assets/misc/customer-support.png diff --git a/product_to_rfq_pro/static/description/assets/misc/cybrosys-logo.png b/account_bank_charges/static/description/assets/misc/cybrosys-logo.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/cybrosys-logo.png rename to account_bank_charges/static/description/assets/misc/cybrosys-logo.png diff --git a/product_to_rfq_pro/static/description/assets/misc/features.png b/account_bank_charges/static/description/assets/misc/features.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/features.png rename to account_bank_charges/static/description/assets/misc/features.png diff --git a/scrap_management/static/description/assets/misc/logo.png b/account_bank_charges/static/description/assets/misc/logo.png similarity index 100% rename from scrap_management/static/description/assets/misc/logo.png rename to account_bank_charges/static/description/assets/misc/logo.png diff --git a/product_to_rfq_pro/static/description/assets/misc/pictures.png b/account_bank_charges/static/description/assets/misc/pictures.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/pictures.png rename to account_bank_charges/static/description/assets/misc/pictures.png diff --git a/product_to_rfq_pro/static/description/assets/misc/pie-chart.png b/account_bank_charges/static/description/assets/misc/pie-chart.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/pie-chart.png rename to account_bank_charges/static/description/assets/misc/pie-chart.png diff --git a/product_to_rfq_pro/static/description/assets/misc/right-arrow.png b/account_bank_charges/static/description/assets/misc/right-arrow.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/right-arrow.png rename to account_bank_charges/static/description/assets/misc/right-arrow.png diff --git a/product_to_rfq_pro/static/description/assets/misc/star.png b/account_bank_charges/static/description/assets/misc/star.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/star.png rename to account_bank_charges/static/description/assets/misc/star.png diff --git a/product_to_rfq_pro/static/description/assets/misc/support.png b/account_bank_charges/static/description/assets/misc/support.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/support.png rename to account_bank_charges/static/description/assets/misc/support.png diff --git a/product_to_rfq_pro/static/description/assets/misc/whatsapp.png b/account_bank_charges/static/description/assets/misc/whatsapp.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/misc/whatsapp.png rename to account_bank_charges/static/description/assets/misc/whatsapp.png diff --git a/digital_signature/static/description/assets/modules/1.png b/account_bank_charges/static/description/assets/modules/1.png similarity index 100% rename from digital_signature/static/description/assets/modules/1.png rename to account_bank_charges/static/description/assets/modules/1.png diff --git a/digital_signature/static/description/assets/modules/2.png b/account_bank_charges/static/description/assets/modules/2.png similarity index 100% rename from digital_signature/static/description/assets/modules/2.png rename to account_bank_charges/static/description/assets/modules/2.png diff --git a/digital_signature/static/description/assets/modules/3.png b/account_bank_charges/static/description/assets/modules/3.png similarity index 100% rename from digital_signature/static/description/assets/modules/3.png rename to account_bank_charges/static/description/assets/modules/3.png diff --git a/digital_signature/static/description/assets/modules/4.png b/account_bank_charges/static/description/assets/modules/4.png similarity index 100% rename from digital_signature/static/description/assets/modules/4.png rename to account_bank_charges/static/description/assets/modules/4.png diff --git a/digital_signature/static/description/assets/modules/5.gif b/account_bank_charges/static/description/assets/modules/5.gif similarity index 100% rename from digital_signature/static/description/assets/modules/5.gif rename to account_bank_charges/static/description/assets/modules/5.gif diff --git a/digital_signature/static/description/assets/modules/6.png b/account_bank_charges/static/description/assets/modules/6.png similarity index 100% rename from digital_signature/static/description/assets/modules/6.png rename to account_bank_charges/static/description/assets/modules/6.png diff --git a/odoo_website_helpdesk/static/description/assets/modules/gantt_image.png b/account_bank_charges/static/description/assets/modules/gantt_image.png similarity index 100% rename from odoo_website_helpdesk/static/description/assets/modules/gantt_image.png rename to account_bank_charges/static/description/assets/modules/gantt_image.png diff --git a/account_bank_charges/static/description/assets/modules/hide_menu_image.png b/account_bank_charges/static/description/assets/modules/hide_menu_image.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/account_bank_charges/static/description/assets/modules/hide_menu_image.png differ diff --git a/account_bank_charges/static/description/assets/modules/laundry_image.png b/account_bank_charges/static/description/assets/modules/laundry_image.png new file mode 100644 index 000000000..026ca78d3 Binary files /dev/null and b/account_bank_charges/static/description/assets/modules/laundry_image.png differ diff --git a/account_bank_charges/static/description/assets/modules/list_view_image.png b/account_bank_charges/static/description/assets/modules/list_view_image.png new file mode 100644 index 000000000..cb3435fe7 Binary files /dev/null and b/account_bank_charges/static/description/assets/modules/list_view_image.png differ diff --git a/account_bank_charges/static/description/assets/modules/print_image.png b/account_bank_charges/static/description/assets/modules/print_image.png new file mode 100644 index 000000000..8d5c3ea3f Binary files /dev/null and b/account_bank_charges/static/description/assets/modules/print_image.png differ diff --git a/account_bank_charges/static/description/assets/screenshots/1.png b/account_bank_charges/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c81fd4371 Binary files /dev/null and b/account_bank_charges/static/description/assets/screenshots/1.png differ diff --git a/account_bank_charges/static/description/assets/screenshots/2.png b/account_bank_charges/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..80e8cbf0f Binary files /dev/null and b/account_bank_charges/static/description/assets/screenshots/2.png differ diff --git a/account_bank_charges/static/description/assets/screenshots/3.png b/account_bank_charges/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..d4748c2b5 Binary files /dev/null and b/account_bank_charges/static/description/assets/screenshots/3.png differ diff --git a/account_bank_charges/static/description/assets/screenshots/4.png b/account_bank_charges/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4a35a18ea Binary files /dev/null and b/account_bank_charges/static/description/assets/screenshots/4.png differ diff --git a/account_bank_charges/static/description/assets/screenshots/hero.gif b/account_bank_charges/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..b715f5f60 Binary files /dev/null and b/account_bank_charges/static/description/assets/screenshots/hero.gif differ diff --git a/account_bank_charges/static/description/banner.png b/account_bank_charges/static/description/banner.png new file mode 100644 index 000000000..42baa27cb Binary files /dev/null and b/account_bank_charges/static/description/banner.png differ diff --git a/account_bank_charges/static/description/icon.png b/account_bank_charges/static/description/icon.png new file mode 100644 index 000000000..638f6b7ab Binary files /dev/null and b/account_bank_charges/static/description/icon.png differ diff --git a/account_bank_charges/static/description/index.html b/account_bank_charges/static/description/index.html new file mode 100644 index 000000000..46524fc44 --- /dev/null +++ b/account_bank_charges/static/description/index.html @@ -0,0 +1,542 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ + + +

Account Bank Charges In Payment

+

This Module Allows to Add Separate Journal Entries for Bank Charges in Payment

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
This module allows us to have separate journal + entries for bank charges.Having separate journal entries for bank + charges is a useful feature in accounting software or financial systems. + This capability allows businesses to accurately track and account for + bank charges incurred during various financial transactions.
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ +
+ Configure default bank charges account + We can add default bank charges account in bank journal. +
+
+ +
+ +
+ Add Bank Charges while registering payment + We can add bank charges in the payment wizard which appears after we click register payment button. +
+
+ +
+
+
+ +
+ Creates a separate Journal entry for bank charges + +
+
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Add default bank charge amount in the chart of accounts

+

+ +
+
+

Configure default bank charges account

+

We can add default bank charges account in bank journal.

+ +
+
+

Default Bank Charges Amount will be visible while registering payment

+

We can change bank charges amount in the payment wizard which appears after we click register payment button.

+ +
+
+

Creates a separate Journal entry for bank charges

+

+ +
+
+
+ + + +
+
+
+

Related Modules

+

Explore our related modules

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

Our Services +

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

Our + Industries +

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

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

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

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

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

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/account_bank_charges/views/account_account_views.xml b/account_bank_charges/views/account_account_views.xml new file mode 100644 index 000000000..95fbee3cd --- /dev/null +++ b/account_bank_charges/views/account_account_views.xml @@ -0,0 +1,15 @@ + + + + + view.account.form.inherit.account.bank.charge + account.account + + + + + + + + diff --git a/account_bank_charges/views/account_journal_views.xml b/account_bank_charges/views/account_journal_views.xml new file mode 100644 index 000000000..bcbfead46 --- /dev/null +++ b/account_bank_charges/views/account_journal_views.xml @@ -0,0 +1,16 @@ + + + + + + account.journal.view.form.inherit.account.bank.charges + + account.journal + + + + + + + + diff --git a/account_bank_charges/views/account_payment_register_views.xml b/account_bank_charges/views/account_payment_register_views.xml new file mode 100644 index 000000000..8e69a76fd --- /dev/null +++ b/account_bank_charges/views/account_payment_register_views.xml @@ -0,0 +1,21 @@ + + + + + + account.payment.register.view.form.inherit.account.bank.charges + + account.payment.register + + + + + + + + diff --git a/account_interest_on_overdue_invoice/README.rst b/account_interest_on_overdue_invoice/README.rst new file mode 100644 index 000000000..b9f7fff4b --- /dev/null +++ b/account_interest_on_overdue_invoice/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Interest for Overdue Invoice +============================ +* Easy to calculate Interest for Overdue invoices. +* It will manage journal items while you calculate amount in invoice. +* you can use different accounts for interest journal entries from payment terms menu +* Interest can be calculated for different period ratios (daily, weekly and monthly) + +Configuration +============ +No additional configurations needed + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developers: (V15) Naveen Krishna T, + (V16) Ayana KP, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.co + +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/account_interest_on_overdue_invoice/__init__.py b/account_interest_on_overdue_invoice/__init__.py new file mode 100644 index 000000000..555bddcff --- /dev/null +++ b/account_interest_on_overdue_invoice/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP(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 models diff --git a/account_interest_on_overdue_invoice/__manifest__.py b/account_interest_on_overdue_invoice/__manifest__.py new file mode 100644 index 000000000..5750eabba --- /dev/null +++ b/account_interest_on_overdue_invoice/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP(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': 'Interest for Overdue Invoice', + 'version': '16.0.1.0.0', + 'category': 'Accounting', + 'summary': """This module helps to manage Interest on Overdue Invoices.""", + 'description': """This module helps to calculate daily, weekly or monthly + Interest for Overdue Invoices based on payment term configuration. """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale', 'account'], + 'data': [ + 'views/account_payment_term_views.xml', + 'views/account_move_views.xml', + 'data/ir_cron_data.xml', + 'views/report_invoice.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/account_interest_on_overdue_invoice/data/ir_cron_data.xml b/account_interest_on_overdue_invoice/data/ir_cron_data.xml new file mode 100644 index 000000000..65cd2cba2 --- /dev/null +++ b/account_interest_on_overdue_invoice/data/ir_cron_data.xml @@ -0,0 +1,18 @@ + + + + + + Account:Daily Invoice Interest check + + code + model._get_interest_check() + + + 1 + days + -1 + + + + \ No newline at end of file diff --git a/account_interest_on_overdue_invoice/doc/RELEASE_NOTES.md b/account_interest_on_overdue_invoice/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..3bc712718 --- /dev/null +++ b/account_interest_on_overdue_invoice/doc/RELEASE_NOTES.md @@ -0,0 +1,8 @@ +## Module +#### 04.03.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Interest for Overdue Invoice. + + + diff --git a/account_interest_on_overdue_invoice/models/__init__.py b/account_interest_on_overdue_invoice/models/__init__.py new file mode 100644 index 000000000..3432451e8 --- /dev/null +++ b/account_interest_on_overdue_invoice/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP(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 account_move +from . import account_payment_term diff --git a/account_interest_on_overdue_invoice/models/account_move.py b/account_interest_on_overdue_invoice/models/account_move.py new file mode 100644 index 000000000..067ab0ef3 --- /dev/null +++ b/account_interest_on_overdue_invoice/models/account_move.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP(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 . +# +############################################################################# +import math + +from dateutil import relativedelta + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class AccountMoves(models.Model): + """ Extending model Invoice model to compute the interest amount for + overdue invoices based on the chosen payment term configurations.""" + + _inherit = "account.move" + + interest_amount = fields.Monetary(string='Interest Amount', readonly=True, + help='The amount of interest accrued.') + interest_overdue_act = fields.Boolean(related="invoice_payment_term_id" + ".interest_overdue_act", + help='Flag indicating whether overdue interest is active.') + interest_calculated_period = fields.Char(string="Interest calculated date", + help='The date when interest was calculated.') + interest_type = fields.Selection(related="invoice_payment_term_id" + ".interest_type", + help='The type of interest applied.') + interest_percentage = fields.Float(related="invoice_payment_term_id" + ".interest_percentage", + help='The percentage rate of interest applied.') + + def get_period_time(self, today_date): + """ Compute period duration based on Interest duration type. """ + self.ensure_one() + r_obj = relativedelta. \ + relativedelta(today_date, self.invoice_date_due) + if self.invoice_payment_term_id.interest_type == 'monthly': + period = (r_obj.years * 12) + r_obj.months + if r_obj and r_obj.days > 0: + period = period + 1 + elif self.invoice_payment_term_id.interest_type == 'weekly': + period = math.ceil( + (today_date - self.invoice_date_due).days / 7) + else: + period = (today_date - self.invoice_date_due).days + return period + + def action_interest_compute(self): + """ Action for computing Interest amount based on the chosen payment + term configurations""" + today_date = fields.Date.today() + for rec in self: + if rec.invoice_date_due \ + and rec.invoice_date_due < fields.Date.today() \ + and rec.state == 'draft' \ + and rec.move_type == 'out_invoice' \ + and rec.interest_overdue_act \ + and rec.invoice_payment_term_id.interest_percentage > 0: + period = rec.get_period_time(today_date) + if rec.invoice_payment_term_id.interest_type == 'monthly': + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-m": + raise ValidationError(_('Your payment term is ' + 'monthly, and you can update ' + 'it only once in a month.')) + rec.interest_calculated_period = str(period) + "-m" + elif rec.invoice_payment_term_id.interest_type == 'weekly': + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-w": + raise ValidationError(_('Your payment term is weekly, ' + 'and you can update it only ' + 'once in a week.')) + rec.interest_calculated_period = str(period) + "-w" + else: + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-d": + raise ValidationError(_('Your payment term is daily, ' + 'and you can update it only ' + 'once in a day.')) + rec.interest_calculated_period = str(period) + "-d" + interest_line = rec.invoice_line_ids.search( + [('name', '=', 'Interest Amount for Overdue'), + ('move_id', '=', rec.id)], + limit=1) + if interest_line: + rec.invoice_line_ids = ([(2, interest_line.id, 0)]) + rec.interest_amount = rec.amount_total * rec \ + .invoice_payment_term_id.interest_percentage * period / 100 + vals = {'name': 'Interest Amount for Overdue', + 'price_unit': rec.interest_amount, + 'quantity': 1, + } + if rec.invoice_payment_term_id.interest_account_id: + vals.update({ + 'account_id': rec.invoice_payment_term_id + .interest_account_id.id}) + if rec.interest_amount > 0: + rec.invoice_line_ids = ([(0, 0, vals)]) + elif rec.interest_amount > 0: + rec.action_interest_reset() + + def _get_interest_check(self): + """ Method for Interest computation via scheduled action """ + + today_date = fields.Date.today() + for rec in self.sudo().search([('state', '=', 'draft')]): + if rec.invoice_date_due and rec.invoice_date_due < today_date \ + and rec.state == 'draft' \ + and rec.move_type == 'out_invoice' \ + and rec.interest_overdue_act \ + and rec.invoice_payment_term_id.interest_percentage > 0: + period = rec.get_period_time(today_date) + if rec.invoice_payment_term_id.interest_type == 'monthly': + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-m": + continue + rec.interest_calculated_period = str(period) + "-m" + elif rec.invoice_payment_term_id.interest_type == 'weekly': + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-w": + continue + rec.interest_calculated_period = str(period) + "-w" + else: + if rec.interest_calculated_period \ + and rec.interest_calculated_period == str(period) \ + + "-d": + continue + rec.interest_calculated_period = str(period) + "-d" + interest_line = rec.invoice_line_ids.search( + [('name', '=', 'Interest Amount for Overdue'), + ('move_id', '=', rec.id)], limit=1) + if interest_line: + rec.invoice_line_ids = ([(2, interest_line.id, 0)]) + rec.interest_amount = rec.amount_total * rec \ + .invoice_payment_term_id.interest_percentage * period / 100 + vals = {'name': 'Interest Amount for Overdue', + 'price_unit': rec.interest_amount, + 'quantity': 1, + } + if rec.invoice_payment_term_id.interest_account_id: + vals.update({ + 'account_id': rec.invoice_payment_term_id. + interest_account_id.id}) + if rec.interest_amount > 0: + rec.invoice_line_ids = ([(0, 0, vals)]) + elif rec.interest_amount > 0: + rec.action_interest_reset() + + def action_interest_reset(self): + """Method for resetting the interest lines and Interest amount in + Invoice""" + self.interest_amount = 0 + interest_line = self.invoice_line_ids.search( + [('name', '=', 'Interest Amount for Overdue'), + ('move_id', '=', self.id)], limit=1) + if interest_line: + self.invoice_line_ids = ([(2, interest_line.id, 0)]) + self.interest_calculated_period = False + + @api.onchange('invoice_payment_term_id', 'invoice_line_ids', + 'invoice_date_due') + def _onchange_invoice_payment_term_id(self): + """Method for removing interest from Invoice when user changes dependent + values of interest.""" + for rec in self: + if rec.move_type == 'out_invoice': + rec.interest_amount = 0 + interest_line = rec.invoice_line_ids.search( + [('name', '=', 'Interest Amount for Overdue')], limit=1) + if interest_line: + rec.invoice_line_ids = ([(2, interest_line.id, 0)]) + rec.interest_calculated_period = False + return diff --git a/account_interest_on_overdue_invoice/models/account_payment_term.py b/account_interest_on_overdue_invoice/models/account_payment_term.py new file mode 100644 index 000000000..88e4fbb21 --- /dev/null +++ b/account_interest_on_overdue_invoice/models/account_payment_term.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP(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 api, fields, models, _ +from odoo.exceptions import ValidationError + + +class AccountPaymentTerms(models.Model): + """ Module for extending account.payment.term model to add interest + computation configuration features for computation of Interest in overdue + invoices.""" + + _inherit = "account.payment.term" + + interest_overdue_act = fields.Boolean(default=False, string="Interest on " + "Overdue " + "Invoices", + help="Activate Interest computation " + "for this Payment term.") + interest_type = fields.Selection( + string='Interest Type', help="Base duration for interest calculation", + selection=[('daily', 'Daily'), + ('weekly', 'Weekly'), + ('monthly', 'Monthly')], + default='daily', copy=False) + interest_percentage = fields\ + .Float(string="Interest Percentage", default="0", digits=(12, 6), + help="Interest percentage ratio per selected Interest type " + "duration.") + interest_account_id = fields.Many2one('account.account', + string='Account for Interest', + company_dependent=True, + domain="[('deprecated', '=', " + "False),('internal_group'," + "'=','income'), " + "('is_off_balance', '=', " + "False)]", + help="Account used for creating " + "accounting entries.") + + @api.constrains('interest_percentage') + def _check_interest_percentage(self): + """ check constrains for validating the interest rate in percentage + is not negative""" + for rec in self: + if rec.interest_overdue_act and rec.interest_percentage <= 0: + raise ValidationError(_('Enter Positive value as Interest ' + 'percentage')) diff --git a/product_to_rfq_pro/static/description/assets/icons/check.png b/account_interest_on_overdue_invoice/static/description/assets/icons/check.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/check.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/check.png diff --git a/product_to_rfq_pro/static/description/assets/icons/chevron.png b/account_interest_on_overdue_invoice/static/description/assets/icons/chevron.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/chevron.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/chevron.png diff --git a/product_to_rfq_pro/static/description/assets/icons/cogs.png b/account_interest_on_overdue_invoice/static/description/assets/icons/cogs.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/cogs.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/cogs.png diff --git a/product_to_rfq_pro/static/description/assets/icons/consultation.png b/account_interest_on_overdue_invoice/static/description/assets/icons/consultation.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/consultation.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/consultation.png diff --git a/product_to_rfq_pro/static/description/assets/icons/ecom-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/ecom-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/ecom-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/ecom-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/education-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/education-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/education-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/education-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/hotel-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/hotel-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/hotel-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/hotel-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/license.png b/account_interest_on_overdue_invoice/static/description/assets/icons/license.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/license.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/license.png diff --git a/product_to_rfq_pro/static/description/assets/icons/lifebuoy.png b/account_interest_on_overdue_invoice/static/description/assets/icons/lifebuoy.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/lifebuoy.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/lifebuoy.png diff --git a/web_portal_attendance/static/description/assets/misc/logo.png b/account_interest_on_overdue_invoice/static/description/assets/icons/logo.png similarity index 100% rename from web_portal_attendance/static/description/assets/misc/logo.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/logo.png diff --git a/product_to_rfq_pro/static/description/assets/icons/manufacturing-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/manufacturing-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/manufacturing-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/manufacturing-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/pos-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/pos-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/pos-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/pos-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/puzzle.png b/account_interest_on_overdue_invoice/static/description/assets/icons/puzzle.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/puzzle.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/puzzle.png diff --git a/product_to_rfq_pro/static/description/assets/icons/restaurant-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/restaurant-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/restaurant-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/restaurant-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/service-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/service-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/service-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/service-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/trading-black.png b/account_interest_on_overdue_invoice/static/description/assets/icons/trading-black.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/trading-black.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/trading-black.png diff --git a/product_to_rfq_pro/static/description/assets/icons/training.png b/account_interest_on_overdue_invoice/static/description/assets/icons/training.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/training.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/training.png diff --git a/product_to_rfq_pro/static/description/assets/icons/update.png b/account_interest_on_overdue_invoice/static/description/assets/icons/update.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/update.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/update.png diff --git a/product_to_rfq_pro/static/description/assets/icons/user.png b/account_interest_on_overdue_invoice/static/description/assets/icons/user.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/user.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/user.png diff --git a/product_to_rfq_pro/static/description/assets/icons/wrench.png b/account_interest_on_overdue_invoice/static/description/assets/icons/wrench.png similarity index 100% rename from product_to_rfq_pro/static/description/assets/icons/wrench.png rename to account_interest_on_overdue_invoice/static/description/assets/icons/wrench.png diff --git a/account_interest_on_overdue_invoice/static/description/assets/modules/1.png b/account_interest_on_overdue_invoice/static/description/assets/modules/1.png new file mode 100644 index 000000000..624ef69b7 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/modules/1.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/modules/2.png b/account_interest_on_overdue_invoice/static/description/assets/modules/2.png new file mode 100644 index 000000000..b8ea6b411 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/modules/2.png differ diff --git a/website_portal_events/static/description/assets/modules/4.png b/account_interest_on_overdue_invoice/static/description/assets/modules/3.png similarity index 100% rename from website_portal_events/static/description/assets/modules/4.png rename to account_interest_on_overdue_invoice/static/description/assets/modules/3.png diff --git a/login_using_qr/static/description/assets/modules/2.png b/account_interest_on_overdue_invoice/static/description/assets/modules/4.png similarity index 100% rename from login_using_qr/static/description/assets/modules/2.png rename to account_interest_on_overdue_invoice/static/description/assets/modules/4.png diff --git a/account_interest_on_overdue_invoice/static/description/assets/modules/5.gif b/account_interest_on_overdue_invoice/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/modules/5.gif differ diff --git a/website_portal_events/static/description/assets/modules/5.png b/account_interest_on_overdue_invoice/static/description/assets/modules/6.png similarity index 100% rename from website_portal_events/static/description/assets/modules/5.png rename to account_interest_on_overdue_invoice/static/description/assets/modules/6.png diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/1.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..08b0d3d1e Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/1.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/2.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..4d0e72ec2 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/2.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/3.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..c5ddaf143 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/3.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/4.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..f83521343 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/4.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/5.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..daab5c208 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/5.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/6.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..c742249f0 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/6.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/7.png b/account_interest_on_overdue_invoice/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..8d00dce53 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/7.png differ diff --git a/account_interest_on_overdue_invoice/static/description/assets/screenshots/v16-hero.gif b/account_interest_on_overdue_invoice/static/description/assets/screenshots/v16-hero.gif new file mode 100644 index 000000000..30107bb96 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/assets/screenshots/v16-hero.gif differ diff --git a/account_interest_on_overdue_invoice/static/description/banner.png b/account_interest_on_overdue_invoice/static/description/banner.png new file mode 100644 index 000000000..bb4e99d88 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/banner.png differ diff --git a/account_interest_on_overdue_invoice/static/description/icon.png b/account_interest_on_overdue_invoice/static/description/icon.png new file mode 100644 index 000000000..06797a7e0 Binary files /dev/null and b/account_interest_on_overdue_invoice/static/description/icon.png differ diff --git a/account_interest_on_overdue_invoice/static/description/index.html b/account_interest_on_overdue_invoice/static/description/index.html new file mode 100644 index 000000000..706347e4c --- /dev/null +++ b/account_interest_on_overdue_invoice/static/description/index.html @@ -0,0 +1,654 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+
+
+
+

+ Interest for Overdue Invoice

+

+ A Module For Interest for Overdue Invoice Calculation while Creating Invoice +

+ +
+
+ +
+
+

+ Overview +

+
+
+

+ This Odoo apps is helps to calculate daily,weekly or monthly + Interest Penalty on Overdue Invoices based on payment term + configuration.Payment term is something that accountant emphasis + on most , delay payment can cost as late payment fee , so when + payment get overdue , interest needs to be charges in order to + get payment sooner, this odoo module does perfect job by helping + you to calculate interest on overdue invoices. Calculation of + interest will be done based on invoice due date and payment + term. +

+
+
+
+
+

+ Features +

+
+
+
+ +
+
+

+ Easy to Calculate Interest for Overdue Invoices.

+
+
+
+
+ +
+
+

+ This module will manage journal items while you calculate + Interest in overdue invoice.

+
+
+
+
+ +
+
+

+ You can use different accounts for interest journal entries + from payment terms menu

+
+
+
+
+ +
+
+

+ Also, Interest can be calculated for different period ratios + (daily, weekly and monthly)

+
+
+
+
+
+

+ Screenshots +

+
+
+

+ Set Payment Term

+

+ Enable the checkbox in payment term configuration to get the + Interest calculation in Overdue invoices for the selected + payment term. And set the values required for interest calculation, and the + account for interest jornal entries can be changed from here. + This is the details example for immediate payment term with + daily period based interest.

+ +
+
+

+ Selecting Payment Term in Invoice

+

+ After the payment configuration we can use that payment term in + invoice creation. Also set the + invoice details ,use the update interest button to calculate + interest +

+ +
+ +
+

+ Interest for Overdue

+

+ Here you can get updated value of interest and amount. +

+ +
+
+

+ Scheduled Action

+

+ You can also enable this automatic script for automatic interest update. +

+ +
+
+

+ Warnings

+

+ Warning on updating invoice twice or more in a selected interest + period. +

+ +
+
+

+ Invoice PDF

+

+ The interest details are included in new invoices +

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

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

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

Need Help?

+
+
+
+ +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
diff --git a/account_interest_on_overdue_invoice/views/account_move_views.xml b/account_interest_on_overdue_invoice/views/account_move_views.xml new file mode 100644 index 000000000..efa00f6a3 --- /dev/null +++ b/account_interest_on_overdue_invoice/views/account_move_views.xml @@ -0,0 +1,26 @@ + + + + + account.move.view.form.inherit.account.interest.on.overdue.invoice + account.move + + + + + - + + + 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 @@ + + + + + + diff --git a/pos_kitchen_screen_odoo/views/kitchen_screen_views.xml b/pos_kitchen_screen_odoo/views/kitchen_screen_views.xml index 19035ae5a..450719f64 100644 --- a/pos_kitchen_screen_odoo/views/kitchen_screen_views.xml +++ b/pos_kitchen_screen_odoo/views/kitchen_screen_views.xml @@ -65,7 +65,7 @@