diff --git a/advanced_loan_management/__manifest__.py b/advanced_loan_management/__manifest__.py index 7e3e48659..97e32788f 100644 --- a/advanced_loan_management/__manifest__.py +++ b/advanced_loan_management/__manifest__.py @@ -33,12 +33,12 @@ 'maintainer': 'Cybrosys Techno Solutions', 'website': 'https://www.cybrosys.com', 'depends': ['mail', 'account', 'base',], - 'demo': ['data/loan_journal_data.xml'], 'data': [ 'security/loan_management_groups.xml', 'security/loan_management_security.xml', 'security/ir.model.access.csv', 'data/ir_sequence_data.xml', + 'data/loan_journal_data.xml', 'views/loan_type_views.xml', 'views/loan_request_views.xml', 'views/repayment_lines_views.xml', diff --git a/advanced_loan_management/data/loan_journal_data.xml b/advanced_loan_management/data/loan_journal_data.xml index c3326f22b..18e3353ed 100644 --- a/advanced_loan_management/data/loan_journal_data.xml +++ b/advanced_loan_management/data/loan_journal_data.xml @@ -1,6 +1,6 @@ - + diff --git a/advanced_loan_management/models/account_payment_register.py b/advanced_loan_management/models/account_payment_register.py index b75a227e5..541e9ba77 100644 --- a/advanced_loan_management/models/account_payment_register.py +++ b/advanced_loan_management/models/account_payment_register.py @@ -1,24 +1,3 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Megha (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -################################################################################ from odoo import models @@ -34,4 +13,4 @@ class AccountPaymentRegister(models.TransientModel): loan_line_id = self.env['repayment.line'].search([ ('name', 'ilike', record.communication)]) loan_line_id.write({'state': 'paid'}) - return res + return res \ No newline at end of file diff --git a/advanced_loan_management/models/loan_request.py b/advanced_loan_management/models/loan_request.py index 7e79485ae..dfd42eb10 100644 --- a/advanced_loan_management/models/loan_request.py +++ b/advanced_loan_management/models/loan_request.py @@ -1,24 +1,3 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Megha (odoo@cybrosys.com) -# -# 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 datetime import datetime from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ @@ -235,17 +214,29 @@ selection=[('draft', 'Draft'), ('confirmed', 'Confirmed'), def action_compute_repayment(self): """This automatically create the installment the employee need to pay to - company based on payment start date and the no of installments. + company based on payment start date and the no of rstallments. """ self.request = True for loan in self: loan.repayment_lines_ids.unlink() - date_start = datetime.strptime(str(loan.date),'%Y-%m-%d') + relativedelta(months=1) + date_start = datetime.strptime(str(loan.date), '%Y-%m-%d') + relativedelta(months=1) amount = loan.loan_amount / loan.tenure interest = loan.loan_amount * loan.interest_rate interest_amount = interest / loan.tenure total_amount = amount + interest_amount - partner = self.partner_id + partner = loan.partner_id + + # Retrieve account IDs with error handling + try: + interest_account_id = self.env.ref('advanced_loan_management.loan_management_inrst_accounts').id + except ValueError: + raise UserError("Interest account configuration is missing. Please check the configuration.") + + try: + repayment_account_id = self.env.ref('advanced_loan_management.demo_loan_accounts').id + except ValueError: + raise UserError("Repayment account configuration is missing. Please check the configuration.") + for rand_num in range(1, loan.tenure + 1): self.env['repayment.line'].create({ 'name': f"{loan.name}/{rand_num}", @@ -254,12 +245,10 @@ selection=[('draft', 'Draft'), ('confirmed', 'Confirmed'), 'amount': amount, 'interest_amount': interest_amount, 'total_amount': total_amount, - 'interest_account_id': self.env.ref('advanced_loan_management.' - 'loan_management_' - 'inrst_accounts').id, - 'repayment_account_id': self.env.ref('advanced_loan_management.' - 'demo_' - 'loan_accounts').id, - 'loan_id': loan.id}) + 'interest_account_id': interest_account_id, + 'repayment_account_id': repayment_account_id, + 'loan_id': loan.id + }) date_start += relativedelta(months=1) + return True diff --git a/crm_kit/README.rst b/crm_kit/README.rst deleted file mode 100755 index 1b86d443d..000000000 --- a/crm_kit/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -CRM Kit -======= -Complete CRM Kit for odoo17. - -Configuration -============= -* No additional configurations needed - -Company -------- -* `Cybrosys Techno Solutions `__ - -License -------- -General Public License, Version 3 (AGPL v3). -(https://www.gnu.org/licenses/agpl-3.0-standalone.html) - -Credits -------- -* Developer: (V17) Bhagyadev KP -* 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/crm_kit/__init__.py b/crm_kit/__init__.py deleted file mode 100644 index ca859654a..000000000 --- a/crm_kit/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from . import controllers -from . import models -from . import wizard - diff --git a/crm_kit/__manifest__.py b/crm_kit/__manifest__.py deleted file mode 100644 index 86178c379..000000000 --- a/crm_kit/__manifest__.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -{ - "name": "CRM Kit", - "version": '17.0.1.0.1', - "category": 'Sales', - 'summary': """Complete CRM Kit for odoo 17""", - 'description': """Complete CRM Kit for odoo 17, CRM, CRM dashboard, - crm commission, commission plan, crm features""", - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.cybrosys.com", - "depends": ['sale_management', 'crm', 'crm_dashboard'], - "data": [ - 'security/ir.model.access.csv', - 'views/crm_commission_views.xml', - 'views/crm_team_views.xml', - 'views/res_users_views.xml', - 'wizard/commission_report_views.xml', - ], - 'assets': { - 'web.assets_backend': [ - 'crm_kit/static/src/js/action_manager.js', - ], - }, - 'images': [ - 'static/description/banner.png', - ], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/crm_kit/controllers/__init__.py b/crm_kit/controllers/__init__.py deleted file mode 100644 index dad785a4e..000000000 --- a/crm_kit/controllers/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from . import crm_kit diff --git a/crm_kit/controllers/crm_kit.py b/crm_kit/controllers/crm_kit.py deleted file mode 100644 index 8ac181bc6..000000000 --- a/crm_kit/controllers/crm_kit.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -import json -from odoo import http -from odoo.http import content_disposition, request -from odoo.tools import html_escape - - -class XLSXReportController(http.Controller): - @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) - def get_report_xlsx(self, model, options, output_format, report_name, **kw): - """ - Generate an XLSX report based on the provided data and return it as a response. - """ - uid = request.session.uid - report_obj = request.env[model].with_user(uid) - options = json.loads(options) - token = 'dummy-because-api-expects-one' - try: - if output_format == 'xlsx': - response = request.make_response( - None, - headers=[ - ('Content-Type', 'application/vnd.ms-excel'), - ('Content-Disposition', content_disposition(report_name + '.xlsx')) - ] - ) - report_obj.get_xlsx_report(options, response) - response.set_cookie('fileToken', token) - return response - except Exception as e: - se = http.serialize_exception(e) - error = { - 'code': 200, - 'message': 'Odoo Server Error', - 'data': se - } - return request.make_response(html_escape(json.dumps(error))) diff --git a/crm_kit/doc/RELEASE_NOTES.md b/crm_kit/doc/RELEASE_NOTES.md deleted file mode 100644 index 43890104a..000000000 --- a/crm_kit/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,11 +0,0 @@ -## Module - -#### 20.01.2024 -#### Version 17.0.1.0.0 -#### ADD -- Initial commit for CRM Kit - -#### 02.07.2024 -#### Version 17.0.1.0.1 -#### FIX -- Fixed the registry addition bug on report action manager \ No newline at end of file diff --git a/crm_kit/models/__init__.py b/crm_kit/models/__init__.py deleted file mode 100644 index 149580597..000000000 --- a/crm_kit/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from . import commision_graduated -from . import commision_product -from . import crm_commision -from . import crm_team -from . import res_users - diff --git a/crm_kit/models/commision_graduated.py b/crm_kit/models/commision_graduated.py deleted file mode 100644 index 77c5a8530..000000000 --- a/crm_kit/models/commision_graduated.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from odoo import exceptions -from odoo import api, fields, models, _ - - -class CommissionGraduated(models.Model): - """ - This class represents Commission Revenue Graduated Wise. - """ - _name = 'commission.graduated' - _description = 'Commission Revenue Graduated Wise' - - graduated_commission_rate = fields.Float(string='Commission rate (%)', - help="Graduated Commission rate") - amount_from = fields.Float(string="From Amount", help='Amount from') - amount_to = fields.Float(string="To Amount", help='Amount to') - commission_id = fields.Many2one("crm.commission", - string="Commission", - help="Commission for graduation") - sequence = fields.Integer(string='Sequence', compute='_compute_sequence', - store=True, help="sequence") - - @api.depends('commission_id') - def _compute_sequence(self): - """ - Add a sequence - """ - number = 1 - seq = self.mapped('commission_id') - for rule in seq.revenue_grd_comm_ids: - rule.sequence = number - number += 1 - - @api.constrains("amount_from", "amount_to") - def _check_amounts(self): - """ - Check the validity of 'amount_from' and 'amount_to' values. - - :raise exceptions.ValidationError: If 'amount_to' is less than - 'amount_from'. - :return: None - """ - for rec in self: - if rec.amount_to < rec.amount_from: - raise exceptions.ValidationError( - _("The From Amount limit cannot be greater than To Amount.") - ) diff --git a/crm_kit/models/commision_product.py b/crm_kit/models/commision_product.py deleted file mode 100644 index c9caa42b7..000000000 --- a/crm_kit/models/commision_product.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from odoo import fields, models - - -class CommissionProduct(models.Model): - """ - This class represents Commission Product Wise. - - This model is used to define commission rates and maximum commission amounts - for different products. - """ - _name = 'commission.product' - _description = 'Commission Product Wise' - - user_id = fields.Many2one('res.users') - category_id = fields.Many2one('product.category', string='Product Category', - help="Category of the product") - product_id = fields.Many2one('product.product', string='Product', - domain="[('categ_id', '=', category_id)]", - help="Product") - percentage = fields.Float(string='Rate in Percentage (%)', - help="Rate in percentage") - amount = fields.Monetary(string='Maximum Commission Amount', default=0.0, - help="Maximum Commission Amount") - currency_id = fields.Many2one("res.currency", string="Currency", - default=lambda self: - self.env.user.company_id.currency_id.id, - help="Currency") - commission_id = fields.Many2one("crm.commission", - string="Commission", help="Commission") diff --git a/crm_kit/models/crm_commision.py b/crm_kit/models/crm_commision.py deleted file mode 100644 index e175063ee..000000000 --- a/crm_kit/models/crm_commision.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from odoo import exceptions -from odoo import api, fields, models, _ - - -class CrmCommission(models.Model): - """ - This class represents the Commission Plan. - """ - _name = 'crm.commission' - _description = 'CRM Commission' - _rec_name = "name" - _inherit = ['mail.thread', 'mail.activity.mixin'] - - name = fields.Char('Name', required=True, help="Name of the Commission") - active = fields.Boolean('Active', default=True, help="Active") - date_from = fields.Date(string="From Date", required=True, help="Date from") - date_to = fields.Date(string="To Date", required=True, help="Date to") - type = fields.Selection( - [('product', 'Product wise'), - ('revenue', 'Revenue wise')], string="Type", - default="product", help='Type of the commission plan') - team_id = fields.Many2one('crm.team', string='Sales Team', - help="CRM Team") - user_id = fields.Many2one('res.users', string='Salesperson', - help="Sales person") - product_comm_ids = fields.One2many('commission.product', 'commission_id', - string="Product Wise", - help='Commission Product') - straight_commission_rate = fields.Float(string='Commission rate (%)', - help='Straight Commission Rate') - revenue_grd_comm_ids = fields.One2many( - 'commission.graduated', - 'commission_id', - string="Revenue Graduated Wise", help='Revenue graduated wise') - - revenue_type = fields.Selection( - [('straight', 'Straight Commission'), - ('graduated', 'Graduated Commission')], - string="Revenue Type", help='Revenue Type') - - @api.constrains("date_from", "date_to") - def _check_date(self): - """ - Check the validity of date range. - - This method checks whether the 'date_from' is not later than 'date_to'. - - :raise exceptions.ValidationError: If 'date_from' is later than 'date_to'. - """ - for rec in self: - if rec.date_to < rec.date_from: - raise exceptions.ValidationError( - _("The From date cannot be earlier than To date.") - ) - - @api.onchange('type') - def _onchange_type(self): - """ - Handle the 'type' field change. - This method handles the 'type' field change and performs actions - accordingly. - """ - if self.type == 'revenue': - self.product_comm_ids = [(5, 0, 0)] - elif self.type == 'product': - self.revenue_type = False - self.straight_commission_rate = False - self.revenue_grd_comm_ids = [(5, 0, 0)] diff --git a/crm_kit/models/crm_team.py b/crm_kit/models/crm_team.py deleted file mode 100644 index 16b804cb3..000000000 --- a/crm_kit/models/crm_team.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from odoo import fields, models - - -class CrmTeam(models.Model): - """ - This class inherits from 'crm.team' and add a field commission_id. - """ - _inherit = 'crm.team' - - commission_id = fields.Many2one('crm.commission', - string='Commission Plan', - help='Commission Plan') diff --git a/crm_kit/models/res_users.py b/crm_kit/models/res_users.py deleted file mode 100644 index cdbcdf648..000000000 --- a/crm_kit/models/res_users.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from odoo import fields, models - - -class ResUsers(models.Model): - """ - This class inherits from 'res.users' and add a field commission_id. - """ - _inherit = 'res.users' - - commission_id = fields.Many2one('crm.commission', - string='Commission Plan', - help='Commission plan') diff --git a/crm_kit/security/ir.model.access.csv b/crm_kit/security/ir.model.access.csv deleted file mode 100644 index 736d40ebc..000000000 --- a/crm_kit/security/ir.model.access.csv +++ /dev/null @@ -1,5 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_commission_plan_user,crm.commission.user,model_crm_commission,base.group_user,1,1,1,1 -access_commission_product_user,commission.product.user,model_commission_product,base.group_user,1,1,1,1 -access_commission_report_user,commission.report.user,model_commission_report,base.group_user,1,1,1,1 -access_commission_graduated_user,commission.graduated.user,model_commission_graduated,base.group_user,1,1,1,1 diff --git a/crm_kit/static/description/assets/icons/capture (1).png b/crm_kit/static/description/assets/icons/capture (1).png deleted file mode 100644 index 8824deafc..000000000 Binary files a/crm_kit/static/description/assets/icons/capture (1).png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/check.png b/crm_kit/static/description/assets/icons/check.png deleted file mode 100644 index c8e85f51d..000000000 Binary files a/crm_kit/static/description/assets/icons/check.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/chevron.png b/crm_kit/static/description/assets/icons/chevron.png deleted file mode 100644 index 2089293d6..000000000 Binary files a/crm_kit/static/description/assets/icons/chevron.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/cogs.png b/crm_kit/static/description/assets/icons/cogs.png deleted file mode 100644 index 95d0bad62..000000000 Binary files a/crm_kit/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/consultation.png b/crm_kit/static/description/assets/icons/consultation.png deleted file mode 100644 index 8319d4baa..000000000 Binary files a/crm_kit/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/ecom-black.png b/crm_kit/static/description/assets/icons/ecom-black.png deleted file mode 100644 index a9385ff13..000000000 Binary files a/crm_kit/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/education-black.png b/crm_kit/static/description/assets/icons/education-black.png deleted file mode 100644 index 3eb09b27b..000000000 Binary files a/crm_kit/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/hotel-black.png b/crm_kit/static/description/assets/icons/hotel-black.png deleted file mode 100644 index 130f613be..000000000 Binary files a/crm_kit/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/img.png b/crm_kit/static/description/assets/icons/img.png deleted file mode 100644 index 70197f477..000000000 Binary files a/crm_kit/static/description/assets/icons/img.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/license.png b/crm_kit/static/description/assets/icons/license.png deleted file mode 100644 index a5869797e..000000000 Binary files a/crm_kit/static/description/assets/icons/license.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/lifebuoy.png b/crm_kit/static/description/assets/icons/lifebuoy.png deleted file mode 100644 index 658d56ccc..000000000 Binary files a/crm_kit/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/manufacturing-black.png b/crm_kit/static/description/assets/icons/manufacturing-black.png deleted file mode 100644 index 697eb0e9f..000000000 Binary files a/crm_kit/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/photo-capture.png b/crm_kit/static/description/assets/icons/photo-capture.png deleted file mode 100644 index 06c111758..000000000 Binary files a/crm_kit/static/description/assets/icons/photo-capture.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/pos-black.png b/crm_kit/static/description/assets/icons/pos-black.png deleted file mode 100644 index 97c0f90c1..000000000 Binary files a/crm_kit/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/puzzle.png b/crm_kit/static/description/assets/icons/puzzle.png deleted file mode 100644 index 65cf854e7..000000000 Binary files a/crm_kit/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/restaurant-black.png b/crm_kit/static/description/assets/icons/restaurant-black.png deleted file mode 100644 index 4a35eb939..000000000 Binary files a/crm_kit/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/service-black.png b/crm_kit/static/description/assets/icons/service-black.png deleted file mode 100644 index 301ab51cb..000000000 Binary files a/crm_kit/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/trading-black.png b/crm_kit/static/description/assets/icons/trading-black.png deleted file mode 100644 index 9398ba2f1..000000000 Binary files a/crm_kit/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/training.png b/crm_kit/static/description/assets/icons/training.png deleted file mode 100644 index 884ca024d..000000000 Binary files a/crm_kit/static/description/assets/icons/training.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/update.png b/crm_kit/static/description/assets/icons/update.png deleted file mode 100644 index ecbc5a01a..000000000 Binary files a/crm_kit/static/description/assets/icons/update.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/user.png b/crm_kit/static/description/assets/icons/user.png deleted file mode 100644 index 6ffb23d9f..000000000 Binary files a/crm_kit/static/description/assets/icons/user.png and /dev/null differ diff --git a/crm_kit/static/description/assets/icons/wrench.png b/crm_kit/static/description/assets/icons/wrench.png deleted file mode 100644 index 6c04dea0f..000000000 Binary files a/crm_kit/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/Cybrosys R.png b/crm_kit/static/description/assets/misc/Cybrosys R.png deleted file mode 100644 index da4058087..000000000 Binary files a/crm_kit/static/description/assets/misc/Cybrosys R.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/categories.png b/crm_kit/static/description/assets/misc/categories.png deleted file mode 100644 index bedf1e0b1..000000000 Binary files a/crm_kit/static/description/assets/misc/categories.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/check-box.png b/crm_kit/static/description/assets/misc/check-box.png deleted file mode 100644 index 42caf24b9..000000000 Binary files a/crm_kit/static/description/assets/misc/check-box.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/compass.png b/crm_kit/static/description/assets/misc/compass.png deleted file mode 100644 index d5fed8faa..000000000 Binary files a/crm_kit/static/description/assets/misc/compass.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/corporate.png b/crm_kit/static/description/assets/misc/corporate.png deleted file mode 100644 index 2eb13edbf..000000000 Binary files a/crm_kit/static/description/assets/misc/corporate.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/customer-support.png b/crm_kit/static/description/assets/misc/customer-support.png deleted file mode 100644 index 79efc72ed..000000000 Binary files a/crm_kit/static/description/assets/misc/customer-support.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/cybrosys-logo.png b/crm_kit/static/description/assets/misc/cybrosys-logo.png deleted file mode 100644 index cc3cc0ccf..000000000 Binary files a/crm_kit/static/description/assets/misc/cybrosys-logo.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/email.svg b/crm_kit/static/description/assets/misc/email.svg deleted file mode 100644 index 15291cdc3..000000000 --- a/crm_kit/static/description/assets/misc/email.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crm_kit/static/description/assets/misc/features.png b/crm_kit/static/description/assets/misc/features.png deleted file mode 100644 index b41769f77..000000000 Binary files a/crm_kit/static/description/assets/misc/features.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/logo.png b/crm_kit/static/description/assets/misc/logo.png deleted file mode 100644 index 478462d3e..000000000 Binary files a/crm_kit/static/description/assets/misc/logo.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/phone.svg b/crm_kit/static/description/assets/misc/phone.svg deleted file mode 100644 index b7bd7f251..000000000 --- a/crm_kit/static/description/assets/misc/phone.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/crm_kit/static/description/assets/misc/pictures.png b/crm_kit/static/description/assets/misc/pictures.png deleted file mode 100644 index 56d255fe9..000000000 Binary files a/crm_kit/static/description/assets/misc/pictures.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/pie-chart.png b/crm_kit/static/description/assets/misc/pie-chart.png deleted file mode 100644 index 426e05244..000000000 Binary files a/crm_kit/static/description/assets/misc/pie-chart.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/right-arrow.png b/crm_kit/static/description/assets/misc/right-arrow.png deleted file mode 100644 index 730984a06..000000000 Binary files a/crm_kit/static/description/assets/misc/right-arrow.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/star (1) 2.svg b/crm_kit/static/description/assets/misc/star (1) 2.svg deleted file mode 100644 index 5ae9f507a..000000000 --- a/crm_kit/static/description/assets/misc/star (1) 2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/crm_kit/static/description/assets/misc/star.png b/crm_kit/static/description/assets/misc/star.png deleted file mode 100644 index 2eb9ab29f..000000000 Binary files a/crm_kit/static/description/assets/misc/star.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/support (1) 1.svg b/crm_kit/static/description/assets/misc/support (1) 1.svg deleted file mode 100644 index 7d37a8f30..000000000 --- a/crm_kit/static/description/assets/misc/support (1) 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/crm_kit/static/description/assets/misc/support-email.svg b/crm_kit/static/description/assets/misc/support-email.svg deleted file mode 100644 index eb70370d6..000000000 --- a/crm_kit/static/description/assets/misc/support-email.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/crm_kit/static/description/assets/misc/support.png b/crm_kit/static/description/assets/misc/support.png deleted file mode 100644 index 4f18b8b82..000000000 Binary files a/crm_kit/static/description/assets/misc/support.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/tick-mark.svg b/crm_kit/static/description/assets/misc/tick-mark.svg deleted file mode 100644 index 2dbb40187..000000000 --- a/crm_kit/static/description/assets/misc/tick-mark.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crm_kit/static/description/assets/misc/whatsapp 1.svg b/crm_kit/static/description/assets/misc/whatsapp 1.svg deleted file mode 100644 index 0bfaf8fc6..000000000 --- a/crm_kit/static/description/assets/misc/whatsapp 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/crm_kit/static/description/assets/misc/whatsapp.png b/crm_kit/static/description/assets/misc/whatsapp.png deleted file mode 100644 index d513a5356..000000000 Binary files a/crm_kit/static/description/assets/misc/whatsapp.png and /dev/null differ diff --git a/crm_kit/static/description/assets/misc/whatsapp.svg b/crm_kit/static/description/assets/misc/whatsapp.svg deleted file mode 100644 index b618aea1d..000000000 --- a/crm_kit/static/description/assets/misc/whatsapp.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crm_kit/static/description/assets/modules/1.jpg b/crm_kit/static/description/assets/modules/1.jpg deleted file mode 100644 index 08bbafeb6..000000000 Binary files a/crm_kit/static/description/assets/modules/1.jpg and /dev/null differ diff --git a/crm_kit/static/description/assets/modules/2.png b/crm_kit/static/description/assets/modules/2.png deleted file mode 100644 index a1209a01f..000000000 Binary files a/crm_kit/static/description/assets/modules/2.png and /dev/null differ diff --git a/crm_kit/static/description/assets/modules/3.jpg b/crm_kit/static/description/assets/modules/3.jpg deleted file mode 100644 index 3d171226b..000000000 Binary files a/crm_kit/static/description/assets/modules/3.jpg and /dev/null differ diff --git a/crm_kit/static/description/assets/modules/4.jpg b/crm_kit/static/description/assets/modules/4.jpg deleted file mode 100644 index 1f3f2e27f..000000000 Binary files a/crm_kit/static/description/assets/modules/4.jpg and /dev/null differ diff --git a/crm_kit/static/description/assets/modules/5.jpg b/crm_kit/static/description/assets/modules/5.jpg deleted file mode 100644 index 0db717519..000000000 Binary files a/crm_kit/static/description/assets/modules/5.jpg and /dev/null differ diff --git a/crm_kit/static/description/assets/modules/6.jpg b/crm_kit/static/description/assets/modules/6.jpg deleted file mode 100644 index cd62a577c..000000000 Binary files a/crm_kit/static/description/assets/modules/6.jpg and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/1.png b/crm_kit/static/description/assets/screenshots/1.png deleted file mode 100644 index c57950811..000000000 Binary files a/crm_kit/static/description/assets/screenshots/1.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/10.png b/crm_kit/static/description/assets/screenshots/10.png deleted file mode 100644 index 90a804ced..000000000 Binary files a/crm_kit/static/description/assets/screenshots/10.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/11.png b/crm_kit/static/description/assets/screenshots/11.png deleted file mode 100644 index 6b6a59d55..000000000 Binary files a/crm_kit/static/description/assets/screenshots/11.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/2.png b/crm_kit/static/description/assets/screenshots/2.png deleted file mode 100644 index 0b1027e8d..000000000 Binary files a/crm_kit/static/description/assets/screenshots/2.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/3.png b/crm_kit/static/description/assets/screenshots/3.png deleted file mode 100644 index 6b79fca20..000000000 Binary files a/crm_kit/static/description/assets/screenshots/3.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/4.png b/crm_kit/static/description/assets/screenshots/4.png deleted file mode 100644 index 6d54d92c8..000000000 Binary files a/crm_kit/static/description/assets/screenshots/4.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/5.png b/crm_kit/static/description/assets/screenshots/5.png deleted file mode 100644 index 748872ed7..000000000 Binary files a/crm_kit/static/description/assets/screenshots/5.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/6.png b/crm_kit/static/description/assets/screenshots/6.png deleted file mode 100644 index 7dc745360..000000000 Binary files a/crm_kit/static/description/assets/screenshots/6.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/7.png b/crm_kit/static/description/assets/screenshots/7.png deleted file mode 100644 index 236cd8838..000000000 Binary files a/crm_kit/static/description/assets/screenshots/7.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/8.png b/crm_kit/static/description/assets/screenshots/8.png deleted file mode 100644 index dcf9cdaab..000000000 Binary files a/crm_kit/static/description/assets/screenshots/8.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/9.png b/crm_kit/static/description/assets/screenshots/9.png deleted file mode 100644 index 730bba9ea..000000000 Binary files a/crm_kit/static/description/assets/screenshots/9.png and /dev/null differ diff --git a/crm_kit/static/description/assets/screenshots/hero.gif b/crm_kit/static/description/assets/screenshots/hero.gif deleted file mode 100644 index 8d50bd5ba..000000000 Binary files a/crm_kit/static/description/assets/screenshots/hero.gif and /dev/null differ diff --git a/crm_kit/static/description/banner.png b/crm_kit/static/description/banner.png deleted file mode 100644 index 514861fdb..000000000 Binary files a/crm_kit/static/description/banner.png and /dev/null differ diff --git a/crm_kit/static/description/icon.png b/crm_kit/static/description/icon.png deleted file mode 100644 index 24f87e344..000000000 Binary files a/crm_kit/static/description/icon.png and /dev/null differ diff --git a/crm_kit/static/description/index.html b/crm_kit/static/description/index.html deleted file mode 100644 index 7185919df..000000000 --- a/crm_kit/static/description/index.html +++ /dev/null @@ -1,1033 +0,0 @@ - - - - - - - Odoo App 3 Index - - - - - - - - -
-
-
-
-
- -
-
-
- Community -
-
- Enterprise -
-
- Odoo.sh -
-
-
-
-
-
-

- CRM Kit

-

- Complete CRM Kit for odoo17. -

-
- -
-
-
-
-
-

- Key Highlights -

-
-
-
-
-
- -
-
-

- Craft Custom Commission to Salesperson and Sales - Team

-
-
-
-
-
-
- -
-
-

- Draft Commissions Based on Revenue and - Respective Product

-
-
-
-
-
-
- -
-
-

- Define Commission Based on Product Category

-
-
-
-
-
-
- -
-
-

- Informative Commission Plan Report

-
-
-
-
-
-
- -
-
-

- Upcoming and Recent Scheduled Activity - Monitoring

-
-
-
-
-
-
- -
-
-

- Year to Date Bar Graph

-
-
-
-
-
-
- -
-
-

- Opportunity Lost Reason Management

-
-
-
-
-
-
- -
-
-

- Top Deals and Monthly Revenue Goals

-
-
-
-
-
-
- -
-
-

- Clickable Dashboard Cards

-
-
-
-
-
-
- -
-
-
-
-
- -
-
-

- Clickable Dashboard Card

-
-
-
-
-
-
- -
-
-

- Commission Plan based on Product - Category

-

The - Commission Plan Creation window can be - accessed from the Commission Plan window and - while selecting the Type the Product Wise - options can be selected. Further, the - Product Categories with respect to the - respective Product Category based Commission - Plan can be defined.

-
-
-
-
-
-
- -
-
-

- Revenue-based Commission Plan: Straight - Revenue Commission Plan.

-

The second - form of Commission Plan in the Odoo CRM Kit - where the Sales Revenue and its percentage - calculation will be provided as Commission - to the Salesperson. - While Creating a Straight Revenue Commission - plan the Commission type can be selected as - Straight Commission. Further, the commission - rate can be defined under the Straight - Revenue Commission tab.

-
-
-
-
-
-
- -
-
-

- Revenue-based Commission Plan: Graduated - Revenue Commission Plan.

-

While - Creating a Graduated Revenue Commission Plan - the Commission type can be selected as - Graduated Commission. Further, the - commission rate can be defined under the - Graduated Revenue Commission tab.

-
-
-
-
-
-
- -
-
-

- Assigning Commission Plan for - Salesperson.

-

In the CRM - Kit under the respective Salesperson - description tab, there will be a dedicated - tab the Commission Plan where the respective - Commission Plan with respect to the - operation can be defined. -

-
-
-
-
-
-
- -
-
-

- Assigning Commission Plan for Sales - Team.

-

In the CRM - Kit under the respective sales team - description tab, there will be a dedicated - tab the Commission Plan where the respective - Commission Plan with respect to the - operation can be defined. -

-
-
-
-
-
-
- -
-
-

- Print the Commission Plan Report in XLSX - Format.

-

The CRM Kit - also holds an advanced operations feature - where the Admins, as well as every User, can - take the Print out of the Commission Plan - Reports based on their need and for the - period of operations that are required. The - Reports can be generated in XLSX formats and - can be saved based on the need. To take the - printout of the Commission Plan Report you - should go to the Reporting tab of the CRM - KIt and further select the Commission Plan - menu and select the Required entries and - Click to Print XLS. -

-
-
-
-
-
-
- -
-
-

- Year to Date Chart and Lead Analysis

-

A dedicated - insight will be provided with the help of - the Funnel Chart on the Leads with - indications as New, Qualified, Proposition, - and Won. The Donut graph based on the - monthly Lead operation will provide a clear - picture of the monthly Lead operations. - Additionally, the Activity Donut graph will - describe the activity analysis on the leads. -

-
-
-
-
-
-
- -
-
-

- Set custom targets for Salesperson

-

For each of - the individual Salespersons, you will be - able to set dedicated Targets using the CRM - Kit. This will ensure that the Salesperson - is motivated to keep with the business. The - Targets can be set under the Settings tab > - User Settings > Below the access right tab. -

-
-
-
-
-
-
- -
-
-

- Top deals and Monthly Goal Gauge.

-

The Top - Deals listing will help the Salespersons to - promote them easily without moving to the - sales module. Moreover, the Top Deals can be - listed out based on the custom ones which - are being defined. The Monthly Goal Gauge - will provide insight on the targets and the - achievement rate of each of the Salesperson. -

-
-
-
-
-
-
- -
-
-

- Dashboard View of the User

-

The Admin, - as well as the User who has access to the - CRM Kit, can function the various operations - with it and each of the Users and the Admin - have a separate CRM Dashboard based on the - operational authorization. The Following - screenshot depicts the User view of the CRM - Dashboard. Here the information relating to - the respective user and their operations - will be only depicted and the ones which the - respective User has authorization to can be - modified. -

-
-
-
-
-
-
-
    -
  • - Activity - monitoring. -
  • -
  • - Year to - date - bar graph target field in user settings. -
  • -
  • - Top deals - and - monthly revenue goals. -
  • -
  • - The users - will - have different authorization based on - the employment level. -
  • - -
-
-
-
-
-
-
Version - 17.0.1.0.0|Released on:20th January 2024 -
-

- Initial Commit for CRM Kit.

-
-
-
-
-
-
-
-

- Related Products

-
-
- -
-
-

- Our Services

- -
-
-
-
-
-
-
-
- service-icon -
-
-

Odoo - Customization

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Implementation

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Support

-
-
-
-
-
-
- service-icon -
-
-

Hire - Odoo Developer

-
-
-
-
- -
-
- service-icon -
-
-

Odoo - Integration

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Migration

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Consultancy

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Implementation

-
-
-
-
-
-
- service-icon -
-
-

Odoo - Licensing Consultancy

-
-
-
-
-
-
-

- Our Industries

- -
-
-
-
-
-
- -

Trading

-

Easily procure and sell your products

-
-
-
-
- -

POS

-

Easy configuration and convivial experience

-
-
-
-
- -

- Education

-

A platform for educational management

-
-
-
-
- -

- Manufacturing

-

Plan, track and schedule your operations

-
-
-
-
- -

E-commerce & - Website

-

Mobile friendly, awe-inspiring product pages

-
-
-
-
- -

Service - Management

-

Keep track of services and invoice

-
-
-
-
- -

- Restaurant

-

Run your bar or restaurant methodically

-
-
-
-
- -

Hotel - Management

-

An all-inclusive hotel management application

-
-
-
-
-
-
-

- Support

-
-
-
-
-
-
-
- -
- Need - Help? -

Got - questions or need help? Get in touch.

-
odoo@cybrosys.com -
-
-
-
-
-
-
-
- -
- WhatsApp -

Say hi to - us on WhatsApp!

-
+91 - 99456767686 -
-
-
-
-
-
-
-
-
- - - - - - diff --git a/crm_kit/static/src/js/action_manager.js b/crm_kit/static/src/js/action_manager.js deleted file mode 100644 index c910b96fb..000000000 --- a/crm_kit/static/src/js/action_manager.js +++ /dev/null @@ -1,19 +0,0 @@ -/** @odoo-module **/ -import { registry } from "@web/core/registry"; -import { BlockUI } from "@web/core/ui/block_ui"; -import { download } from "@web/core/network/download"; - -/** -This handler is responsible for generating XLSX reports. -*/ -registry.category("ir.actions.report handlers").add("crm_kit.xlsx", async function (action) { - if (action.report_type === 'xlsx') { - BlockUI; - await download({ - url: '/xlsx_reports', - data: action.data, - complete: () => unblockUI, - error: (error) => self.call('crash_manager', 'rpc_error', error), - }); - } -}); diff --git a/crm_kit/views/crm_commission_views.xml b/crm_kit/views/crm_commission_views.xml deleted file mode 100644 index 2500396fa..000000000 --- a/crm_kit/views/crm_commission_views.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - crm.commission.view.tree - crm.commission - - - - - - - - - - crm.commission.view.form - crm.commission - -
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - - CRM Commission Plan - ir.actions.act_window - crm.commission - tree,form - -

- Create New Commission Plan! -

-
-
- - -
diff --git a/crm_kit/views/crm_team_views.xml b/crm_kit/views/crm_team_views.xml deleted file mode 100644 index 3627e84ea..000000000 --- a/crm_kit/views/crm_team_views.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - crm.team.view.form.inherit.crm.kit - crm.team - - - - - - - - diff --git a/crm_kit/views/res_users_views.xml b/crm_kit/views/res_users_views.xml deleted file mode 100644 index 17e2eabc3..000000000 --- a/crm_kit/views/res_users_views.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - res.users.view.inherit.form.crm.kit - res.users - - - - - - - - - - Sales Persons - ir.actions.act_window - res.users - [('share','=',False)] - tree,kanban,form - - - - diff --git a/crm_kit/wizard/__init__.py b/crm_kit/wizard/__init__.py deleted file mode 100644 index 06c746b0f..000000000 --- a/crm_kit/wizard/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -from . import commission_report diff --git a/crm_kit/wizard/commission_report.py b/crm_kit/wizard/commission_report.py deleted file mode 100644 index 92dd0ac5a..000000000 --- a/crm_kit/wizard/commission_report.py +++ /dev/null @@ -1,375 +0,0 @@ - # -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Bhagyadev KP (odoo@cybrosys.com) -# -# This program is free software: you can modify -# it under the terms of the GNU Affero General Public License (AGPL) as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################ -import io -import json -from odoo import api, fields, models -from odoo.tools import date_utils -from odoo.exceptions import ValidationError - -try: - from odoo.tools.misc import xlsxwriter -except ImportError: - import xlsxwriter - - -class CommissionReport(models.TransientModel): - """ - Commission Report wizard - """ - _name = 'commission.report' - _description = 'Commission Report Wizard' - - date_from = fields.Date(string="From Date", help="Date from which") - date_to = fields.Date(string="To Date", help="Date to") - salesperson_ids = fields.Many2many('res.users', string='Salesperson', - domain="[('share','=',False)]", - help="Salesperson") - sales_team_ids = fields.Many2many('crm.team', string='Sales Team', - help="Sales team") - date = fields.Date(string='Date', default=fields.Date.context_today, - help="Date") - is_sales_person = fields.Boolean(default=False, string="Is sales person", - help="Is sales person") - is_sales_team = fields.Boolean(default=False, string="Is sales team", - help="Is sales team") - - @api.onchange('salesperson_ids') - def onchange_salesperson_ids(self): - """Function for hide a field base on values""" - self.is_sales_person = True if self.salesperson_ids else False - - @api.onchange('sales_team_ids') - def onchange_sales_team_ids(self): - self.is_sales_team = True if self.sales_team_ids else False - - @api.constrains('sales_team_ids', 'salesperson_ids') - def sales_team_constrains(self): - """Function for showing validation error""" - for rec in self: - if self.sales_team_ids: - if not rec.sales_team_ids.member_ids: - raise ValidationError( - "Selected Sales Team haven't any Salespersons") - if not self.sales_team_ids.member_ids.commission_id and \ - not self.sales_team_ids.commission_id: - raise ValidationError( - "Selected Sales Team haven't any Commission Plan") - elif self.salesperson_ids and not rec.salesperson_ids.commission_id: - raise ValidationError( - "Selected Salesperson haven't any Commission Plan") - - def action_print_xls_report(self): - """Function for printing xlsx report""" - # sales person's condition starts here # - user_sale_orders = self.env['sale.order'].search([ - ('user_id', 'in', self.salesperson_ids.ids)]) - user_sale_orders_dict = {} - total_list = [] - commission_list = [] - user_commission_name = [] - user_commission_salesperson = [] - user_obj = user_sale_orders.mapped('user_id').sorted(key=lambda d: d.id) - for user in user_obj: - user_sale_orders_dict.update({ - user: user_sale_orders.filtered(lambda l: l.user_id == user) - }) - for user, user_sale_orders in user_sale_orders_dict.items(): - commission_id = user.commission_id - if not commission_id: - continue - filtered_order_lines = user_sale_orders.filtered( - lambda l: self.date_from <= l.date_order.date( - ) <= self.date_to and l.date_order.date() >= commission_id.date_from - ).mapped('order_line') - filtered_order_lines_commission_total = sum( - filtered_order_lines.mapped('price_subtotal')) - - if commission_id.type == 'product': - commission_products = commission_id.product_comm_ids.product_id - prod_commission = filtered_order_lines.filtered( - lambda l: l.product_id in commission_products) - for rule in commission_id.product_comm_ids.filtered( - lambda l: l.product_id in prod_commission.mapped( - 'product_id')): - product_order_line = prod_commission.filtered( - lambda l: l.product_id == rule.product_id) - total_price = sum( - product_order_line.mapped('price_subtotal')) - product_commission = (total_price * rule.percentage) / 100 - total_list.append(total_price) - user_commission_name.append(commission_id.name) - user_commission_salesperson.append(user.name) - commission_list.append(rule.amount) if ( - product_commission > rule.amount) \ - else commission_list.append(product_commission) - - if commission_id.type == 'revenue' and ( - commission_id.revenue_type == 'graduated'): - for rule in commission_id.revenue_grd_comm_ids: - if rule.amount_from <= filtered_order_lines_commission_total < rule.amount_to: - graduated_commission = (filtered_order_lines_commission_total - * rule.graduated_commission_rate) / 100 - commission_list.append(graduated_commission) - user_commission_name.append(commission_id.name) - user_commission_salesperson.append(user.name) - total_list.append(filtered_order_lines_commission_total) - - if commission_id.type == 'revenue' and ( - commission_id.revenue_type == 'straight'): - straight_commission = (filtered_order_lines_commission_total - * commission_id.straight_commission_rate) / 100 - commission_list.append(straight_commission) - user_commission_name.append(commission_id.name) - user_commission_salesperson.append(user.name) - total_list.append(filtered_order_lines_commission_total) - # sales person's condition ends here # - - if not self.sales_team_ids and not self.salesperson_ids: - self.sales_team_ids = self.env['crm.team'].search([]) - - # sales team's condition starts here # - team_wizard_persons = self.sales_team_ids.member_ids - team_sale_orders = self.env['sale.order'].search( - [('user_id', 'in', team_wizard_persons.ids)]) - team_sale_orders_dict = {} - commission_total = [] - commission = [] - commission_name = [] - commission_salesperson = [] - commission_sales_team = [] - team_obj = team_sale_orders.mapped('user_id').sorted(key=lambda d: d.id) - for team_user in team_obj: - team_sale_orders_dict.update({ - team_user: team_sale_orders.filtered( - lambda l: l.user_id == team_user) - }) - for team_user, team_sale_orders in team_sale_orders_dict.items(): - commissions_id = team_user.commission_id if team_user.commission_id \ - else team_user.sale_team_id.commission_id - if commissions_id: - filtered_order_lines = team_sale_orders.filtered( - lambda l: self.date_from <= l.date_order.date( - ) <= self.date_to and l.date_order.date() >= commissions_id.date_from - ).mapped('order_line') - filtered_order_lines_commission_total = sum( - filtered_order_lines.mapped('price_subtotal')) - if commissions_id.type == 'product': - commission_products = commissions_id.product_comm_ids.product_id - prod_commission = filtered_order_lines.filtered( - lambda l: l.product_id in commission_products) - for rules in commissions_id.product_comm_ids.filtered( - lambda l: l.product_id in prod_commission.mapped( - 'product_id')): - product_order_line = prod_commission.filtered( - lambda l: l.product_id == rules.product_id) - total_price = sum( - product_order_line.mapped('price_subtotal')) - product_commission = (total_price * rules.percentage) / 100 - commission_total.append(total_price) - commission_name.append(commissions_id.name) - commission_salesperson.append(team_user.name) - commission_sales_team.append( - team_user.sale_team_id.name) - commission.append(rules.amount) if ( - product_commission > rules.amount) \ - else commission.append(product_commission) - - if commissions_id.type == 'revenue' and ( - commissions_id.revenue_type == 'graduated'): - for rules in commissions_id.revenue_grd_comm_ids: - if rules.amount_from <= filtered_order_lines_commission_total \ - < rules.amount_to: - graduated_commission = (filtered_order_lines_commission_total - * rules.graduated_commission_rate) / 100 - commission.append(graduated_commission) - commission_name.append(commissions_id.name) - commission_salesperson.append(team_user.name) - commission_sales_team.append( - team_user.sale_team_id.name) - commission_total.append( - filtered_order_lines_commission_total) - - if commissions_id.type == 'revenue' and ( - commissions_id.revenue_type == 'straight'): - straight_commission = (filtered_order_lines_commission_total - * commissions_id.straight_commission_rate) / 100 - commission.append(straight_commission) - commission_name.append(commissions_id.name) - commission_salesperson.append(team_user.name) - commission_sales_team.append(team_user.sale_team_id.name) - commission_total.append( - filtered_order_lines_commission_total) - # sales team's condition ends here # - - data = { - 'model_id': self.id, - 'date': self.date, - 'date_from': self.date_from, - 'date_to': self.date_to, - 'sales_team_ids': self.sales_team_ids.ids, - 'salesperson_ids': self.salesperson_ids.ids, - 'commission_list': commission_list, - 'total_list': total_list, - 'commission': commission, - 'commission_total': commission_total, - 'commission_name': commission_name, - 'commission_salesperson': commission_salesperson, - 'commission_sales_team': commission_sales_team, - 'user_commission_name': user_commission_name, - 'user_commission_salesperson': user_commission_salesperson, - } - return { - 'type': 'ir.actions.report', - 'data': { - 'model': 'commission.report', - 'options': json.dumps(data, default=date_utils.json_default), - 'output_format': 'xlsx', - 'report_name': 'Commission Plan xlsx report'}, - 'report_type': 'xlsx' - } - - def get_xlsx_report(self, data, response): - """get_xlsx_report function""" - date = data['date'] - team = data['sales_team_ids'] - user = data['salesperson_ids'] - commission_list = data['commission_list'] - total_list = data['total_list'] - commission = data['commission'] - commission_total = data['commission_total'] - commission_name = data['commission_name'] - commission_salesperson = data['commission_salesperson'] - commission_sales_team = data['commission_sales_team'] - user_commission_name = data['user_commission_name'] - user_commission_salesperson = data['user_commission_salesperson'] - - output = io.BytesIO() - workbook = xlsxwriter.Workbook(output, {'in_memory': True}) - sheet = workbook.add_worksheet() - head = workbook.add_format({'align': 'center', 'bold': True, - 'font_size': '15px', 'valign': 'vcenter'}) - format1 = workbook.add_format({'align': 'left', 'font_size': '12px'}) - format2 = workbook.add_format({'align': 'right', 'font_size': '12x'}) - format3 = workbook.add_format( - {'align': 'right', 'font_size': '12x', 'bold': True}) - heading = workbook.add_format({'align': 'left', 'bold': True, - 'font_size': '12px', - 'valign': 'vcenter'}) - date_format = workbook.add_format( - {'num_format': 'dd/mm/yy', 'align': 'left', 'font_size': '10px'}) - - sheet.merge_range('A2:B2', "Printed Date: " + date, date_format) - sheet.write('A4', 'No.', heading) - sheet.set_column(5, 1, 25) - sheet.set_row(0, 25) - row = 5 - col = 0 - index = 1 - if user: - sheet.merge_range('A1:E1', 'COMMISSION PLAN REPORT', head) - sheet.write('D2', 'Date From: ' + data['date_from'], date_format) - sheet.write('E2', 'Date To: ' + data['date_to'], date_format) - - sheet.write('B4', 'Sale Persons', heading) - sheet.write('C4', 'Commission Plan Name', heading) - sheet.write('D4', 'Total Revenue', heading) - sheet.write('E4', 'Commission Amount', heading) - - for data in user_commission_salesperson: - sheet.write(row, col + 0, index, format2) - sheet.write(row, col + 1, data, format1) - row += 1 - index += 1 - - row = 5 - col = 0 - for data in user_commission_name: - sheet.write(row, col + 2, data, format1) - row += 1 - - row = 5 - col = 0 - for data in total_list: - sheet.write(row, col + 3, round(data, 2), format2) - row += 1 - - row = 5 - col = 0 - for data in commission_list: - sheet.write(row, col + 4, round(data, 2), format2) - row += 1 - - sheet.write(row + 1, col + 2, 'Total', format3) - sheet.write(row + 1, col + 3, round(sum(total_list), 2), format2) - sheet.write(row + 1, col + 4, round(sum(commission_list), 2), - format2) - - elif team: - sheet.merge_range('A1:F1', 'COMMISSION PLAN REPORT', head) - sheet.write('E2', 'Date From: ' + data['date_from'], date_format) - sheet.write('F2', 'Date To: ' + data['date_to'], date_format) - - sheet.write('B4', 'Sales Teams', heading) - sheet.write('C4', 'Sales Person', heading) - sheet.write('D4', 'Commission Plan Name', heading) - sheet.write('E4', 'Total Revenue', heading) - sheet.write('F4', 'Commission Amount', heading) - - for data in commission_sales_team: - sheet.write(row, col + 0, index, format2) - sheet.write(row, col + 1, data, format1) - row += 1 - index += 1 - - row = 5 - col = 0 - for data in commission_salesperson: - sheet.write(row, col + 2, data, format1) - row += 1 - - row = 5 - col = 0 - for data in commission_name: - sheet.write(row, col + 3, data, format1) - row += 1 - - row = 5 - col = 0 - for data in commission_total: - sheet.write(row, col + 4, round(data, 2), format2) - row += 1 - - row = 5 - col = 0 - for data in commission: - sheet.write(row, col + 5, round(data, 2), format2) - row += 1 - - sheet.write(row + 1, col + 3, 'Total:', format3) - sheet.write(row + 1, col + 4, round(sum(commission_total), 2), - format2) - sheet.write(row + 1, col + 5, round(sum(commission), 2), format2) - - workbook.close() - output.seek(0) - response.stream.write(output.read()) - output.close() diff --git a/crm_kit/wizard/commission_report_views.xml b/crm_kit/wizard/commission_report_views.xml deleted file mode 100644 index be8693b05..000000000 --- a/crm_kit/wizard/commission_report_views.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - commission.report.view.form - commission.report - form - -
- - - - - - - - - - - - - - -
-
-
-
-
- - - Commission Report - commission.report - form - - new - - - -