Ronald Rubi has proposed merging lp:~rr.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll into lp:openerp-costa-rica.
Requested reviews: CLEARCORP drivers (clearcorp-drivers) For more details, see: https://code.launchpad.net/~rr.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll/+merge/122374 Add payroll report for month -- https://code.launchpad.net/~rr.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll/+merge/122374 Your team CLEARCORP development team is subscribed to branch lp:openerp-costa-rica.
=== modified file 'l10n_cr_account_financial_report_webkit/report/account_bank_balances.mako' --- l10n_cr_account_financial_report_webkit/report/account_bank_balances.mako 2012-07-03 21:28:44 +0000 +++ l10n_cr_account_financial_report_webkit/report/account_bank_balances.mako 2012-09-01 00:26:19 +0000 @@ -1,9 +1,9 @@ <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <style type="text/css"> - .account_level_1 { - text-transform: uppercase; + <style type="text/css"> + .account_level_1 { + text-transform: uppercase; font-size: 15px; background-color:#F0F0F0; } === modified file 'l10n_cr_hr_payroll/__init__.py' --- l10n_cr_hr_payroll/__init__.py 2012-08-23 20:23:22 +0000 +++ l10n_cr_hr_payroll/__init__.py 2012-09-01 00:26:19 +0000 @@ -20,7 +20,10 @@ # ############################################################################## -import l10n_cr_hr_payroll -import report +import hr_payroll +import account +from . import wizard +from . import report +from . import l10n_cr_hr_payroll # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === modified file 'l10n_cr_hr_payroll/__openerp__.py' --- l10n_cr_hr_payroll/__openerp__.py 2012-08-23 20:23:22 +0000 +++ l10n_cr_hr_payroll/__openerp__.py 2012-09-01 00:26:19 +0000 @@ -38,15 +38,18 @@ 'hr', 'hr_contract', 'hr_payroll', - 'account', + 'account', + 'account_financial_report_webkit', 'account_voucher_payment_method', - 'base_currency_symbol', - 'report_webkit', + 'base_currency_symbol', ], 'update_xml': [ - 'payroll_report.xml', - 'l10n_cr_hr_payroll_view.xml' - ], + 'l10n_cr_hr_payroll_view.xml', + 'report/report.xml', + 'wizard/payroll_report_for_month_wizard_view.xml', + 'report_menus.xml', + 'payroll_report.xml', + ], 'installable': True, 'auto_install': False, 'application': True, === modified file 'l10n_cr_hr_payroll/i18n/es_CR.po' --- l10n_cr_hr_payroll/i18n/es_CR.po 2012-08-23 20:44:04 +0000 +++ l10n_cr_hr_payroll/i18n/es_CR.po 2012-09-01 00:26:19 +0000 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-23 20:36+0000\n" -"PO-Revision-Date: 2012-08-23 14:43-0600\n" +"POT-Creation-Date: 2012-08-31 19:56+0000\n" +"PO-Revision-Date: 2012-08-31 17:14-0600\n" "Last-Translator: Ronald Rubi <[email protected]>\n" "Language-Team: Inglés <[email protected]>\n" "MIME-Version: 1.0\n" @@ -18,6 +18,7 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:75 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:85 msgid "Gross" msgstr "Bruto" @@ -28,21 +29,55 @@ #. module: l10n_cr_hr_payroll #: selection:hr.payslip.run,schedule_pay:0 +msgid "Fortnightly" +msgstr "Quincena" + +#. module: l10n_cr_hr_payroll +#: selection:hr.payslip.run,schedule_pay:0 msgid "Monthly" msgstr "Mensual" #. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:77 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:87 +msgid "Rent" +msgstr "Renta" + +#. module: l10n_cr_hr_payroll +#: view:payroll.report.for.month:0 +msgid "" +"This report allows you to print or generate a pdf of your payslip in a " +"special month" +msgstr "" +"Este informe le permite imprimir o generar un pdf de su recibo de sueldo en " +"un mes especial" + +#. module: l10n_cr_hr_payroll +#: view:hr.payslip.run:0 +msgid "Generate Payslips" +msgstr "Generar nómina" + +#. module: l10n_cr_hr_payroll #: model:ir.model,name:l10n_cr_hr_payroll.model_hr_job msgid "Job Description" msgstr "Descripción del trabajo" #. module: l10n_cr_hr_payroll +#: help:payroll.report.for.month,account_ids:0 +msgid "" +"Only selected accounts will be printed. Leave empty to print all accounts." +msgstr "" +"Sólo las cuentas seleccionadas se imprimirán. Dejar en blanco para imprimir " +"todas las cuentas." + +#. module: l10n_cr_hr_payroll #: selection:hr.payslip.run,schedule_pay:0 msgid "Quarterly" msgstr "Trimestre" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:78 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:88 msgid "Net" msgstr "Neto" @@ -53,6 +88,7 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:180 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:186 msgid "REVIEWED BY:" msgstr "REVISADO POR:" @@ -62,16 +98,51 @@ msgstr "Semestral" #. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:43 +msgid "to" +msgstr "al" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,account_ids:0 +msgid "Filter on accounts" +msgstr "Filtro en cuentas" + +#. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:43 +msgid "Payslips of:" +msgstr "Nóminas del:" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:179 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:185 msgid "BY:" msgstr "HECHO POR:" #. module: l10n_cr_hr_payroll +#: constraint:payroll.report.for.month:0 +msgid "" +"When no Fiscal year is selected, you must choose to filter by periods or by " +"date." +msgstr "" +"Cuando no se ha seleccionado el año fiscal, se debe optar por filtrar por " +"puntos o por fecha." + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:73 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:83 msgid "Normal" msgstr "Normal" #. module: l10n_cr_hr_payroll +#: constraint:payroll.report.for.month:0 +msgid "" +"The fiscalyear, periods or chart of account chosen have to belong to the " +"same company." +msgstr "" +"El año fiscal, períodos o plan de cuentas elegido tiene que pertenecer a la " +"misma compañía." + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:166 #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:170 msgid "0.00" @@ -79,58 +150,133 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:70 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:80 msgid "Bank account" msgstr "Cuenta bancaria" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:68 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:78 msgid "Id card" msgstr "Cédula" #. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,display_account:0 +msgid "With balance is not equal to 0" +msgstr "Con el balance no es igual a 0" + +#. module: l10n_cr_hr_payroll +#: model:ir.actions.report.xml,name:l10n_cr_hr_payroll.payroll_report_for_month +#: model:ir.model,name:l10n_cr_hr_payroll.model_payroll_report_for_month +#: model:ir.ui.menu,name:l10n_cr_hr_payroll.menu_payroll_report_for_month +#: view:payroll.report.for.month:0 +msgid "Payroll Report for Month" +msgstr "Informe de Nómina para el mes" + +#. module: l10n_cr_hr_payroll #: model:ir.model,name:l10n_cr_hr_payroll.model_hr_payslip_run msgid "Payslip Batches" msgstr "Lotes de Nóminas" #. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,comp0_filter:0 +#: selection:payroll.report.for.month,comp1_filter:0 +#: selection:payroll.report.for.month,comp2_filter:0 +#: selection:payroll.report.for.month,filter:0 +msgid "Date" +msgstr "Fecha" + +#. module: l10n_cr_hr_payroll #: view:hr.payslip.run:0 msgid "Schedule pay" msgstr "Plan de pago" #. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,chart_account_id:0 +msgid "Chart of Account" +msgstr "Gráfico de la Cuenta" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:159 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:168 msgid "TOTAL" msgstr "TOTAL GENERAL" #. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,journal_ids:0 +msgid "Journals" +msgstr "Diarios" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,target_move:0 +msgid "Target Moves" +msgstr "Target Moves" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:71 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:81 msgid "Nor" msgstr "Nor" #. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,comp0_filter:0 +#: selection:payroll.report.for.month,comp1_filter:0 +#: selection:payroll.report.for.month,comp2_filter:0 +#: selection:payroll.report.for.month,filter:0 +msgid "Periods" +msgstr "Periodos" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:75 #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:78 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:85 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:88 msgid "Salary" msgstr "Salario" #. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Fortnightly" -msgstr "Quincena" +#: field:payroll.report.for.month,comp0_date_to:0 +#: field:payroll.report.for.month,comp1_date_to:0 +#: field:payroll.report.for.month,comp2_date_to:0 +#: field:payroll.report.for.month,date_to:0 +msgid "End Date" +msgstr "Fecha de fin" + +#. module: l10n_cr_hr_payroll +#: view:payroll.report.for.month:0 +msgid "Dates" +msgstr "Fechas" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,comp0_period_from:0 +#: field:payroll.report.for.month,comp1_period_from:0 +#: field:payroll.report.for.month,comp2_period_from:0 +#: field:payroll.report.for.month,period_from:0 +msgid "Start Period" +msgstr "Fecha de inicio" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:69 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:79 msgid "Name" msgstr "Nombre" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:76 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:86 msgid "CCSS/BP" msgstr "CCSS/BP" #. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,target_move:0 +msgid "All Posted Entries" +msgstr "Todas las entradas publicadas" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:140 #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:160 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:151 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:169 msgid "Employees" msgstr "Empleados" @@ -142,6 +288,8 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:71 #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:72 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:81 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:82 msgid "Hrs." msgstr "Hrs." @@ -163,10 +311,63 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:72 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:82 msgid "Ext" msgstr "Ext" #. module: l10n_cr_hr_payroll +#: help:payroll.report.for.month,filter:0 +msgid "" +"Filter by date : no opening balance will be displayed. (opening balance can " +"only be calculated based on period to be correct)." +msgstr "" +"Filtrar por fecha: el saldo inicial no se mostrará. (balance de apertura " +"sólo se puede calcular basándose en el período que es correcto)." + +#. module: l10n_cr_hr_payroll +#: selection:hr.payslip.run,schedule_pay:0 +msgid "Weekly" +msgstr "Semanal" + +#. module: l10n_cr_hr_payroll +#: help:payroll.report.for.month,fiscalyear_id:0 +msgid "Keep empty for all open fiscal year" +msgstr "Keep empty for all open fiscal year" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,display_account:0 +msgid "Display Accounts" +msgstr "Display Accounts" + +#. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,comp0_filter:0 +#: selection:payroll.report.for.month,comp1_filter:0 +#: selection:payroll.report.for.month,comp2_filter:0 +msgid "No Comparison" +msgstr "No Comparison" + +#. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,comp0_filter:0 +#: selection:payroll.report.for.month,comp1_filter:0 +#: selection:payroll.report.for.month,comp2_filter:0 +#: selection:payroll.report.for.month,filter:0 +msgid "Opening Only" +msgstr "Opening Only" + +#. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:42 +msgid "Payroll Report for Specific Dates" +msgstr "Informe de nómina para fechas específicas" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,comp0_date_from:0 +#: field:payroll.report.for.month,comp1_date_from:0 +#: field:payroll.report.for.month,comp2_date_from:0 +#: field:payroll.report.for.month,date_from:0 +msgid "Start Date" +msgstr "Fecha Inicial" + +#. module: l10n_cr_hr_payroll #: constraint:hr.contract:0 msgid "Error! contract start-date must be lower then contract end-date." msgstr "" @@ -174,6 +375,30 @@ "finalización." #. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:139 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:150 +msgid "Total" +msgstr "Total" + +#. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,display_account:0 +msgid "With movements" +msgstr "With movements" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,comp0_period_to:0 +#: field:payroll.report.for.month,comp1_period_to:0 +#: field:payroll.report.for.month,comp2_period_to:0 +#: field:payroll.report.for.month,period_to:0 +msgid "End Period" +msgstr "End Period" + +#. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,display_account:0 +msgid "All" +msgstr "All" + +#. module: l10n_cr_hr_payroll #: field:hr.job,code:0 msgid "Code" msgstr "Código" @@ -181,6 +406,8 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:73 #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:74 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:83 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:84 msgid "Ingr." msgstr "Ingr." @@ -191,18 +418,26 @@ #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:74 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:84 msgid "Extra" msgstr "Extra" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:77 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:87 msgid "Tax" msgstr "Impuesto" #. module: l10n_cr_hr_payroll -#: view:hr.payslip.run:0 -msgid "Generate Payslips" -msgstr "Generar nómina" +#: selection:payroll.report.for.month,comp0_filter:0 +#: field:payroll.report.for.month,comp0_fiscalyear_id:0 +#: selection:payroll.report.for.month,comp1_filter:0 +#: field:payroll.report.for.month,comp1_fiscalyear_id:0 +#: selection:payroll.report.for.month,comp2_filter:0 +#: field:payroll.report.for.month,comp2_fiscalyear_id:0 +#: field:payroll.report.for.month,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Fiscal Year" #. module: l10n_cr_hr_payroll #: selection:hr.payslip.run,schedule_pay:0 @@ -210,26 +445,55 @@ msgstr "Bi-semanal" #. module: l10n_cr_hr_payroll -#: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:77 -msgid "Rent" -msgstr "Renta" +#: selection:payroll.report.for.month,target_move:0 +msgid "All Entries" +msgstr "Todas las entradas" + +#. module: l10n_cr_hr_payroll +#: selection:payroll.report.for.month,filter:0 +msgid "No Filters" +msgstr "Sin filtros" + +#. module: l10n_cr_hr_payroll +#: model:ir.actions.act_window,name:l10n_cr_hr_payroll.action_payroll_report_for_month_menu_webkit +msgid "Action Payroll Report for Month" +msgstr "Acción de informe de nómina para el mes" + +#. module: l10n_cr_hr_payroll +#: view:payroll.report.for.month:0 +msgid "Filters" +msgstr "Filtros" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:181 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:187 msgid "APPROVED BY:" msgstr "APROBADO POR:" #. module: l10n_cr_hr_payroll -#: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:139 -msgid "Total" -msgstr "Total" - -#. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Weekly" -msgstr "Semanal" +#: help:payroll.report.for.month,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "Select Charts of Accounts" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,filter:0 +msgid "Filter by" +msgstr "Filtrar por" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: l10n_cr_hr_payroll +#: field:payroll.report.for.month,comp0_filter:0 +#: field:payroll.report.for.month,comp1_filter:0 +#: field:payroll.report.for.month,comp2_filter:0 +msgid "Compare By" +msgstr "Compare By" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:76 +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:86 msgid "Deducc." msgstr "Deducc." === modified file 'l10n_cr_hr_payroll/payroll_report.xml' --- l10n_cr_hr_payroll/payroll_report.xml 2012-08-23 20:23:22 +0000 +++ l10n_cr_hr_payroll/payroll_report.xml 2012-09-01 00:26:19 +0000 @@ -3,5 +3,6 @@ <data> <report auto="False" id="hr_payslip_run_ccorp" model="hr.payslip.run" name="hr.payslip.run.layout_ccorp" file="l10n_cr_hr_payroll/report/payroll_report.mako" string="Payroll Report" report_type="webkit"/> + </data> </openerp> === modified file 'l10n_cr_hr_payroll/report/__init__.py' --- l10n_cr_hr_payroll/report/__init__.py 2012-08-23 20:23:22 +0000 +++ l10n_cr_hr_payroll/report/__init__.py 2012-09-01 00:26:19 +0000 @@ -21,3 +21,4 @@ ############################################################################## import payroll_report +import payroll_report_for_month \ No newline at end of file === modified file 'l10n_cr_hr_payroll/report/payroll_report.mako' --- l10n_cr_hr_payroll/report/payroll_report.mako 2012-08-23 20:44:04 +0000 +++ l10n_cr_hr_payroll/report/payroll_report.mako 2012-09-01 00:26:19 +0000 @@ -90,7 +90,7 @@ <div class="act_as_cell">${slip.employee_id.bank_account_id.acc_number or ' '}</div> ## hn <div class="act_as_cell amount">${get_hn(slip.worked_days_line_ids) or '0'}</div> - ## hr + ## he <div class="act_as_cell amount">${get_he(slip.worked_days_line_ids) or '0'}</div> ## basic <div class="act_as_cell amount">${formatLang(get_basic(slip.line_ids)) or '0'}</div> @@ -163,11 +163,9 @@ <div class="act_as_cell amount" style="width: 40px;">${total_he}</div> <div class="act_as_cell amount">${formatLang(total_basic)}</div> <div class="act_as_cell amount">${formatLang(total_exs)}</div> - <div class="act_as_cell amount">${_('0.00')}</div> <div class="act_as_cell amount">${formatLang(total_gross)}</div> <div class="act_as_cell amount">${formatLang(total_ccss)}</div> <div class="act_as_cell amount">${formatLang(total_rent)}</div> - <div class="act_as_cell amount">${_('0.00')}</div> <div class="act_as_cell amount">${formatLang(total_net)}</div> </div> </div> === added file 'l10n_cr_hr_payroll/report/payroll_report_for_month.mako' --- l10n_cr_hr_payroll/report/payroll_report_for_month.mako 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/report/payroll_report_for_month.mako 2012-09-01 00:26:19 +0000 @@ -0,0 +1,193 @@ +<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <style type="text/css"> + .account_level_1 { + text-transform: uppercase; + font-size: 15px; + background-color:#F0F0F0; + } + + .account_level_2 { + font-size: 12px; + background-color:#F0F0F0; + } + + .regular_account_type { + font-weight: normal; + } + + .view_account_type { + font-weight: bold; + } + + .account_level_consol { + font-weight: normal; + font-style: italic; + } + + ${css} + + .list_table .act_as_row { + margin-top: 10px; + margin-bottom: 10px; + font-size:10px; + } + </style> + </head> + <body class = "data"> + + + <div style="font-size: 20px; font-weight: bold; text-align: center;"> ${company.partner_id.name}</div> + <div style="font-size: 25px; font-weight: bold; text-align: center;"> ${_('Payroll Report for Specific Dates')}</div> + <div style="font-size: 16px; font-weight: bold; text-align: center;">${_('Payslips of:')} ${start_date} ${_('to')} ${end_date}</div> + + <% + payslips_by_struct = get_payslips_by_struct(cr, uid, start_date, end_date) + + total_hn = 0.0 + total_he = 0.0 + total_basic = 0.0 + total_exs = 0.0 + total_gross = 0.0 + total_basic = 0.0 + total_rent = 0.0 + total_ccss = 0.0 + total_net = 0.0 + total_emp = 0 + %> + + %for struct in payslips_by_struct: + <% + total_hn_struct = 0.0 + total_he_struct = 0.0 + total_exs_struct = 0.0 + total_gross_struct = 0.0 + total_basic_struct = 0.0 + total_rent_struct = 0.0 + total_ccss_struct = 0.0 + total_net_struct = 0.0 + total_emp_struct = 0 + + %> + + <div class="account_title bg" style="margin-top: 20px; font-size: 12px; width: 1080px;">${struct[0]}</div> + <div class="act_as_table list_table"> + <div class="act_as_thead"> + <div class="act_as_row labels" style="font-weight: bold; font-size: 11x;"> + <div class="act_as_cell first_column" style="width: 85px; vertical-align: middle">${_('Id card')}</div> + <div class="act_as_cell" style="width: 230px; vertical-align: middle">${_('Name')}</div> + <div class="act_as_cell" style="width: 85px; vertical-align: middle">${_('Bank account')}</div> + <div class="act_as_cell amount" style="width: 40px;">${_('Hrs.')}<br />${_('Nor')}</div> + <div class="act_as_cell amount" style="width: 40px;">${_('Hrs.')}<br />${_('Ext')}</div> + <div class="act_as_cell amount">${_('Ingr.')}<br />${_('Normal')}</div> + <div class="act_as_cell amount">${_('Ingr.')}<br />${_('Extra')}</div> + <div class="act_as_cell amount">${_('Salary')}<br />${_('Gross')}</div> + <div class="act_as_cell amount">${_('Deducc.')}<br />${_('CCSS/BP')}</div> + <div class="act_as_cell amount">${_('Tax')}<br />${_('Rent')}</div> + <div class="act_as_cell amount">${_('Salary')}<br />${_('Net')}</div> + </div> + </div> + + + <% + payslips_by_employee = get_payslips_by_employee(cr, uid, struct[1]) + %> + + <div class="act_as_tbody"> + %for payslips in payslips_by_employee: + <div class="act_as_row lines"> + ## Id card + <div class="act_as_cell first_column" style="width: 85px;">${get_identification(cr, uid, payslips[1]) or ' '}</div> + ## name + <div class="act_as_cell">${payslips[0] or ' '}</div> + ## bank account + <div class="act_as_cell">${get_bank_account(cr, uid, payslips[1]) or ' '}</div> + ## hn + <div class="act_as_cell amount">${get_hn(cr, uid, payslips[1]) or '0'}</div> + ## he + <div class="act_as_cell amount">${get_he(cr, uid, payslips[1]) or '0'}</div> + ## basic + <div class="act_as_cell amount">${formatLang(get_basic(cr, uid, payslips[1])) or '0'}</div> + ## exs + <div class="act_as_cell amount">${formatLang(get_exs(cr, uid, payslips[1])) or '0'}</div> + ## gross + <div class="act_as_cell amount ">${formatLang(get_gross(cr, uid, payslips[1])) or '0'}</div> + ## ccss + <div class="act_as_cell amount">${formatLang(get_ccss(cr, uid, payslips[1])) or '0'}</div> + ## RENT + <div class="act_as_cell amount">${formatLang(get_rent(cr, uid, payslips[1])) or '0'}</div> + ## NET + <div class="act_as_cell amount">${formatLang(get_net(cr, uid, payslips[1])) or '0'}</div> + <% + ## Totals by Departament + total_hn_struct += get_hn(cr, uid, payslips[1]) + total_he_struct += get_he(cr, uid, payslips[1]) + total_basic_struct += get_basic(cr, uid, payslips[1]) + total_exs_struct += get_exs(cr, uid, payslips[1]) + total_gross_struct += get_gross(cr, uid, payslips[1]) + total_rent_struct += get_rent(cr, uid, payslips[1]) + total_ccss_struct += get_ccss(cr, uid, payslips[1]) + total_net_struct += get_net(cr, uid, payslips[1]) + total_emp_struct += 1 + + ## Totals + total_hn += get_hn(cr, uid, payslips[1]) + total_he += get_he(cr, uid, payslips[1]) + total_basic += get_basic(cr, uid, payslips[1]) + total_exs += get_exs(cr, uid, payslips[1]) + total_gross += get_gross(cr, uid, payslips[1]) + total_rent += get_rent(cr, uid, payslips[1]) + total_ccss += get_ccss(cr, uid, payslips[1]) + total_net += get_net(cr, uid, payslips[1]) + total_emp += 1 + %> + </div> + %endfor + </div> + <div class="act_as_tfoot"> + <div class="act_as_row labels" style="font-weight: bold; font-size: 11x"> + <div class="act_as_cell first_column">${_('Total')}</div> + <div class="act_as_cell">${total_emp_struct} ${_('Employees')}</div> + <div class="act_as_cell"> </div> + <div class="act_as_cell amount">${total_hn_struct}</div> + <div class="act_as_cell amount">${total_he_struct}</div> + <div class="act_as_cell amount">${formatLang(total_basic_struct)}</div> + <div class="act_as_cell amount">${formatLang(total_exs_struct)}</div> + <div class="act_as_cell amount">${formatLang(total_gross_struct)}</div> + <div class="act_as_cell amount">${formatLang(total_ccss_struct)}</div> + <div class="act_as_cell amount">${formatLang(total_rent_struct)}</div> + <div class="act_as_cell amount">${formatLang(total_net_struct)}</div> + </div> + </div> + </div> + %endfor + <div class="act_as_table list_table " style="margin-top: 20px;"> + <div class="act_as_tfoot"> + <div class="act_as_row labels" style="font-weight: bold; font-size: 11px;"> + <div class="act_as_cell first_column" style="width: 85px; font-size: 12px; text-align: left">${_('TOTAL')}</div> + <div class="act_as_cell" style="width: 230px;">${total_emp} ${_('Employees')}</div> + <div class="act_as_cell"> </div> + <div class="act_as_cell amount" style="width: 40px;">${total_hn}</div> + <div class="act_as_cell amount" style="width: 40px;">${total_he}</div> + <div class="act_as_cell amount">${formatLang(total_basic)}</div> + <div class="act_as_cell amount">${formatLang(total_exs)}</div> + <div class="act_as_cell amount">${formatLang(total_gross)}</div> + <div class="act_as_cell amount">${formatLang(total_ccss)}</div> + <div class="act_as_cell amount">${formatLang(total_rent)}</div> + <div class="act_as_cell amount">${formatLang(total_net)}</div> + </div> + </div> + </div> + <div class="act_as_table data_table" style="margin-top:30px"> + <div class="act_as_tbody"> + <div class="act_as_row" style="vertical-align: bottom"> + <div class="act_as_cell" style="padding-top:80px;padding-bottom:5px"> ${_('BY:')} </div> + <div class="act_as_cell" style="padding-top:80px;padding-bottom:5px"> ${_('REVIEWED BY:')} </div> + <div class="act_as_cell" style="padding-top:80px;padding-bottom:5px"> ${_('APPROVED BY:')} </div> + </div> + </div> + </div> + <p style="page-break-after:always"></p> + </body> +</html> === added file 'l10n_cr_hr_payroll/report/payroll_report_for_month.py' --- l10n_cr_hr_payroll/report/payroll_report_for_month.py 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/report/payroll_report_for_month.py 2012-09-01 00:26:19 +0000 @@ -0,0 +1,217 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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/>. +# +############################################################################## + +from report import report_sxw +from tools.translate import _ +import pooler +from datetime import datetime + +from openerp.addons.account_financial_report_webkit.report.trial_balance import TrialBalanceWebkit +from openerp.addons.account_financial_report_webkit.report.webkit_parser_header_fix import HeaderFooterTextWebKitParser + +def sign(number): + return cmp(number, 0) + +class payroll_report_for_month(TrialBalanceWebkit): + def __init__(self, cr, uid, name, context): + super(payroll_report_for_month, self).__init__(cr, uid, name, context=context) + self.pool = pooler.get_pool(self.cr.dbname) + self.cursor = self.cr + #This line is to delete, the header of trial balance + self.localcontext['additional_args'][4] = ('--header-left', '') + self.localcontext.update({ + 'get_payslips_by_date': self.get_payslips_by_date, + 'get_payslips_by_struct': self.get_payslips_by_struct, + 'get_payslips_by_employee': self.get_payslips_by_employee, + 'get_identification': self.get_identification, + 'get_bank_account': self.get_bank_account, + 'get_hn': self.get_hn, + 'get_he': self.get_he, + 'get_basic': self.get_basic, + 'get_exs': self.get_exs, + 'get_gross': self.get_gross, + 'get_ccss': self.get_ccss, + 'get_rent': self.get_rent, + 'get_net': self.get_net, + }) + + def set_context(self, objects, data, ids, report_type=None): + start_date = self._get_form_param('date_from', data) + end_date = self._get_form_param('date_to', data) + + self.localcontext.update({ + 'start_date': start_date, + 'end_date': end_date, + }) + + return super(payroll_report_for_month, self).set_context(objects, data, ids, report_type=report_type) + + def get_payslips_by_date(self, cr, uid, start_date, end_date): + payslips_ids = self.pool.get('hr.payslip').search(cr, uid, [('date_from', '>=' , start_date), ('date_to', '<=' , end_date)]) + payslips = self.pool.get('hr.payslip').browse(cr, uid, payslips_ids) + return payslips + + def get_payslips_by_struct(self, cr, uid, start_date, end_date): + all_payslips = self.get_payslips_by_date(cr, uid, start_date, end_date) + obj_by_struct = [] + struct_list = [] + payslip_by_struct = [] + + for payslip in all_payslips: + struct_name = payslip.struct_id.name + if struct_name not in struct_list: + struct_list.append(struct_name) + + for struct in struct_list: + struct_payslip = [] + for payslip in all_payslips: + if payslip.struct_id.name == struct: + struct_payslip.append(payslip) + obj_by_struct.append(struct_payslip) + + i = 0 + for struct in struct_list: + tup_temp = (struct, obj_by_struct[i]) + payslip_by_struct.append(tup_temp) + i += 1 + + + return payslip_by_struct + + def get_payslips_by_employee(self, cr, uid, all_payslips): + obj_by_employee = [] + payslip_by_employee = [] + employee_list = [] + for payslip in all_payslips: + employee_name = payslip.employee_id.name + if employee_name not in employee_list: + employee_list.append(employee_name) + + for employee in employee_list: + employee_payslip = [] + for payslip in all_payslips: + if payslip.employee_id.name == employee: + employee_payslip.append(payslip) + obj_by_employee.append(employee_payslip) + + i = 0 + for employee in employee_list: + tup_temp = (employee, obj_by_employee[i]) + payslip_by_employee.append(tup_temp) + i += 1 + + return payslip_by_employee + + def get_identification(self, cr, uid, payslips): + res = ' ' + for payslip in payslips: + res = payslip.employee_id.identification_id + return res + + def get_bank_account(self, cr, uid, payslips): + res = ' ' + for payslip in payslips: + res = payslip.employee_id.bank_account_id.acc_number + return res + + def get_hn(self, cr, uid, payslips): + code = 'HN' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.number_of_hours + return res + + def get_he(self, cr, uid, payslips): + code = 'HE' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.number_of_hours + return res + + def get_basic(self, cr, uid, payslips): + code = 'BASE' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + return res + + def get_exs(self, cr, uid, payslips): + code = 'EXS' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + return res + + def get_gross(self, cr, uid, payslips): + code = 'BRUTO' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + return res + + def get_ccss(self, cr, uid, payslips): + code = 'CCSS-EMP' + code2 = 'Banco Popular-EMP' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + elif line.code == code2: + res += line.total + return res + + + def get_net(self, cr, uid, payslips): + code = 'NETO' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + return res + + + def get_rent(self, cr, uid, payslips): + code = 'Renta' + res = 0.00 + for payslip in payslips: + for line in payslip.line_ids: + if line.code == code: + res += line.total + return res + +HeaderFooterTextWebKitParser( + 'report.l10n_cr_hr_payroll.account.payroll_report_for_month', + 'account.account', + 'addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako', + parser=payroll_report_for_month) === added file 'l10n_cr_hr_payroll/report/report.xml' --- l10n_cr_hr_payroll/report/report.xml 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/report/report.xml 2012-09-01 00:26:19 +0000 @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <!-- we do not use report tag has we can not set header ref --> + + <record id="l10n_cr_hr_payroll.payroll_report_for_month" model="ir.actions.report.xml"> + <field name="report_type">webkit</field> + <field name="report_name">l10n_cr_hr_payroll.account.payroll_report_for_month</field> + <field eval="[(6,0,[])]" name="groups_id"/> + <field eval="0" name="multi"/> + <field eval="0" name="auto"/> + <field eval="1" name="header"/> + <field name="model">payroll.report.for.month</field> + <field name="type">ir.actions.report.xml</field> + <field name="name">Payroll Report for Month</field> + <field name="report_rml">l10n_cr_hr_payroll/report/payroll_report_for_month.mako</field> + <field name="report_file">l10n_cr_hr_payroll/report/payroll_report_for_month.mako</field> + </record> + + + </data> +</openerp> === added file 'l10n_cr_hr_payroll/report_menus.xml' --- l10n_cr_hr_payroll/report_menus.xml 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/report_menus.xml 2012-09-01 00:26:19 +0000 @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <menuitem icon="STOCK_PRINT" name="Payroll Report for Month" + parent="hr_payroll.menu_hr_root_payroll" action="action_payroll_report_for_month_menu_webkit" + id="menu_payroll_report_for_month"/> + + </data> +</openerp> \ No newline at end of file === added directory 'l10n_cr_hr_payroll/wizard' === added file 'l10n_cr_hr_payroll/wizard/__init__.py' --- l10n_cr_hr_payroll/wizard/__init__.py 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/wizard/__init__.py 2012-09-01 00:26:19 +0000 @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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 payroll_report_for_month_wizard \ No newline at end of file === added file 'l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py' --- l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py 2012-09-01 00:26:19 +0000 @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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/>. +# +############################################################################## + +from osv import osv + + +class PayrollReportForMonthWizard(osv.osv_memory): + + _inherit = "trial.balance.webkit" + _name = "payroll.report.for.month" + _description = "Payroll Report for Month" + + _defaults = { + 'fiscalyear_id': '', + 'filter': 'filter_date', + } + + def pre_print_report(self, cr, uid, ids, data, context=None): + data = super(PayrollReportForMonthWizard, self).pre_print_report(cr, uid, ids, data, context) + if context is None: + context = {} + vals = self.read(cr, uid, ids, + ['date_from', 'date_to',], + context=context)[0] + data['form'].update(vals) + return data + + def _print_report(self, cursor, uid, ids, data, context=None): + context = context or {} + # we update form with display account value + data = self.pre_print_report(cursor, uid, ids, data, context=context) + + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'l10n_cr_hr_payroll.account.payroll_report_for_month', + 'datas': data} + +PayrollReportForMonthWizard() === added file 'l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml' --- l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml 1970-01-01 00:00:00 +0000 +++ l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml 2012-09-01 00:26:19 +0000 @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <!-- inheriting views from more than 2 differents inherited models like + account.balances.webkit -> account.common.balance.report -> account.common.account.report + is not supported so we have to copy paste the same view for payroll_report_for_month, balance sheet, profit & loss + --> + + + <record id="payroll_report_for_month_view_webkit" model="ir.ui.view"> + <field name="name">Payroll Report for Month</field> + <field name="model">payroll.report.for.month</field> + <field name="type">form</field> + <field name="inherit_id" ref="account.account_common_report_view"/> + <field name="arch" type="xml"> + <data> + <xpath expr="/form/label[@string='']" position="replace"> + <separator string="Payroll Report for Month" colspan="4"/> + <label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your payslip in a special month"/> + </xpath> + <field name="chart_account_id" position='attributes'> + <attribute name="colspan">4</attribute> + </field> + <field name="fiscalyear_id" position="attributes"> + <attribute name="invisible">True</attribute> + </field> + <field name="target_move" position="attributes"> + <attribute name="invisible">True</attribute> + </field> + <page name="journal_ids" position="attributes"> + <attribute name="invisible">True</attribute> + </page> + <page name="filters" position="replace"> + <page string="Filters" name="filters"> + <field name="filter" on_change="onchange_filter(filter)" readonly="True" colspan="4"/> + <separator string="Dates" colspan="4"/> + <field name="date_from" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/> + <field name="date_to" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/> + </page> + </page> + </data> + </field> + </record> + + <record id="action_payroll_report_for_month_menu_webkit" model="ir.actions.act_window"> + <field name="name">Action Payroll Report for Month</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">payroll.report.for.month</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="view_id" ref="payroll_report_for_month_view_webkit"/> + <field name="target">new</field> + </record> + + <record model="ir.values" id="action_payroll_report_for_month_values_webkit"> + <field name="model_id" ref="account.model_account_account"/> + <field name="object" eval="1"/> + <field name="name">Payroll Report for Month</field> + <field name="key2">client_print_multi</field> + <field name="value" + eval="'ir.actions.act_window,' +str(ref('action_payroll_report_for_month_menu_webkit'))"/> + <field name="key">action</field> + <field name="model">account.account</field> + </record> + </data> +</openerp>
_______________________________________________ Mailing list: https://launchpad.net/~clearcorp Post to : [email protected] Unsubscribe : https://launchpad.net/~clearcorp More help : https://help.launchpad.net/ListHelp

