Purnendu Singh (OpenERP) has proposed merging lp:~openerp-dev/openerp-india/payroll-india-yearly-report-psi into lp:~openerp-dev/openerp-india/payroll-india.
Requested reviews: OpenERP R&D Team (openerp-dev) For more details, see: https://code.launchpad.net/~openerp-dev/openerp-india/payroll-india-yearly-report-psi/+merge/82104 Hello, Added a new report to get details of employee's payslips by year. Thanks, Purnendu singh -- https://code.launchpad.net/~openerp-dev/openerp-india/payroll-india-yearly-report-psi/+merge/82104 Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openerp-india/payroll-india-yearly-report-psi into lp:~openerp-dev/openerp-india/payroll-india.
=== modified file 'l10n_in_hr_payroll/__init__.py' --- l10n_in_hr_payroll/__init__.py 2011-10-11 07:03:15 +0000 +++ l10n_in_hr_payroll/__init__.py 2011-11-14 07:29:29 +0000 @@ -1,8 +1,7 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,6 +20,7 @@ import hr_payroll import l10n_in_hr_payroll +import wizard import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file === modified file 'l10n_in_hr_payroll/__openerp__.py' --- l10n_in_hr_payroll/__openerp__.py 2011-10-11 07:21:41 +0000 +++ l10n_in_hr_payroll/__openerp__.py 2011-11-14 07:29:29 +0000 @@ -1,8 +1,7 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,6 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## + { 'name': 'Human Resource Payroll for India', 'category': 'Human Resources', @@ -45,8 +45,10 @@ 'update_xml': [ 'l10n_in_hr_payroll_view.xml', 'l10n_in_hr_payroll_data.xml', + 'l10n_in_hr_payroll_wizard.xml', 'data/hr.salary.rule.csv', 'l10n_in_hr_payroll_report.xml', + 'wizard/hr_payroll_summary_year_view.xml', ], 'demo_xml': ['l10n_in_hr_payroll_demo.xml'], 'installable': True === modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py' --- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2011-10-07 10:29:26 +0000 +++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2011-11-14 07:29:29 +0000 @@ -1,13 +1,12 @@ -#-*- coding:utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of === modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml' --- l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml 2011-10-12 05:51:55 +0000 +++ l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml 2011-11-14 07:29:29 +0000 @@ -1,14 +1,22 @@ <?xml version="1.0"?> <openerp> - <data> - - <report - auto="False" - id="payslip_details_report" - model="hr.payslip" - name="paylip.details.in" - rml="l10n_in_hr_payroll/report/report_payslip_details.rml" - string="PaySlip Details" /> - - </data> + <data> + <report + auto="False" + id="payslip_details_report" + model="hr.payslip" + name="paylip.details.in" + rml="l10n_in_hr_payroll/report/report_payslip_details.rml" + string="PaySlip Details" /> + + <report + auto="False" + menu="False" + id="account_general_ledger_landscape" + model="hr.payslip" + name="payslip.year.landscape" + rml="l10n_in_hr_payroll/report/report_payslip_year_landscape.rml" + string="Yearly Payslips"/> + + </data> </openerp> === added file 'l10n_in_hr_payroll/l10n_in_hr_payroll_wizard.xml' --- l10n_in_hr_payroll/l10n_in_hr_payroll_wizard.xml 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/l10n_in_hr_payroll_wizard.xml 2011-11-14 07:29:29 +0000 @@ -0,0 +1,18 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <menuitem + id="hr.menu_hr_reporting" + name="Reporting" + parent="hr.menu_hr_root" + sequence="10" /> + + <menuitem + id="menu_hr_reporting_payroll" + name="payroll" + parent="hr.menu_hr_reporting" + sequence="15"/> + + </data> +</openerp> === modified file 'l10n_in_hr_payroll/report/__init__.py' --- l10n_in_hr_payroll/report/__init__.py 2011-10-11 07:03:15 +0000 +++ l10n_in_hr_payroll/report/__init__.py 2011-11-14 07:29:29 +0000 @@ -1,16 +1,12 @@ -#!/usr/bin/env python -#-*- coding:utf-8 -*- - +# -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved -# d$ +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,5 +19,6 @@ ############################################################################## import report_payslip_details +import yearly_payslips # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === modified file 'l10n_in_hr_payroll/report/report_payslip_details.py' --- l10n_in_hr_payroll/report/report_payslip_details.py 2011-10-11 07:03:15 +0000 +++ l10n_in_hr_payroll/report/report_payslip_details.py 2011-11-14 07:29:29 +0000 @@ -1,16 +1,12 @@ -#!/usr/bin/env python -#-*- coding:utf-8 -*- - +# -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved -# d$ +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of === added file 'l10n_in_hr_payroll/report/report_payslip_year_landscape.rml' --- l10n_in_hr_payroll/report/report_payslip_year_landscape.rml 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/report/report_payslip_year_landscape.rml 2011-11-14 07:29:29 +0000 @@ -0,0 +1,339 @@ +<?xml version="1.0"?> +<document filename="test.pdf"> + <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" allowSplitting="20"> + <pageTemplate id="first"> + <frame id="first" x1="28.0" y1="42.0" width="786" height="511"/> + </pageTemplate> + </template> + <stylesheet> + <blockTableStyle id="Standard_Outline"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + </blockTableStyle> + <blockTableStyle id="Table_Header_Title"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + </blockTableStyle> + <blockTableStyle id="Table1"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> + </blockTableStyle> + <blockTableStyle id="Table4"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + </blockTableStyle> + <blockTableStyle id="Table5"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> + </blockTableStyle> + <blockTableStyle id="Table6"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> + </blockTableStyle> + <blockTableStyle id="Table2"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/> + </blockTableStyle> + <blockTableStyle id="Table3"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + </blockTableStyle> + <initialize> + <paraStyle name="all" alignment="justify"/> + </initialize> + <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P3" rightIndent="-56.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3"/> + <paraStyle name="P5" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="Standard" fontName="Helvetica"/> + <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> + <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> + <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> + <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> + <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="Index" fontName="Helvetica"/> + <paraStyle name="Footer" fontName="Helvetica"/> + <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> + <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="P10" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <images/> + </stylesheet> + <story> + <para style="P3">[[repeatIn(lines(data),'o')]]</para> + <para style="terp_default_8"> + <font color="white"> </font> + </para> + <para style="terp_default_8"> + <font color="white"> </font> + </para> + <blockTable colWidths="262.0,262.0,262.0" style="Table_Header_Title"> + <tr> + <td> + <para style="terp_header"> + <font color="white"> </font> + </para> + </td> + <td> + <para style="P5">Payslips by Year</para> + </td> + <td> + <para style="terp_header"> + <font color="white"> </font> + </para> + </td> + </tr> + </blockTable> + <blockTable colWidths="93.0,300.0,130.0,263.0" style="Table1"> + <tr> + <td> + <para style="P1">Name</para> + </td> + <td> + <para style="P1">[[o.name]]</para> + </td> + <td> + <para style="P1">Designation </para> + </td> + <td> + <para style="P6">[[ o.job_id.name or '' ]]</para> + </td> + </tr> + </blockTable> + <blockTable colWidths="93.0,693.0" style="Table4"> + <tr> + <td> + <para style="terp_default_Bold_8"> + <font face="Helvetica">Address </font> + </para> + </td> + <td> + <para style="P6">[[o.address_home_id and o.address_home_id.name or '' ]],[[o.address_home_id and o.address_home_id.street or '' ]],[[o.address_home_id and o.address_home_id.street2 or '' ]],[[o.address_home_id and o.address_home_id.zip or '' ]],[[o.address_home_id and o.address_home_id.city or '' ]],[[o.address_home_id and o.address_home_id.state_id and o.address_home_id.state_id.name or '' ]] [[o.address_home_id and o.address_home_id.country_id and o.address_home_id.country_id.name or '' ]]</para> + </td> + </tr> + </blockTable> + <blockTable colWidths="93.0,300.0,130.0,263.0" style="Table5"> + <tr> + <td> + <para style="P1">Email</para> + </td> + <td> + <para style="P6">[[ o.work_email or '' ]]</para> + </td> + <td> + <para style="terp_default_Bold_8"> + <font face="Helvetica">Identification No</font> + </para> + </td> + <td> + <para style="P6">[[ o.identification_id or '' ]]</para> + </td> + </tr> + </blockTable> + <blockTable colWidths="93.0,299.0,130.0,263.0" style="Table6"> + <tr> + <td> + <para style="P1">Year</para> + </td> + <td> + <para style="P6">[[ get_year(data) ]]</para> + </td> + <td> + <para style="P1">Bank Account</para> + </td> + <td> + <para style="P6">[[ o.otherid or '' ]]</para> + </td> + </tr> + </blockTable> + <para style="Standard"> + <font color="white"> </font> + </para> + <blockTable colWidths="71.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0" style="Table2"> + <tr> + <td> + <para style="terp_default_Bold_8">Salary Rules</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 0)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 1)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 2)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 3)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 4)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 5)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 6)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 7)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 8)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 9)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 10)]]</para> + </td> + <td> + <para style="P8">[[get_month(data['form']['month'], 11)]]</para> + </td> + <td> + <para style="P7">Total</para> + </td> + </tr> + </blockTable> + <section> + <para style="P1">[[repeatIn(get_rules(o),'h') ]]</para> + <blockTable colWidths="71.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0,55.0" style="Table3"> + <tr> + <td> + <para style="P2"> + <font face="Helvetica">[[ h['code'] ]]</font> + </para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 0)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 1)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 2)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 3)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 4)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 5)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 6)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 7)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 8)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 9)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 10)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h[get_month(data['form']['month'], 11)] or '0.0']]</para> + </td> + <td> + <para style="P9">[[ h['total'] or '0.0']] <font face="Helvetica">[[o.company_id and o.company_id.currency_id.symbol or '']] </font></para> + </td> + </tr> + </blockTable> + <para style="P4"> + <font color="white"> </font> + </para> + </section> + </story> +</document> + === added file 'l10n_in_hr_payroll/report/report_payslip_year_landscape.sxw' Binary files l10n_in_hr_payroll/report/report_payslip_year_landscape.sxw 1970-01-01 00:00:00 +0000 and l10n_in_hr_payroll/report/report_payslip_year_landscape.sxw 2011-11-14 07:29:29 +0000 differ === added file 'l10n_in_hr_payroll/report/yearly_payslips.py' --- l10n_in_hr_payroll/report/yearly_payslips.py 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/report/yearly_payslips.py 2011-11-14 07:29:29 +0000 @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import datetime + +from report import report_sxw + +class payslip_year_report(report_sxw.rml_parse): + + def __init__(self, cr, uid, name, context=None): + super(payslip_year_report, self).__init__(cr, uid, name, context=context) + self.year = '' + self.month = '' + self.localcontext.update({ + 'get_rules': self._get_rules, + 'get_year': self._get_year, + 'get_month': self._get_month_name, + 'lines': self._get_lines, + 'details_by_month': self._details_by_month, + }) + self.context = context + + def lengthmonth(self, year, month): + if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))): + return 29 + return [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] + + def _get_year(self, data): + self.year = data['form']['year'] + return str(self.year)+ ' - ' +str(self.year + 1) + + def _get_month_name(self, month, column=None): + self.month = month + months = {1:"Jan", 2:"Feb", 3:"Mar", 4:"Apr", 5:"May", 6:"Jun", 7:"Jul", 8:"Aug", 9:"Sep", 10:"Oct", 11:"Nov", 12:"Dec"} + if self.month + column <= 12: + month = month + column + else: + month = (month + column) - 12 + return months[month] + + def _details_by_month(self, rule, emp_id): + res = {} + total = 0.0 + for month in range(1,13): + som = datetime.date(self.year+1, month, 1) + eom = som + datetime.timedelta(self.lengthmonth(som.year, som.month)-1) + if month >= self.month: + som = datetime.date(self.year, month, 1) + eom = som + datetime.timedelta(self.lengthmonth(som.year, som.month)-1) + self.cr.execute("SELECT sum(sl.total) as total FROM hr_payslip_line AS sl "\ + "LEFT JOIN hr_salary_rule sr ON (sl.salary_rule_id=sr.id) "\ + "LEFT JOIN hr_payslip hp ON (sl.slip_id=hp.id) "\ + "WHERE sr.id = %s AND "\ + "hp.date_from>=%s AND hp.date_to<=%s "\ + "AND sl.employee_id = %s", (rule.id, som, eom, emp_id) + ) + res[month] = self.cr.fetchone()[0] or 0.0 + total += res[month] + return res, total + + def _get_rules(self, obj): + rule_obj = self.pool.get('hr.salary.rule') + contract_obj = self.pool.get('hr.contract') + struct_obj = self.pool.get('hr.payroll.structure') + res = [] + monthly_details = [] + self.cr.execute("SELECT hc.id FROM hr_contract AS hc "\ + "WHERE hc.employee_id = %s" %(obj.id)) + contract_ids = [x[0] for x in self.cr.fetchall()] + structure_ids = contract_obj.get_all_structures(self.cr, self.uid, contract_ids) + rule_ids = struct_obj.get_all_rules(self.cr, self.uid, structure_ids) + sorted_rule_ids = [id for id, sequence in sorted(rule_ids, key=lambda x:x[1])] + for rule in rule_obj.browse(self.cr, self.uid, sorted_rule_ids): + monthly_details, total = self._details_by_month(rule, obj.id) + res.append({ + 'name': rule.name, + 'code': rule.code, + 'Jan': monthly_details[1], + 'Feb': monthly_details[2], + 'Mar': monthly_details[3], + 'Apr': monthly_details[4], + 'May': monthly_details[5], + 'Jun': monthly_details[6], + 'Jul': monthly_details[7], + 'Aug': monthly_details[8], + 'Sep': monthly_details[9], + 'Oct': monthly_details[10], + 'Nov': monthly_details[11], + 'Dec': monthly_details[12], + 'total': total, + }) + return res + + + def _get_lines(self, data): + return self.pool.get('hr.employee').browse(self.cr, self.uid, data['form']['employee_ids']) + +report_sxw.report_sxw('report.payslip.year.landscape', 'hr.payslip', 'l10n_in_hr_payroll/report/report_payslip_year_landscape.rml', parser=payslip_year_report, header='internal landscape') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added directory 'l10n_in_hr_payroll/wizard' === added file 'l10n_in_hr_payroll/wizard/__init__.py' --- l10n_in_hr_payroll/wizard/__init__.py 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/wizard/__init__.py 2011-11-14 07:29:29 +0000 @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import hr_payroll_summary_year + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + === added file 'l10n_in_hr_payroll/wizard/hr_payroll_summary_year.py' --- l10n_in_hr_payroll/wizard/hr_payroll_summary_year.py 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/wizard/hr_payroll_summary_year.py 2011-11-14 07:29:29 +0000 @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import datetime + +from osv import osv, fields + +class hr_payroll_summary_year(osv.osv_memory): + _name = 'hr.payroll.summary.year' + _description = 'HR Payroll Summary Report By Year' + _columns = { + 'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)], + 'Starting Month', required=True), + 'year': fields.integer('Year', required=True), + 'employee_ids': fields.many2many('hr.employee', 'payroll_employee_rel', 'payroll_id', 'employee_id', 'Employee(s)'), + } + + _defaults = { + 'month': lambda *a: datetime.date.today().month, + 'year': lambda *a: datetime.date.today().year, + } + + def print_report(self, cr, uid, ids, context=None): + data = self.read(cr, uid, ids, [], context=context)[0] + datas = { + 'ids': [], + 'model': 'ir.ui.menu', + 'form': data + } + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'payslip.year.landscape', + 'datas': datas, + } + +hr_payroll_summary_year() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'l10n_in_hr_payroll/wizard/hr_payroll_summary_year_view.xml' --- l10n_in_hr_payroll/wizard/hr_payroll_summary_year_view.xml 1970-01-01 00:00:00 +0000 +++ l10n_in_hr_payroll/wizard/hr_payroll_summary_year_view.xml 2011-11-14 07:29:29 +0000 @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <record id="view_hr_payroll_summary_year" model="ir.ui.view"> + <field name="name">hr.payroll.summary.year.form</field> + <field name="model">hr.payroll.summary.year</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Employee's Payslip"> + <group colspan="4"> + <field name="month"/> + <field name="year"/> + <separator string="Employees" colspan="4"/> + <field name="employee_ids" height="250" colspan="4" nolabel="1"/> + </group> + <separator colspan="4"/> + <group colspan="4"> + <button icon="gtk-cancel" special="cancel" string="Cancel"/> + <button icon="gtk-print" string="Print" name="print_report" type="object"/> + </group> + </form> + </field> + </record> + + <record id="action_hr_payroll_summary_year" model="ir.actions.act_window"> + <field name="name">Payslip Year</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">hr.payroll.summary.year</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="target">new</field> + </record> + + <menuitem + name="Payslip by Year" + parent="menu_hr_reporting_payroll" + action="action_hr_payroll_summary_year" + id="menu_payslip_year" + groups="base.group_extended" + icon="STOCK_PRINT"/> + + </data> +</openerp> \ No newline at end of file
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp

