Browse Source

[FIX] Bug Fixed

pull/129/head
Ajmalcybrosys 6 years ago
parent
commit
3a683384a3
  1. 8
      hr_payslip_monthly_report/__init__.py
  2. 13
      hr_payslip_monthly_report/__manifest__.py
  3. 45
      hr_payslip_monthly_report/__manifest__.py~
  4. 6
      hr_payslip_monthly_report/doc/RELEASE_NOTES.md
  5. 7
      hr_payslip_monthly_report/models/__init__.py
  6. 20
      hr_payslip_monthly_report/models/hr_payroll_report.py

8
hr_payslip_monthly_report/__init__.py

@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Technologies(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -14,7 +14,7 @@
#
# 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 <https://www.gnu.org/licenses/>.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

13
hr_payslip_monthly_report/__manifest__.py

@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Technologies(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -14,13 +14,12 @@
#
# 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 <https://www.gnu.org/licenses/>.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Payroll-Payslip Reporting',
'version': '12.0.1.0.0',
'version': '12.0.1.0.1',
'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""",
@ -30,7 +29,7 @@
'website': 'https://www.cybrosys.com',
'category': 'Generic Modules/Human Resources',
'depends': ['hr_payroll'],
'license': 'LGPL-3',
'license': 'AGPL-3',
'data': [
'security/ir.model.access.csv',
'views/menu_payslip_report.xml'

45
hr_payslip_monthly_report/__manifest__.py~

@ -1,45 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nikhil krishnan(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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,
}

6
hr_payslip_monthly_report/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <hr_payslip_monthly_report>
#### 05.11.2019
#### Version 12.0.1.0.1
##### FIX
- Bug Fixed

7
hr_payslip_monthly_report/models/__init__.py

@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Technologies(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +14,7 @@
#
# 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 <https://www.gnu.org/licenses/>.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

20
hr_payslip_monthly_report/models/hr_payroll_report.py

@ -38,24 +38,28 @@ class PayrollReportView(models.Model):
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
"""
min(psl.id),ps.id,ps.number,emp.id as name,dp.id as department_id,jb.department_id as job_id,cmp.id as company_id,ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state """
print(select_str, "select_str")
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'
hr_payslip_line psl
join hr_payslip ps on ps.id=psl.slip_id
join hr_employee emp on ps.employee_id=emp.id
left join hr_department dp on emp.department_id=dp.id
left join hr_job jb on emp.job_id=jb.id
join res_company cmp on cmp.id=ps.company_id
where psl.code='NET'
"""
print(from_str, "from_str")
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
group by ps.number,ps.id,emp.id,dp.id,jb.id,cmp.id,ps.date_from,ps.date_to,ps.state
"""
print(group_by_str, "group_by_str")
return group_by_str
@api.model_cr

Loading…
Cancel
Save