diff --git a/hr_payslip_monthly_report/README.rst b/hr_payslip_monthly_report/README.rst new file mode 100644 index 000000000..98b9367a0 --- /dev/null +++ b/hr_payslip_monthly_report/README.rst @@ -0,0 +1,14 @@ +Payroll-Payslip Reporting v10 +============================= +This Module help Human resource managers to get a over all view for the payslips as pivot. + +Features +======== + +* Pivot view for HR payslips. +* Group By options like Employee wise, department wise, job title wise, date wise, status wise and Company wise. +* Spot Export to XLS Report. + +Credits +======= +Nikhil Krishnan @ cybrosys, nikhil@cybrosys.in \ No newline at end of file diff --git a/hr_payslip_monthly_report/__init__.py b/hr_payslip_monthly_report/__init__.py new file mode 100644 index 000000000..5b63ab14d --- /dev/null +++ b/hr_payslip_monthly_report/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nikhil krishnan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +import models diff --git a/hr_payslip_monthly_report/__manifest__.py b/hr_payslip_monthly_report/__manifest__.py new file mode 100644 index 000000000..1a56c822e --- /dev/null +++ b/hr_payslip_monthly_report/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nikhil krishnan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +{ + 'name': 'Payroll-Payslip Reporting', + 'version': '10.0.1.0.0', + 'summary': """Payslip Pivot View Report.""", + 'description': """Payslip monthly report. + This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'http://www.cybrosys.com', + 'category': 'Human Resources', + 'depends': ['hr_payroll'], + 'license': 'LGPL-3', + 'data': [ + 'security/ir.model.access.csv', + 'views/menu_payslip_report.xml' + ], + 'demo': [], + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, +} diff --git a/hr_payslip_monthly_report/models/__init__.py b/hr_payslip_monthly_report/models/__init__.py new file mode 100644 index 000000000..6defde0e7 --- /dev/null +++ b/hr_payslip_monthly_report/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nikhil krishnan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +import hr_payroll_report + diff --git a/hr_payslip_monthly_report/models/hr_payroll_report.py b/hr_payslip_monthly_report/models/hr_payroll_report.py new file mode 100644 index 000000000..55a5c37d2 --- /dev/null +++ b/hr_payslip_monthly_report/models/hr_payroll_report.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nikhil krishnan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from odoo import fields, models, tools, api + + +class PayrollReportView(models.Model): + _name = 'hr.payroll.report.view' + _auto = False + + name = fields.Many2one('hr.employee', string='Employee') + date_from = fields.Date(string='From') + date_to = fields.Date(string='To') + state = fields.Selection([('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')], + string='Status') + job_id = fields.Many2one('hr.job', string='Job Title') + company_id = fields.Many2one('res.company', string='Company') + department_id = fields.Many2one('hr.department', string='Department') + net = fields.Float(string='Net Salary') + + def _select(self): + select_str = """ + min(ps.id) as id,emp.id as name,jb.id as job_id, + dp.id as department_id,cmp.id as company_id, + ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state + """ + return select_str + + def _from(self): + from_str = """ + hr_payslip_line psl join hr_payslip ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id) + join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id) + join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where psl.code='NET' + """ + return from_str + + def _group_by(self): + group_by_str = """ + group by emp.id,psl.total,ps.date_from, ps.date_to, ps.state,jb.id,dp.id,cmp.id + """ + return group_by_str + + @api.model_cr + def init(self): + tools.drop_view_if_exists(self.env.cr, self._table) + self.env.cr.execute("""CREATE or REPLACE VIEW %s as ( SELECT + %s + FROM %s + %s + )""" % (self._table, self._select(), self._from(), self._group_by())) + + +# _________________Query________________________ + +# select emp.name_related as name,emp.id as employee_id,jb.name as job,jb.id as job_id, +# dp.name as department,dp.id as department_id,cmp.name as company,cmp.id as company_id, +# ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state from hr_payslip_line psl join hr_payslip +# ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id) +# join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id) +# join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where +# psl.code='NET' group by emp.name_related,emp.id,psl.total,ps.date_from, ps.date_to, ps.state,dp.name,jb.name, +# cmp.name,jb.id,dp.id,cmp.id diff --git a/hr_payslip_monthly_report/security/ir.model.access.csv b/hr_payslip_monthly_report/security/ir.model.access.csv new file mode 100644 index 000000000..ed054578d --- /dev/null +++ b/hr_payslip_monthly_report/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_hr_payslip_monthly_report_manager,hr.payroll.report.view,hr_payslip_monthly_report.model_hr_payroll_report_view,hr.group_hr_manager,1,1,1,1 diff --git a/hr_payslip_monthly_report/static/description/HR Payslip Report view.png b/hr_payslip_monthly_report/static/description/HR Payslip Report view.png new file mode 100644 index 000000000..40c79a52c Binary files /dev/null and b/hr_payslip_monthly_report/static/description/HR Payslip Report view.png differ diff --git a/hr_payslip_monthly_report/static/description/HR report group by.png b/hr_payslip_monthly_report/static/description/HR report group by.png new file mode 100644 index 000000000..20f53735c Binary files /dev/null and b/hr_payslip_monthly_report/static/description/HR report group by.png differ diff --git a/hr_payslip_monthly_report/static/description/Payslip Graph Report.png b/hr_payslip_monthly_report/static/description/Payslip Graph Report.png new file mode 100644 index 000000000..7c318c474 Binary files /dev/null and b/hr_payslip_monthly_report/static/description/Payslip Graph Report.png differ diff --git a/hr_payslip_monthly_report/static/description/banner.jpg b/hr_payslip_monthly_report/static/description/banner.jpg new file mode 100644 index 000000000..aa8ba62e1 Binary files /dev/null and b/hr_payslip_monthly_report/static/description/banner.jpg differ diff --git a/hr_payslip_monthly_report/static/description/cybro_logo.png b/hr_payslip_monthly_report/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/hr_payslip_monthly_report/static/description/cybro_logo.png differ diff --git a/hr_payslip_monthly_report/static/description/icon.png b/hr_payslip_monthly_report/static/description/icon.png new file mode 100644 index 000000000..e176696bc Binary files /dev/null and b/hr_payslip_monthly_report/static/description/icon.png differ diff --git a/hr_payslip_monthly_report/static/description/index.html b/hr_payslip_monthly_report/static/description/index.html new file mode 100644 index 000000000..ccb8b3cdc --- /dev/null +++ b/hr_payslip_monthly_report/static/description/index.html @@ -0,0 +1,124 @@ +
+
+

Payroll-Payslip Reporting

+

Get an overview of the pay slips as pivot

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Retrieve pivot view of pay slips.
  • +
  •    Able to get Reports
  • +
      +
    • Employee wise,
    • +
    • Employee's department wise,
    • +
    • Employee's job title wise,
    • +
    • Pay slip's date wise,
    • +
    • Pay slip's status wise,
    • +
    • Company wise.
    • +
    +
  •    Spot Export to XLS Report.
  • +
+
+
+
+ +
+
+

Payroll Monthly Statement in Pivot View

+
+
+

+ This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group + criteria (Employee, Job title, Department, Company, Pay slip etc.). +

+
+
+
+
+ +
+
+

Payroll report as Pivot

+
+
+
+ +
+
+
+

+ HR managers need a complete payroll statement and also payroll monthly statement. From + this pivot view we can easily generate the custom payroll report views in excel format. Also + we can download it from there. From Odoo payroll report we can get only individual employee + pay slip reports. To make the use of HR payroll management system easier we can use this pivot + view to get the payroll/pay slip statement. +

+
+ +
+
+
+ +
+
+

Group by the pivot view

+
+
+
+ +
+
+
+

+ In this View we can easily generate custom reports by using the + button, + That is we can make the filters by groups, also we can get the counts too, from the "Measures" Button +

+
+
+
+
+ +
+
+

Graph View

+
+
+
+ +
+
+
+

+ In Pivot view we can easily generate custom Graphs like Pie Chart,Bar Chart, Line Chart. + With date and net salary or date and pay slip's counts. +

+
+
+
+
+ +
+

Need Any Help?

+ +
diff --git a/hr_payslip_monthly_report/views/menu_payslip_report.xml b/hr_payslip_monthly_report/views/menu_payslip_report.xml new file mode 100644 index 000000000..2b43b78d4 --- /dev/null +++ b/hr_payslip_monthly_report/views/menu_payslip_report.xml @@ -0,0 +1,68 @@ + + + + + hr.payslip.pivot + hr.payroll.report.view + + + + + + + + + + + hr.payslip.graph + hr.payroll.report.view + + + + + + + + + + hr.payslip.search + hr.payroll.report.view + + + + + + + + + + + + + + + + + + + + + + + + hr.payroll.report.view + Payslips + form + pivot,graph + {'search_default_year':1} + This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group + criteria (Employee, Job title, Department, Company, Pay slip etc.). + + + + + + + diff --git a/hr_payslip_monthly_report/views/quotation_handler.xml~ b/hr_payslip_monthly_report/views/quotation_handler.xml~ new file mode 100644 index 000000000..8c0e414d9 --- /dev/null +++ b/hr_payslip_monthly_report/views/quotation_handler.xml~ @@ -0,0 +1,112 @@ + + + + + Revised Quotation Orders + sale.order + form + tree,form + + [('parent_so_id', '=', active_id)] + +

+ Revised order against this Quotation Order. +

+
+
+ + + + + Sales Orders + ir.actions.act_window + sale.order + form + tree,kanban,form,calendar,pivot,graph + + {} + [('state', 'not in', ('draft','revised','sent', 'cancel'))] + +

+ Create a Quotation, the first step of a new sale. +

+ Once the quotation is confirmed, it becomes a sales order. + You'll be able to invoice it and collect payments. + From the Sales Orders menu, you can track delivery + orders or services. +

+
+
+ + + Quotations + ir.actions.act_window + sale.order + form + + tree,kanban,form,calendar,pivot,graph + {} + [('state','in',('pre','draft','sent','cancel'))] + + +

+ Create a Quotation, the first step of a new sale. +

+ Your next actions should flow efficiently: confirm the Quotation + to a Sale Order, then create the Invoice and collect the Payment. +

+ Note that once a Quotation becomes a Sale Order, it will be moved + from the Quotations list to the Sales Order list. +

+
+
+ + + sale.order.form + sale.order + + + + + + + + {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} + + + + {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} + + + + {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} + + + + {'readonly': [('state', 'in', ('sent','revised','done','cancel'))]} + + + + + + sale.order.tree + sale.order + + + + + + + +
+
\ No newline at end of file