diff --git a/commission_plan/README.rst b/commission_plan/README.rst new file mode 100755 index 000000000..ee28a755e --- /dev/null +++ b/commission_plan/README.rst @@ -0,0 +1,39 @@ +CRM Commission Plan +======= +* CRM Commission Plan module for Odoo 13. + +Installation +============ + - www.odoo.com/documentation/13.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions '__ + +Credits +------- +* 'Cybrosys Techno Solutions '__ + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/commission_plan/__init__.py b/commission_plan/__init__.py new file mode 100644 index 000000000..8909ff398 --- /dev/null +++ b/commission_plan/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 +from . import wizard +from . import controllers diff --git a/commission_plan/__manifest__.py b/commission_plan/__manifest__.py new file mode 100644 index 000000000..4cfc7f272 --- /dev/null +++ b/commission_plan/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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": "Odoo13 CRM Commission Plan", + 'description': """CRM Commission Plan for odoo13, CRM, crm commission, commission plan, crm features""", + 'summary': """CRM Commission Plan for odoo13""", + "category": 'Sales', + "version": '13.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + "depends": ['base', 'sale_management', 'crm'], + "data": [ + 'security/ir.model.access.csv', + 'views/commission.xml', + 'wizard/commission_report.xml', + 'views/action_manager.xml', + ], + 'images': [ + 'static/description/banner.png', + ], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/commission_plan/controllers/__init__.py b/commission_plan/controllers/__init__.py new file mode 100644 index 000000000..1178cb52e --- /dev/null +++ b/commission_plan/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 main diff --git a/commission_plan/controllers/main.py b/commission_plan/controllers/main.py new file mode 100644 index 000000000..7676b796d --- /dev/null +++ b/commission_plan/controllers/main.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 . +# +############################################################################# +import json +from odoo import http +from odoo.http import content_disposition, request +from odoo.addons.web.controllers.main import _serialize_exception +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + """XLSX Report Controller""" + + @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], + csrf=False) + def get_report_xlsx(self, model, options, output_format, token, report_name, + **kw): + """Function for report printing""" + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + options = json.loads(options) + 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 = _serialize_exception(e) + error = { + 'code': 200, + 'message': 'Odoo Server Error', + 'data': se + } + + return request.make_response(html_escape(json.dumps(error))) diff --git a/commission_plan/doc/RELEASE_NOTES.md b/commission_plan/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..5b7be0523 --- /dev/null +++ b/commission_plan/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.12.2021 +#### Version 13.0.1.0.0 +#### ADD +- Initial commit for Commission Plan Module \ No newline at end of file diff --git a/commission_plan/models/__init__.py b/commission_plan/models/__init__.py new file mode 100644 index 000000000..67d5b1c6f --- /dev/null +++ b/commission_plan/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 commission diff --git a/commission_plan/models/commission.py b/commission_plan/models/commission.py new file mode 100644 index 000000000..53c65ca49 --- /dev/null +++ b/commission_plan/models/commission.py @@ -0,0 +1,126 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 exceptions +from odoo import fields, models, api, _ + + +class CommissionPlan(models.Model): + _name = 'crm.commission' + _description = 'Commission Plan' + _rec_name = "name" + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char('Name', required=True) + active = fields.Boolean('Active', default=True) + date_from = fields.Date(string="From Date", required=True) + date_to = fields.Date(string="To Date", required=True) + type = fields.Selection( + [('product', 'Product wise'), + ('revenue', 'Revenue wise')], string="Type", + default="product") + team_id = fields.Many2one('crm.team', string='Sales Team') + user_id = fields.Many2one('res.users', string='Salesperson') + product_comm_ids = fields.One2many('commission.product', 'commission_id', + string="Product Wise") + straight_commission_rate = fields.Float(string='Commission rate (%)') + revenue_grd_comm_ids = fields.One2many( + 'commission.graduated', + 'commission_id', + string="Revenue Graduated Wise") + + revenue_type = fields.Selection( + [('straight', 'Straight Commission'), + ('graduated', 'Graduated Commission')], + string="Revenue Type") + + @api.constrains("date_from", "date_to") + def _check_date(self): + 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): + 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)] + + +class CommissionProduct(models.Model): + _name = 'commission.product' + _description = 'Commission Product Wise' + + user_id = fields.Many2one('res.users') + category_id = fields.Many2one('product.category', string='Product Category') + product_id = fields.Many2one('product.product', string='Product', + domain="[('categ_id', '=', category_id)]") + percentage = fields.Float(string='Rate in Percentage (%)') + amount = fields.Monetary('Maximum Commission Amount', default=0.0) + currency_id = fields.Many2one("res.currency", string="Currency", + default=lambda self: + self.env.user.company_id.currency_id.id) + commission_id = fields.Many2one("crm.commission") + + +class CommissionRevenueGraduated(models.Model): + _name = 'commission.graduated' + _description = 'Commission Revenue Graduated Wise' + + graduated_commission_rate = fields.Float(string='Commission rate (%)') + amount_from = fields.Float(string="From Amount") + amount_to = fields.Float(string="To Amount") + commission_id = fields.Many2one("crm.commission") + sequence = fields.Integer(string='Sequence', compute='_compute_sequence', + store=True) + + @api.depends('commission_id') + def _compute_sequence(self): + 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): + for rec in self: + if rec.amount_to < rec.amount_from: + raise exceptions.ValidationError( + _("The From Amount limit cannot be greater than To Amount.") + ) + + +class CrmTeam(models.Model): + _inherit = 'crm.team' + + commission_id = fields.Many2one('crm.commission', string='Commission Plan') + + +class CrmSalespersons(models.Model): + _inherit = 'res.users' + + commission_id = fields.Many2one('crm.commission', string='Commission Plan') diff --git a/commission_plan/security/ir.model.access.csv b/commission_plan/security/ir.model.access.csv new file mode 100644 index 000000000..77920af24 --- /dev/null +++ b/commission_plan/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_commission_plan,crm.commission,model_crm_commission,base.group_user,1,1,1,1 +access_commission_product,commission.product,model_commission_product,base.group_user,1,1,1,1 +access_commission_wizard,commission.wizard,model_commission_wizard,base.group_user,1,1,1,1 +access_commission_graduated,commission.graduated,model_commission_graduated,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/commission_plan/static/description/assets/icons/check.png b/commission_plan/static/description/assets/icons/check.png new file mode 100644 index 000000000..ea0da5029 Binary files /dev/null and b/commission_plan/static/description/assets/icons/check.png differ diff --git a/commission_plan/static/description/assets/icons/chevron.png b/commission_plan/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..f49dd8541 Binary files /dev/null and b/commission_plan/static/description/assets/icons/chevron.png differ diff --git a/commission_plan/static/description/assets/icons/cogs.png b/commission_plan/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/commission_plan/static/description/assets/icons/cogs.png differ diff --git a/commission_plan/static/description/assets/icons/consultation.png b/commission_plan/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/commission_plan/static/description/assets/icons/consultation.png differ diff --git a/commission_plan/static/description/assets/icons/ecom-black.png b/commission_plan/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/commission_plan/static/description/assets/icons/ecom-black.png differ diff --git a/commission_plan/static/description/assets/icons/education-black.png b/commission_plan/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/commission_plan/static/description/assets/icons/education-black.png differ diff --git a/commission_plan/static/description/assets/icons/hotel-black.png b/commission_plan/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/commission_plan/static/description/assets/icons/hotel-black.png differ diff --git a/commission_plan/static/description/assets/icons/icon.png b/commission_plan/static/description/assets/icons/icon.png new file mode 100644 index 000000000..61b0eb171 Binary files /dev/null and b/commission_plan/static/description/assets/icons/icon.png differ diff --git a/commission_plan/static/description/assets/icons/license.png b/commission_plan/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/commission_plan/static/description/assets/icons/license.png differ diff --git a/commission_plan/static/description/assets/icons/lifebuoy.png b/commission_plan/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/commission_plan/static/description/assets/icons/lifebuoy.png differ diff --git a/commission_plan/static/description/assets/icons/logo.png b/commission_plan/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/commission_plan/static/description/assets/icons/logo.png differ diff --git a/commission_plan/static/description/assets/icons/manufacturing-black.png b/commission_plan/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/commission_plan/static/description/assets/icons/manufacturing-black.png differ diff --git a/commission_plan/static/description/assets/icons/pos-black.png b/commission_plan/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/commission_plan/static/description/assets/icons/pos-black.png differ diff --git a/commission_plan/static/description/assets/icons/puzzle.png b/commission_plan/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/commission_plan/static/description/assets/icons/puzzle.png differ diff --git a/commission_plan/static/description/assets/icons/restaurant-black.png b/commission_plan/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/commission_plan/static/description/assets/icons/restaurant-black.png differ diff --git a/commission_plan/static/description/assets/icons/service-black.png b/commission_plan/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/commission_plan/static/description/assets/icons/service-black.png differ diff --git a/commission_plan/static/description/assets/icons/trading-black.png b/commission_plan/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/commission_plan/static/description/assets/icons/trading-black.png differ diff --git a/commission_plan/static/description/assets/icons/training.png b/commission_plan/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/commission_plan/static/description/assets/icons/training.png differ diff --git a/commission_plan/static/description/assets/icons/update.png b/commission_plan/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/commission_plan/static/description/assets/icons/update.png differ diff --git a/commission_plan/static/description/assets/icons/user.png b/commission_plan/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/commission_plan/static/description/assets/icons/user.png differ diff --git a/commission_plan/static/description/assets/icons/wrench.png b/commission_plan/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/commission_plan/static/description/assets/icons/wrench.png differ diff --git a/commission_plan/static/description/assets/modules/accounting_image.gif b/commission_plan/static/description/assets/modules/accounting_image.gif new file mode 100644 index 000000000..69bf230e7 Binary files /dev/null and b/commission_plan/static/description/assets/modules/accounting_image.gif differ diff --git a/commission_plan/static/description/assets/modules/approval_image.png b/commission_plan/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/commission_plan/static/description/assets/modules/approval_image.png differ diff --git a/commission_plan/static/description/assets/modules/budget_image.png b/commission_plan/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..fe6aa6fe4 Binary files /dev/null and b/commission_plan/static/description/assets/modules/budget_image.png differ diff --git a/commission_plan/static/description/assets/modules/deadline_image.png b/commission_plan/static/description/assets/modules/deadline_image.png new file mode 100644 index 000000000..6bd27b8b5 Binary files /dev/null and b/commission_plan/static/description/assets/modules/deadline_image.png differ diff --git a/commission_plan/static/description/assets/modules/export_image.png b/commission_plan/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..4e4ea0e51 Binary files /dev/null and b/commission_plan/static/description/assets/modules/export_image.png differ diff --git a/commission_plan/static/description/assets/modules/pos_image.png b/commission_plan/static/description/assets/modules/pos_image.png new file mode 100644 index 000000000..c5932894b Binary files /dev/null and b/commission_plan/static/description/assets/modules/pos_image.png differ diff --git a/commission_plan/static/description/assets/screenshots/CRM-Dashboard-user.png b/commission_plan/static/description/assets/screenshots/CRM-Dashboard-user.png new file mode 100644 index 000000000..794115f30 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/CRM-Dashboard-user.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-1.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-1.png new file mode 100644 index 000000000..215a45b39 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-1.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-2.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-2.png new file mode 100644 index 000000000..2d24daaf6 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-2.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-3.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-3.png new file mode 100644 index 000000000..16250b3b6 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-3.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-4.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-4.png new file mode 100644 index 000000000..76d6b46a6 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-4.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-5.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-5.png new file mode 100644 index 000000000..35253c12e Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-5.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-6.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-6.png new file mode 100644 index 000000000..b65fb540e Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-6.png differ diff --git a/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-7.png b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-7.png new file mode 100644 index 000000000..3a07f0010 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/Crm-Commission-Plan-7.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-1.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-1.png new file mode 100644 index 000000000..1d13a5425 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-1.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-2.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-2.png new file mode 100644 index 000000000..5cf05a3c5 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-2.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-22.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-22.png new file mode 100644 index 000000000..ad247eb9d Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-22.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-3.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-3.png new file mode 100644 index 000000000..11799ce0a Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-3.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-4.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-4.png new file mode 100644 index 000000000..944bdfaf5 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-4.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-5.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-5.png new file mode 100644 index 000000000..d157c91e0 Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-5.png differ diff --git a/commission_plan/static/description/assets/screenshots/dash_screenshot-6.png b/commission_plan/static/description/assets/screenshots/dash_screenshot-6.png new file mode 100644 index 000000000..65e5c42cf Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/dash_screenshot-6.png differ diff --git a/commission_plan/static/description/assets/screenshots/hero.gif b/commission_plan/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..ab739fbee Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/hero.gif differ diff --git a/commission_plan/static/description/assets/screenshots/hero_kit.gif b/commission_plan/static/description/assets/screenshots/hero_kit.gif new file mode 100644 index 000000000..8286c472c Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/hero_kit.gif differ diff --git a/commission_plan/static/description/assets/screenshots/output.gif b/commission_plan/static/description/assets/screenshots/output.gif new file mode 100644 index 000000000..bae45f11a Binary files /dev/null and b/commission_plan/static/description/assets/screenshots/output.gif differ diff --git a/commission_plan/static/description/banner.png b/commission_plan/static/description/banner.png new file mode 100644 index 000000000..107180774 Binary files /dev/null and b/commission_plan/static/description/banner.png differ diff --git a/commission_plan/static/description/icon.png b/commission_plan/static/description/icon.png new file mode 100644 index 000000000..cc2f98028 Binary files /dev/null and b/commission_plan/static/description/icon.png differ diff --git a/commission_plan/static/description/index.html b/commission_plan/static/description/index.html new file mode 100644 index 000000000..c1588b663 --- /dev/null +++ b/commission_plan/static/description/index.html @@ -0,0 +1,693 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+
+ +

