diff --git a/sales_care_of_commission/README.rst b/sales_care_of_commission/README.rst new file mode 100644 index 000000000..930cccb2c --- /dev/null +++ b/sales_care_of_commission/README.rst @@ -0,0 +1,40 @@ +Sales Care of Commission +======================== +Calculate and Print report for Care of commission + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: + AKHILESH N S @ Cybrosys + +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/sales_care_of_commission/__init__.py b/sales_care_of_commission/__init__.py new file mode 100644 index 000000000..8cc240081 --- /dev/null +++ b/sales_care_of_commission/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 . import models +from . import wizard +from . import reports diff --git a/sales_care_of_commission/__manifest__.py b/sales_care_of_commission/__manifest__.py new file mode 100644 index 000000000..6ce1ea870 --- /dev/null +++ b/sales_care_of_commission/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 . +# +############################################################################# +{ + 'name': 'Sales Care of Commission', + 'version': '12.0.1.0.0', + 'summary': """To address a contact, sale or invoice in care of someone else""", + 'description': """Calculate and Print report for Sales Care of commission""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'category': 'Accounting', + 'depends': ['sale', 'account'], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/res_partner_views.xml', + 'views/sale_order_views.xml', + 'views/invoice_views.xml', + 'views/report_care_of_commission_templates.xml', + 'wizard/care_of_partner_report_view.xml', + 'reports/report.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/sales_care_of_commission/doc/RELEASE_NOTES.md b/sales_care_of_commission/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..0b249cae8 --- /dev/null +++ b/sales_care_of_commission/doc/RELEASE_NOTES.md @@ -0,0 +1,8 @@ +## Module + +#### 18.09.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit for sales_care_of_commission + + diff --git a/sales_care_of_commission/models/__init__.py b/sales_care_of_commission/models/__init__.py new file mode 100644 index 000000000..46ab4647b --- /dev/null +++ b/sales_care_of_commission/models/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 . import res_partner +from . import sale_order +from . import account_invoice +from . import res_config_settings +from . import account_invoice_report diff --git a/sales_care_of_commission/models/account_invoice.py b/sales_care_of_commission/models/account_invoice.py new file mode 100644 index 000000000..07b04c6ca --- /dev/null +++ b/sales_care_of_commission/models/account_invoice.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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, fields, api + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + care_of_partner_id = fields.Many2one('res.partner', string='Care Of (C/O)', required=False, + readonly=True, + states={'draft': [('readonly', False)]}, + help="To address a contact in care of someone else") + care_of_percentage = fields.Float(string='C/O Commission Percentage', readonly=True, + states={'draft': [('readonly', False)]}) + care_of_commission = fields.Monetary(string='C/O Commission Amount', + store=True, readonly=True, compute='_compute_amount') + + @api.onchange('partner_id', 'company_id') + def _onchange_partner_id(self): + res = super(AccountInvoice, self)._onchange_partner_id() + self.care_of_partner_id = self.partner_id.care_of_partner_id + self.care_of_percentage = self.partner_id.care_of_percentage + return res + + @api.one + @api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount', 'tax_line_ids.amount_rounding', + 'currency_id', 'company_id', 'date_invoice', 'type') + def _compute_amount(self): + """Compute C/O Commission Amount""" + res = super(AccountInvoice, self)._compute_amount() + self.care_of_commission = self.amount_untaxed * self.care_of_percentage + return res + + @api.model + def create(self, vals): + """Adding c/o data from sale order to invoice. Commission amount not passing, it will + compute from invoice model""" + if vals.get('origin'): + order_id = self.env['sale.order'].search([('name', '=', vals.get('origin'))]) + vals.update(dict(care_of_partner_id=order_id.care_of_partner_id.id or False, + care_of_percentage=order_id.care_of_percentage + )) + return super(AccountInvoice, self).create(vals) diff --git a/sales_care_of_commission/models/account_invoice_report.py b/sales_care_of_commission/models/account_invoice_report.py new file mode 100644 index 000000000..36894a3e6 --- /dev/null +++ b/sales_care_of_commission/models/account_invoice_report.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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, fields + + +class AccountInvoiceReport(models.Model): + _inherit = "account.invoice.report" + + care_of_partner_id = fields.Many2one('res.partner', string='Care Of (C/O)', readonly=True) + care_of_percentage = fields.Float(string='C/O Commission Percentage', readonly=True) + care_of_commission = fields.Monetary(string='C/O Commission Amount', readonly=True) + + def _select(self): + return super(AccountInvoiceReport, self)._select() +\ + ", sub.care_of_partner_id as care_of_partner_id" +\ + ", sub.care_of_percentage as care_of_percentage" + \ + ", sub.care_of_commission as care_of_commission" + + def _sub_select(self): + return super(AccountInvoiceReport, self)._sub_select() +\ + ", ai.care_of_partner_id as care_of_partner_id" +\ + ", ai.care_of_percentage as care_of_percentage" + \ + ", ai.care_of_commission as care_of_commission" + + def _group_by(self): + return super(AccountInvoiceReport, self)._group_by() + \ + ", ai.care_of_partner_id" + ", ai.care_of_percentage" + \ + ", ai.care_of_commission" diff --git a/sales_care_of_commission/models/res_config_settings.py b/sales_care_of_commission/models/res_config_settings.py new file mode 100755 index 000000000..85b9ae116 --- /dev/null +++ b/sales_care_of_commission/models/res_config_settings.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 api, fields, models + + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + care_of_commission = fields.Float("Default Care of Percentage", + config_parameter='care_of_partner.commission') + + @api.model + def get_values(self): + res = super(ResConfigSettings, self).get_values() + res.update( + care_of_commission=self.env['ir.config_parameter'].sudo().get_param('care_of_partner.commission'), + ) + return res + + @api.multi + def set_values(self): + super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param('care_of_partner.commission', self.care_of_commission) + + + diff --git a/sales_care_of_commission/models/res_partner.py b/sales_care_of_commission/models/res_partner.py new file mode 100644 index 000000000..2d256eb8d --- /dev/null +++ b/sales_care_of_commission/models/res_partner.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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, fields, api + + +class Partner(models.Model): + _inherit = 'res.partner' + + care_of_partner_id = fields.Many2one('res.partner', string='Care Of (C/O)', required=False, + help="To address a contact in care of someone else") + care_of_percentage = fields.Float(string='C/O Commission Percentage') + total_care_of_commission = fields.Monetary('C/O Total Commission', + compute='_compute_total_care_of_commission', + default=0.0) + + @api.multi + def _compute_total_care_of_commission(self): + """Compute total C/O commission amount received by a partner""" + for rec in self: + invoices = self.env['account.invoice'].search([('care_of_partner_id', '=', rec.id), + ('state', 'not in', ('draft', 'cancel'))]) + if invoices: + rec.total_care_of_commission = sum(inv.care_of_commission for inv in invoices) + + @api.multi + def action_view_care_of_invoices(self): + """Show all invoice records having current contact as C/O Partner""" + self.ensure_one() + action = self.env.ref('account.action_invoice_tree1').read()[0] + invoices = self.env['account.invoice'].search([('care_of_partner_id', '=', self.id), + ('state', 'not in', ('draft', 'cancel'))]) + action['domain'] = [ + ('id', 'in', invoices.ids), + ] + return action + + @api.onchange('care_of_partner_id') + def onchange_care_of_partner_id(self): + self.care_of_percentage = self.env['ir.config_parameter'].sudo().\ + get_param('care_of_partner.commission') \ + if self.care_of_partner_id else None diff --git a/sales_care_of_commission/models/sale_order.py b/sales_care_of_commission/models/sale_order.py new file mode 100644 index 000000000..006d40463 --- /dev/null +++ b/sales_care_of_commission/models/sale_order.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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, fields, api + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + care_of_partner_id = fields.Many2one('res.partner', string='Care Of (C/O)', required=False, + readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, + help="To address a contact in care of someone else") + care_of_percentage = fields.Float(string='C/O Commission Percentage', + readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + care_of_commission = fields.Monetary(string='C/O Commission Amount', store=True, readonly=True, + compute='_amount_all') + + @api.onchange('partner_id') + def onchange_partner_id(self): + super(SaleOrder, self).onchange_partner_id() + self.care_of_partner_id = self.partner_id.care_of_partner_id + self.care_of_percentage = self.partner_id.care_of_percentage + + @api.depends('order_line.price_total') + def _amount_all(self): + """Compute the C/O Commission amounts of the SO""" + res = super(SaleOrder, self)._amount_all() + for order in self: + order.update({ + 'care_of_commission': order.care_of_percentage * order.amount_untaxed + }) + return res diff --git a/sales_care_of_commission/reports/__init__.py b/sales_care_of_commission/reports/__init__.py new file mode 100644 index 000000000..049411a21 --- /dev/null +++ b/sales_care_of_commission/reports/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 . import report_commission_render diff --git a/sales_care_of_commission/reports/report.xml b/sales_care_of_commission/reports/report.xml new file mode 100644 index 000000000..904575227 --- /dev/null +++ b/sales_care_of_commission/reports/report.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/sales_care_of_commission/reports/report_commission_render.py b/sales_care_of_commission/reports/report_commission_render.py new file mode 100644 index 000000000..1c9e0efc6 --- /dev/null +++ b/sales_care_of_commission/reports/report_commission_render.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 api, models, fields, _ +from odoo.exceptions import ValidationError + + +class ReportCareOfCommission(models.AbstractModel): + _name = 'report.sales_care_of_commission.report_commission' + + @api.model + def _get_report_values(self, docids, data=None): + filters = data['form'] + domain = [('care_of_partner_id', '!=', None), ('state', 'not in', ('draft', 'cancel')), + ('company_id', '=', filters['company_id'][0])] + if filters['date_from']: + domain.append(('date_invoice', '>=', filters['date_from'])) + if filters['date_to']: + domain.append(('date_invoice', '<=', filters['date_to'])) + if filters['partner_id']: + domain.append(('care_of_partner_id', '=', filters['partner_id'][0])) + if filters['customer_id']: + domain.append(('partner_id', '=', filters['customer_id'][0])) + invoices = self.env['account.invoice'].search(domain) + care_of_partner_ids = invoices.mapped('care_of_partner_id') + docs = dict() + for p in care_of_partner_ids: + partner_invoices = invoices.filtered(lambda inv: inv.care_of_partner_id == p) + docs[p.id] = { + 'name': p.name, + 'invoices': partner_invoices, + 'sum_untax': sum(a.amount_untaxed for a in partner_invoices), + 'sum_comm': sum(a.care_of_commission for a in partner_invoices) + } + if not invoices: + raise ValidationError(_('No matching data fund. Please change filter parameters and try.')) + return { + 'doc_ids': docids, + 'doc_model': data['model'], + 'data': data['form'], + 'docs': docs, + 'print_time': fields.Datetime.now(), + } diff --git a/sales_care_of_commission/static/description/banner.png b/sales_care_of_commission/static/description/banner.png new file mode 100644 index 000000000..dc558966a Binary files /dev/null and b/sales_care_of_commission/static/description/banner.png differ diff --git a/sales_care_of_commission/static/description/icon.png b/sales_care_of_commission/static/description/icon.png new file mode 100644 index 000000000..f7e01d8e0 Binary files /dev/null and b/sales_care_of_commission/static/description/icon.png differ diff --git a/sales_care_of_commission/static/description/images/account_day_book.jpeg b/sales_care_of_commission/static/description/images/account_day_book.jpeg new file mode 100644 index 000000000..07e6902f6 Binary files /dev/null and b/sales_care_of_commission/static/description/images/account_day_book.jpeg differ diff --git a/sales_care_of_commission/static/description/images/account_reports_xlsx.jpeg b/sales_care_of_commission/static/description/images/account_reports_xlsx.jpeg new file mode 100644 index 000000000..b3ce5bdcc Binary files /dev/null and b/sales_care_of_commission/static/description/images/account_reports_xlsx.jpeg differ diff --git a/sales_care_of_commission/static/description/images/bank_book_dynamic_reports.png b/sales_care_of_commission/static/description/images/bank_book_dynamic_reports.png new file mode 100644 index 000000000..d74daba97 Binary files /dev/null and b/sales_care_of_commission/static/description/images/bank_book_dynamic_reports.png differ diff --git a/sales_care_of_commission/static/description/images/cash_book_dynamic_reports.png b/sales_care_of_commission/static/description/images/cash_book_dynamic_reports.png new file mode 100644 index 000000000..35bd4aee9 Binary files /dev/null and b/sales_care_of_commission/static/description/images/cash_book_dynamic_reports.png differ diff --git a/sales_care_of_commission/static/description/images/checked.png b/sales_care_of_commission/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/sales_care_of_commission/static/description/images/checked.png differ diff --git a/sales_care_of_commission/static/description/images/cybrosys.png b/sales_care_of_commission/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/sales_care_of_commission/static/description/images/cybrosys.png differ diff --git a/sales_care_of_commission/static/description/images/day_book_dynamic_report.jpeg b/sales_care_of_commission/static/description/images/day_book_dynamic_report.jpeg new file mode 100644 index 000000000..2409df5bb Binary files /dev/null and b/sales_care_of_commission/static/description/images/day_book_dynamic_report.jpeg differ diff --git a/sales_care_of_commission/static/description/images/dynamic_reports_pdf.png b/sales_care_of_commission/static/description/images/dynamic_reports_pdf.png new file mode 100644 index 000000000..16745e06c Binary files /dev/null and b/sales_care_of_commission/static/description/images/dynamic_reports_pdf.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-1.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-1.png new file mode 100644 index 000000000..1bb42da16 Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-1.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-2.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-2.png new file mode 100644 index 000000000..de2e9f13e Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-2.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-3.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-3.png new file mode 100644 index 000000000..f760428eb Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-3.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-4.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-4.png new file mode 100644 index 000000000..9771080bf Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-4.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-5.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-5.png new file mode 100644 index 000000000..e3ebbccd6 Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-5.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission-6.png b/sales_care_of_commission/static/description/images/sales_care_of_commission-6.png new file mode 100644 index 000000000..7b333623b Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission-6.png differ diff --git a/sales_care_of_commission/static/description/images/sales_care_of_commission.png b/sales_care_of_commission/static/description/images/sales_care_of_commission.png new file mode 100644 index 000000000..da288a1eb Binary files /dev/null and b/sales_care_of_commission/static/description/images/sales_care_of_commission.png differ diff --git a/sales_care_of_commission/static/description/images/youtube.png b/sales_care_of_commission/static/description/images/youtube.png new file mode 100644 index 000000000..4790de86b Binary files /dev/null and b/sales_care_of_commission/static/description/images/youtube.png differ diff --git a/sales_care_of_commission/static/description/index.html b/sales_care_of_commission/static/description/index.html new file mode 100644 index 000000000..75448b397 --- /dev/null +++ b/sales_care_of_commission/static/description/index.html @@ -0,0 +1,357 @@ + + +
cybrosys-logo
+ +
+
+
+

