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/125364 [FIX] Change dates to periods in payroll_report_for_month -- https://code.launchpad.net/~rr.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll/+merge/125364 Your team CLEARCORP development team is subscribed to branch lp:openerp-costa-rica.
=== modified file 'l10n_cr_hr_payroll/i18n/es_CR.po' --- l10n_cr_hr_payroll/i18n/es_CR.po 2012-09-17 16:45:11 +0000 +++ l10n_cr_hr_payroll/i18n/es_CR.po 2012-09-19 22:46:21 +0000 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-14 22:22+0000\n" -"PO-Revision-Date: 2012-09-14 16:22-0600\n" +"POT-Creation-Date: 2012-09-19 22:29+0000\n" +"PO-Revision-Date: 2012-09-19 16:32-0600\n" "Last-Translator: Ronald Rubi <[email protected]>\n" "Language-Team: Inglés <[email protected]>\n" "MIME-Version: 1.0\n" @@ -23,20 +23,9 @@ msgstr "Bruto" #. module: l10n_cr_hr_payroll -#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:119 -#, python-format -msgid "weekly" -msgstr "semanal" - -#. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Bi-monthly" -msgstr "Bi-mensual" - -#. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Fortnightly" -msgstr "Quincena" +#: field:payroll.report.for.month,account_ids:0 +msgid "Filter on accounts" +msgstr "Filtro en cuentas" #. module: l10n_cr_hr_payroll #: selection:hr.payslip.run,schedule_pay:0 @@ -59,10 +48,9 @@ "un mes especial" #. module: l10n_cr_hr_payroll -#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:121 -#, python-format -msgid "monthly" -msgstr "mensual" +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:43 +msgid "Payslips of periods:" +msgstr "Nóminas del periodo:" #. module: l10n_cr_hr_payroll #: view:hr.payslip.run:0 @@ -83,11 +71,6 @@ "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" @@ -105,27 +88,28 @@ msgstr "REVISADO POR:" #. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Semi-annually" -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" +#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:118 +#, python-format +msgid "weekly" +msgstr "semanal" #. module: l10n_cr_hr_payroll -#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:125 +#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:128 #, python-format msgid "%s payroll of %s from %s to %s" msgstr "planilla %s de %s del %s al %s" #. module: l10n_cr_hr_payroll +#: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:42 +msgid "Payroll Report for Specific Periods" +msgstr "Informe de nómina para periodos específicas" + +#. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:177 #: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:185 msgid "BY:" @@ -147,13 +131,10 @@ 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." +#: code:addons/l10n_cr_hr_payroll/l10n_cr_hr_payroll.py:120 +#, python-format +msgid "monthly" +msgstr "mensual" #. module: l10n_cr_hr_payroll #: field:payroll.report.for.month,company_id:0 @@ -199,9 +180,9 @@ msgstr "Fecha" #. 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:" +#: 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 @@ -265,7 +246,7 @@ #: field:payroll.report.for.month,comp2_period_from:0 #: field:payroll.report.for.month,period_from:0 msgid "Start Period" -msgstr "Fecha de inicio" +msgstr "Periodo de inicio" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:69 @@ -316,9 +297,12 @@ msgstr "Contrato" #. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Annually" -msgstr "Anual" +#: 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 "Periodo de fin" #. module: l10n_cr_hr_payroll #: report:addons/l10n_cr_hr_payroll/report/payroll_report.mako:45 @@ -357,11 +341,6 @@ msgstr "Mostrar cuentas" #. module: l10n_cr_hr_payroll -#: view:hr.payslip.run:0 -msgid "Schedule pay" -msgstr "Plan de pago" - -#. 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 @@ -377,11 +356,6 @@ msgstr "Solo apertura" #. 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 @@ -408,12 +382,13 @@ msgstr "Con movimientos" #. 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 "Periodo de fin" +#: 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 #: selection:payroll.report.for.month,display_account:0 @@ -467,11 +442,6 @@ msgstr "Año fiscal" #. module: l10n_cr_hr_payroll -#: selection:hr.payslip.run,schedule_pay:0 -msgid "Bi-weekly" -msgstr "Bi-semanal" - -#. module: l10n_cr_hr_payroll #: selection:payroll.report.for.month,target_move:0 msgid "All Entries" msgstr "Todas las entradas" @@ -487,11 +457,6 @@ 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:179 #: report:addons/l10n_cr_hr_payroll/report/payroll_report_for_month.mako:187 msgid "APPROVED BY:" === modified file 'l10n_cr_hr_payroll/report/payroll_report_for_month.mako' --- l10n_cr_hr_payroll/report/payroll_report_for_month.mako 2012-09-01 00:22:31 +0000 +++ l10n_cr_hr_payroll/report/payroll_report_for_month.mako 2012-09-19 22:46:21 +0000 @@ -39,11 +39,11 @@ <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> + <div style="font-size: 25px; font-weight: bold; text-align: center;"> ${_('Payroll Report for Specific Periods')}</div> + <div style="font-size: 16px; font-weight: bold; text-align: center;">${_('Payslips of periods:')} ${start_period.name} ${_('to')} ${stop_period.name}</div> <% - payslips_by_struct = get_payslips_by_struct(cr, uid, start_date, end_date) + payslips_by_struct = get_payslips_by_struct(cr, uid, start_period, stop_period) total_hn = 0.0 total_he = 0.0 === modified file 'l10n_cr_hr_payroll/report/payroll_report_for_month.py' --- l10n_cr_hr_payroll/report/payroll_report_for_month.py 2012-09-03 20:56:38 +0000 +++ l10n_cr_hr_payroll/report/payroll_report_for_month.py 2012-09-19 22:46:21 +0000 @@ -23,7 +23,6 @@ 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 @@ -39,7 +38,7 @@ #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_period': self.get_payslips_by_period, 'get_payslips_by_struct': self.get_payslips_by_struct, 'get_payslips_by_employee': self.get_payslips_by_employee, 'get_identification': self.get_identification, @@ -58,23 +57,23 @@ }) 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) + start_period = self._get_form_param('period_from', data) + stop_period = self._get_form_param('period_to', data) self.localcontext.update({ - 'start_date': start_date, - 'end_date': end_date, + 'start_period': start_period, + 'stop_period': stop_period, }) 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)]) + def get_payslips_by_period(self, cr, uid, start_period, stop_period): + payslips_ids = self.pool.get('hr.payslip').search(cr, uid, [('date_to', '>=' , start_period.date_start), ('date_to', '<=' , stop_period.date_stop)]) 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) + def get_payslips_by_struct(self, cr, uid, start_period, stop_period): + all_payslips = self.get_payslips_by_period(cr, uid, start_period, stop_period) obj_by_struct = [] struct_list = [] payslip_by_struct = [] === modified file 'l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py' --- l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py 2012-09-01 00:22:31 +0000 +++ l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py 2012-09-19 22:46:21 +0000 @@ -31,19 +31,9 @@ _defaults = { 'fiscalyear_id': '', - 'filter': 'filter_date', + 'filter': 'filter_period', } - - 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 === modified 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 2012-09-01 00:22:31 +0000 +++ l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml 2012-09-19 22:46:21 +0000 @@ -22,23 +22,33 @@ <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> + <field name="fiscalyear_id" position="attributes"> + <attribute name="attrs">{'required': True}</attribute> + </field> + <field name="period_from" position="attributes"> + <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)]</attribute> + </field> + <field name="period_to" position="attributes"> + <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)]</attribute> + </field> + <field name="filter" position="attributes"> + <attribute name="readonly">True</attribute> + </field> + <separator string="Dates" position="attributes"> + <attribute name="invisible">True</attribute> + </separator> + <field name="date_from" position="attributes"> + <attribute name="invisible">True</attribute> + </field> + <field name="date_to" position="attributes"> + <attribute name="invisible">True</attribute> + </field> </data> </field> </record>
_______________________________________________ Mailing list: https://launchpad.net/~clearcorp Post to : [email protected] Unsubscribe : https://launchpad.net/~clearcorp More help : https://help.launchpad.net/ListHelp