+ CRM Commission Plan

+
+ +

+ CRM Commission Plan for odoo13 +

+ +
+
+ +
+
+

+ Explore this module

+ + +
+
+
+ +
+
+

+ Overview

+
+

+ Motivating your sales representatives is one of the key factors for successful sales. The + commission-based + plan helps to motivate your Sales Teams and Salespersons to achieve the goals and earnings. + A Commission Plan module is a monetary incentive for motivating Salespeople to meet their Sales + quota + and the CRM Commission Plan has embraced the functionality. In the CRM Commission Plan, we have 2 types of Commission Plans + which are being defined product-wise and revenue-wise further under revenue-wise we have two types: + the straight commission and graduated commission.
+ Moreover, the Salesperson and the sales team + are + rewarded based on the business Opportunities they bring into the company with a well-structured plan + which + can be crafted in the beginning. +

+
+
+ +
+
+

+ Features

+
+
+
+
+ +

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

+
+
+
+
+
+ +
+
+

+ Configuration

+
+

+ For creating new commission plans:
+

    +
  1. + Creating new commissions:
    +

    Initially Create a new commission and Choose a name to distinguish + that typ

    +
  2. +
  3. + Select the type of the Commission:
    +

    Product-based: Commissions are calculated as the percentage of + the price based on the selected product in the form.

    +

    Revenue-based: A certain percentage of revenue is given as + Commission to the Salesperson

    +

    + Straight revenue: Commissions are calculated using a fixed + percentage of the revenue sold. You can fill the percentage in the field "Commission + rate".
    +

    +

    + Graduated revenue: Commissions are calculated as a percentage + of the revenue generated at amount intervals.
    +

    +

    + You can fill in the amount intervals and the percentages in the + "Graduated Revenue Commission" field.
    +

    +
  4. +