Sales Care of Commission

+

Record care of commission in contact, sale order, invoice and print their pdf report

+
+

Key Highlights

+
    +
  • checkCommission based on a percentage of the amount of the sale.
  • +
+
    +
  • checkShows the total commission amount from partner form.
  • +
+
    +
  • checkShows the commission amount & percentage in invoices analysis pivot view.
  • +
+
    +
  • checkPrint C/O partner pdf report.
  • +
+ +
+
+
+
+ +
+
+
+ + + +
+
+ +

Overview

+
+

+ This module helps to address a contact, sale or invoice in care of someone else and calculate a percentage-wise commission amount for their effort. +

+
+ + +
+ +
+

Screenshots

+
+
+
+ + + +
+
+
+
+ + +
+ Video +

Video

+
+

Sales Care of Commission

+ + +
+ Cybrosys Cover Video +
+ +
+
+ + + +
+
    + + +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

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

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+ + diff --git a/sales_care_of_commission/views/invoice_views.xml b/sales_care_of_commission/views/invoice_views.xml new file mode 100644 index 000000000..868c2902e --- /dev/null +++ b/sales_care_of_commission/views/invoice_views.xml @@ -0,0 +1,19 @@ + + + + + account.invoice.care_of + account.invoice + + + + + + + + + + + + + diff --git a/sales_care_of_commission/views/report_care_of_commission_templates.xml b/sales_care_of_commission/views/report_care_of_commission_templates.xml new file mode 100644 index 000000000..a2d19e748 --- /dev/null +++ b/sales_care_of_commission/views/report_care_of_commission_templates.xml @@ -0,0 +1,72 @@ + + + + diff --git a/sales_care_of_commission/views/res_config_settings_views.xml b/sales_care_of_commission/views/res_config_settings_views.xml new file mode 100644 index 000000000..692067a75 --- /dev/null +++ b/sales_care_of_commission/views/res_config_settings_views.xml @@ -0,0 +1,26 @@ + + + + res.config.settings.form.inherit.care.of + res.config.settings + + + +
+
+
+ Sales Care of Commission +
+ Default Sales Care of Commission for partners +
+
+ +
+
+
+ + + + + + diff --git a/sales_care_of_commission/views/res_partner_views.xml b/sales_care_of_commission/views/res_partner_views.xml new file mode 100644 index 000000000..b92e79856 --- /dev/null +++ b/sales_care_of_commission/views/res_partner_views.xml @@ -0,0 +1,30 @@ + + + + + res.partner.form.care.of + res.partner + + + + + + + + + + + + + + + diff --git a/sales_care_of_commission/views/sale_order_views.xml b/sales_care_of_commission/views/sale_order_views.xml new file mode 100644 index 000000000..b69acf1cd --- /dev/null +++ b/sales_care_of_commission/views/sale_order_views.xml @@ -0,0 +1,19 @@ + + + + + sale.order.care_of + sale.order + + + + + + + + + + + + + diff --git a/sales_care_of_commission/wizard/__init__.py b/sales_care_of_commission/wizard/__init__.py new file mode 100644 index 000000000..06f2f31ef --- /dev/null +++ b/sales_care_of_commission/wizard/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 . import care_of_partner_report_wizard + + diff --git a/sales_care_of_commission/wizard/care_of_partner_report_view.xml b/sales_care_of_commission/wizard/care_of_partner_report_view.xml new file mode 100644 index 000000000..4a46b4674 --- /dev/null +++ b/sales_care_of_commission/wizard/care_of_partner_report_view.xml @@ -0,0 +1,43 @@ + + + + C/O Commission Report + careof.print.commission + +
+ + + + + + + + + +
+
+
+
+
+ + + C/O Commission Report + careof.print.commission + form + form + + new + + + + + +
diff --git a/sales_care_of_commission/wizard/care_of_partner_report_wizard.py b/sales_care_of_commission/wizard/care_of_partner_report_wizard.py new file mode 100644 index 000000000..9de4625ce --- /dev/null +++ b/sales_care_of_commission/wizard/care_of_partner_report_wizard.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S (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 fields, models, api + + +class AccountPrintJournal(models.TransientModel): + _name = "careof.print.commission" + _description = "Account Print Care of Commission" + + @api.model + def _get_company(self): + return self.env.user.company_id + + company_id = fields.Many2one('res.company', string='Company', required=True, default=_get_company, + help='The company this user is currently working for.', + context={'user_preference': True}) + partner_id = fields.Many2one('res.partner', string='Partner', required=False) + customer_id = fields.Many2one('res.partner', string='Invoice Customer', required=False) + date_from = fields.Date(string='Start Date', default=fields.Date().today().replace(day=1)) + date_to = fields.Date(string='End Date') + + @api.onchange('company_id') + def onchange_company_id(self): + return {'domain': {'partner_id': [('company_id', '=', self.company_id.id)]}} + + @api.multi + def print_report(self): + active_ids = self.env.context.get('active_ids', []) + datas = { + 'ids': active_ids, + 'model': 'account.invoice', + 'form': self.read()[0] + } + return self.env.ref('sales_care_of_commission.action_report_commission').report_action([], data=datas) diff --git a/sandwich_rule/README.rst b/sandwich_rule/README.rst new file mode 100644 index 000000000..a359c7377 --- /dev/null +++ b/sandwich_rule/README.rst @@ -0,0 +1,40 @@ +Sandwich Rule For Leaves +======================== +Add Sandwich Rule in Employee Leaves. + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: + SREEJITH SASIDHARAN @ Cybrosys + +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/sandwich_rule/__init__.py b/sandwich_rule/__init__.py new file mode 100644 index 000000000..512e11207 --- /dev/null +++ b/sandwich_rule/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: SREEJITH SASIDHARAN (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 . import models diff --git a/sandwich_rule/__manifest__.py b/sandwich_rule/__manifest__.py new file mode 100644 index 000000000..c6864fa1f --- /dev/null +++ b/sandwich_rule/__manifest__.py @@ -0,0 +1,42 @@ + +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: SREEJITH SASIDHARAN (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 . +# +############################################################################# + +{ + 'name': 'Sandwich Rule For Leaves', + 'version': '12.0.1.0.0', + 'category': 'Human Resource', + 'summary': 'Adding sandwich rule to employee leaves', + 'description': 'Adding sandwich rule to employee leaves, employee leave rule', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'hr_holidays'], + 'data': [ + 'views/leave_apply.xml'], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/sandwich_rule/doc/RELEASE_NOTES.md b/sandwich_rule/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1827241d2 --- /dev/null +++ b/sandwich_rule/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 18.09.2019 +#### Version 12.0.1.0.0 +#### ADD +- Initial Commit for sandwich_rule + + + diff --git a/sandwich_rule/models/__init__.py b/sandwich_rule/models/__init__.py new file mode 100644 index 000000000..90b20cecd --- /dev/null +++ b/sandwich_rule/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: SREEJITH SASIDHARAN (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 . import leave_apply diff --git a/sandwich_rule/models/leave_apply.py b/sandwich_rule/models/leave_apply.py new file mode 100644 index 000000000..2f3220582 --- /dev/null +++ b/sandwich_rule/models/leave_apply.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: SREEJITH SASIDHARAN (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 timedelta +from odoo import api, fields, models + + +class EmployeeConfig(models.Model): + _inherit = 'hr.employee' + + sandwich = fields.Boolean(string="Apply") + leave_notification = fields.Boolean(string="Show Notification") + + +class GlobalConfig(models.Model): + _inherit = 'resource.calendar' + sandwich = fields.Boolean(string="Sandwich Rule") + + @api.onchange('sandwich') + def set_sandwich(self): + for employee in self.env['hr.employee'].search([('resource_calendar_id', '=', self._origin.id)]): + employee.write({'sandwich': self.sandwich}) + + +class LeaveApply(models.Model): + _inherit = 'hr.leave' + set_notification = fields.Boolean() + @api.multi + @api.depends('request_date_from', 'request_date_to', 'employee_id') + def _compute_number_of_days_display(self): + res = super(LeaveApply, self)._compute_number_of_days_display() + for record in self: + start_date = record.date_from + end_date = record.date_to + if record.employee_id.sandwich and record.employee_id \ + and record.employee_id.resource_calendar_id.sandwich and record.employee_id: + record.set_notification = record.employee_id.leave_notification + + leave_dates = [] + for leave_days in record.employee_id.resource_calendar_id.global_leave_ids: + if leave_days.date_from.date() + timedelta(1) == leave_days.date_to.date(): + leave_dates.append(str(leave_days.date_to.date())) + else: + duration = (leave_days.date_to - leave_days.date_from).days + 1 + for single_date in (leave_days.date_from + timedelta(days) for days in range(duration)): + leave_dates.append(str(single_date.date())) + + working_days = [] + for day in record.employee_id.resource_calendar_id.attendance_ids: + if int(day.dayofweek) not in working_days: + working_days.append(int(day.dayofweek)) + total_days = (end_date - start_date).days + 1 + + check = 0 + for day in range(1, 31): + next_date = (end_date + timedelta(day)).date() + next_dates = str(next_date) in leave_dates or next_date.weekday() not in working_days + if next_dates: + check += 1 + else: + break + for day in range(1, 31): + previous_date = (start_date - timedelta(day)).date() + previous_dates = str(previous_date) in leave_dates or previous_date.weekday() not in working_days + if previous_dates: + check += 1 + else: + break + if start_date.date() != end_date.date(): + record.number_of_days = total_days + check + record.number_of_days_display = record.number_of_days + else: + if record.number_of_days != 0: + record.number_of_days += check + record.number_of_days_display = record.number_of_days + else: + record.set_notification = False + record.number_of_days = record._get_number_of_days(record.date_from, record.date_to, record.employee_id.id) + return res + diff --git a/sandwich_rule/static/description/banner.png b/sandwich_rule/static/description/banner.png new file mode 100644 index 000000000..0c5f28431 Binary files /dev/null and b/sandwich_rule/static/description/banner.png differ diff --git a/sandwich_rule/static/description/icon.png b/sandwich_rule/static/description/icon.png new file mode 100644 index 000000000..8059d8dfc Binary files /dev/null and b/sandwich_rule/static/description/icon.png differ diff --git a/sandwich_rule/static/description/images/banner_account_reports_xlsx.jpg b/sandwich_rule/static/description/images/banner_account_reports_xlsx.jpg new file mode 100644 index 000000000..b3ce5bdcc Binary files /dev/null and b/sandwich_rule/static/description/images/banner_account_reports_xlsx.jpg differ diff --git a/sandwich_rule/static/description/images/banner_accounting_dynamic_reports.gif b/sandwich_rule/static/description/images/banner_accounting_dynamic_reports.gif new file mode 100644 index 000000000..d4530e466 Binary files /dev/null and b/sandwich_rule/static/description/images/banner_accounting_dynamic_reports.gif differ diff --git a/sandwich_rule/static/description/images/banner_employee_documents.jpeg b/sandwich_rule/static/description/images/banner_employee_documents.jpeg new file mode 100644 index 000000000..931855443 Binary files /dev/null and b/sandwich_rule/static/description/images/banner_employee_documents.jpeg differ diff --git a/sandwich_rule/static/description/images/banner_project_task_timer.jpeg b/sandwich_rule/static/description/images/banner_project_task_timer.jpeg new file mode 100644 index 000000000..1ce48898d Binary files /dev/null and b/sandwich_rule/static/description/images/banner_project_task_timer.jpeg differ diff --git a/sandwich_rule/static/description/images/banner_task_deadline_reminder.jpeg b/sandwich_rule/static/description/images/banner_task_deadline_reminder.jpeg new file mode 100644 index 000000000..998679818 Binary files /dev/null and b/sandwich_rule/static/description/images/banner_task_deadline_reminder.jpeg differ diff --git a/sandwich_rule/static/description/images/banner_whatsapp_web_message.png b/sandwich_rule/static/description/images/banner_whatsapp_web_message.png new file mode 100644 index 000000000..42824da9a Binary files /dev/null and b/sandwich_rule/static/description/images/banner_whatsapp_web_message.png differ diff --git a/sandwich_rule/static/description/images/checked.png b/sandwich_rule/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/sandwich_rule/static/description/images/checked.png differ diff --git a/sandwich_rule/static/description/images/cybrosys.png b/sandwich_rule/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/sandwich_rule/static/description/images/cybrosys.png differ diff --git a/sandwich_rule/static/description/images/pos_book_order.gif b/sandwich_rule/static/description/images/pos_book_order.gif new file mode 100644 index 000000000..935190db4 Binary files /dev/null and b/sandwich_rule/static/description/images/pos_book_order.gif differ diff --git a/sandwich_rule/static/description/images/sandwich leave_youtube.png b/sandwich_rule/static/description/images/sandwich leave_youtube.png new file mode 100644 index 000000000..e1f4e7c6e Binary files /dev/null and b/sandwich_rule/static/description/images/sandwich leave_youtube.png differ diff --git a/sandwich_rule/static/description/images/sandwich_rule.gif b/sandwich_rule/static/description/images/sandwich_rule.gif new file mode 100644 index 000000000..f41238dd9 Binary files /dev/null and b/sandwich_rule/static/description/images/sandwich_rule.gif differ diff --git a/sandwich_rule/static/description/images/sandwich_rule_1.png b/sandwich_rule/static/description/images/sandwich_rule_1.png new file mode 100644 index 000000000..1a55353ba Binary files /dev/null and b/sandwich_rule/static/description/images/sandwich_rule_1.png differ diff --git a/sandwich_rule/static/description/images/sandwich_rule_2.png b/sandwich_rule/static/description/images/sandwich_rule_2.png new file mode 100644 index 000000000..00d473e41 Binary files /dev/null and b/sandwich_rule/static/description/images/sandwich_rule_2.png differ diff --git a/sandwich_rule/static/description/images/sandwich_rule_3.png b/sandwich_rule/static/description/images/sandwich_rule_3.png new file mode 100644 index 000000000..dc1e74fb1 Binary files /dev/null and b/sandwich_rule/static/description/images/sandwich_rule_3.png differ diff --git a/sandwich_rule/static/description/index.html b/sandwich_rule/static/description/index.html new file mode 100644 index 000000000..92414f03e --- /dev/null +++ b/sandwich_rule/static/description/index.html @@ -0,0 +1,347 @@ + + +
cybrosys-logo
+ +
+
+
+

Sandwich Rule

+

Add Sandwich Rule in Employee Leaves.

+
+

Key Highlights

+
    +
  • checkSandwich rule option in employee leaves.
  • +
  • checkOption to enable/disable sandwich leaves in employee settings
  • +
  • checkOption for showing sandwich leave notification.
  • +
+
+
+
+
+ + + + + + +
+
+
+ + + +
+
+ +

Overview

+
+

+ The module helps HR to apply sandwich rule over employees, when they take leave in midst of two general leaves. Sandwich rule shall be applied after considering the start and end days of the general leaves. The module gets with an option to disable this feature for specific employees, also an option for showing the sandwich leave notification when employees apply their leaves.

+
+ +
+ +

Sandwich rule

+
+
    + +
  • + checkSandwich rule can be set on working times.
  • + +
  • + checkThis rule can be disabled for specific employees.
  • + +
  • + checkOption for showing sandwich leave notification, when applying leaves.
  • +
+
+ + + +
+ +
+

Screenshots

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

Video

+
+

Sandwich leave Demo

+ + +
+ Cybrosys Cover Video +
+ +
+
+ + + +
+
    + + +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

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

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+
+ diff --git a/sandwich_rule/views/leave_apply.xml b/sandwich_rule/views/leave_apply.xml new file mode 100644 index 000000000..509d4f985 --- /dev/null +++ b/sandwich_rule/views/leave_apply.xml @@ -0,0 +1,52 @@ + + + + + + leave.form.inherit + hr.leave + + + + +
Sandwich + leave is Active. +
+
+
+
+ + + sandwich.leave + hr.employee + + + + + + + + + + + + + + + sandwich.leave + resource.calendar + + + + + + + + + +
+
\ No newline at end of file