+ +

+ For adding Commission in Salesperson & Sales team:
+

+ Go to CRM -> Configuration -> Salesperson or Sales team +
    +
  • Edit the Salesperson or Sales team
  • +
  • Choose a commission type
  • +
  • Save it
  • +
+ +

+ For printing Commission in XLSX report::
+

+ Go to CRM -> Configuration -> Salesperson or Sales team +
    +
  • CRM -> Reporting -> Commission Report
  • +
  • CRM -> Reporting -> Commission Report
  • +
+
+
+ + +
+
+

+ Screenshots

+
+
+
+ +

Commission Plan

+
+

The Commission Plan window can be accessed from the Configuration tab of the module and + selected + on + the Commission Plan menu. Here all the Commission Plan details of the operation in respect + to + the + functioning of the Odoo CRM will be depicted.

+ +
+ +
+
+ +

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 Commission Plan 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 Commission Plan 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 Commission Plan 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 Commission Plan 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 Commission Plan and further select the Commission Plan menu and select the Required entries + and + Click to Print XLS.

+ +
+
+
+ + +
+
+

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

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

+ Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/commission_plan/static/src/js/action_manager.js b/commission_plan/static/src/js/action_manager.js new file mode 100644 index 000000000..ef80bca0d --- /dev/null +++ b/commission_plan/static/src/js/action_manager.js @@ -0,0 +1,43 @@ +odoo.define('commission_plan.action_manager', function(require){ + "use strict"; + /* + * Purpose is to add actions of type + * 'ir.actions.report' to the ActionManager + */ + var ActionManager = require('web.ActionManager'); + var framework = require('web.framework'); + var session = require('web.session'); + + ActionManager.include({ + /* + * Executes actions of type 'ir.actions.report'. + * @private + * @param {Object} action the description of the action to execute + * @param {Object} options @see doAction for details + * @returns {Promise} resolved when the action has been executed + */ + _executexlsxReportDownloadAction: function (action) { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + }, + /* + * Overrides to handle the 'ir.actions.report' actions. + * @override + * @private + */ + _executeReportAction: function (action, options) { + if (action.report_type === 'xlsx') { + return this._executexlsxReportDownloadAction(action, options); + } + return this._super.apply(this, arguments); + }, + }); +}); \ No newline at end of file diff --git a/commission_plan/views/action_manager.xml b/commission_plan/views/action_manager.xml new file mode 100644 index 000000000..211422d04 --- /dev/null +++ b/commission_plan/views/action_manager.xml @@ -0,0 +1,11 @@ + + + +