clearcorp team mailing list archive
-
clearcorp team
-
Mailing list archive
-
Message #00152
[Merge] lp:~as.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll into lp:openerp-costa-rica/6.1
Armando Soto Rodríguez has proposed merging lp:~as.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll into lp:openerp-costa-rica/6.1.
Requested reviews:
CLEARCORP drivers (clearcorp-drivers)
For more details, see:
https://code.launchpad.net/~as.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll/+merge/107489
[FIX] Remove cr_hr_report,
Add code of hr_job in l10n_cr_hr_payroll_view.xml
Delete unnecesary files
--
https://code.launchpad.net/~as.clearcorp/openerp-costa-rica/6.1-l10n_cr_hr_payroll/+merge/107489
Your team CLEARCORP development team is subscribed to branch lp:openerp-costa-rica/6.1.
=== removed directory 'cr_hr_report'
=== removed file 'cr_hr_report/__init__.py'
--- cr_hr_report/__init__.py 2012-05-04 14:04:10 +0000
+++ cr_hr_report/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# __init__.py
-# cic_voucher_report
-# First author: Mag Guevara Rivera <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
-# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of
-# conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list
-# of conditions and the following disclaimer in the documentation and/or other materials
-# provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are those of the
-# authors and should not be interpreted as representing official policies, either expressed
-# or implied, of ClearCorp S.A..
-#
-##############################################################################
-import report
=== removed file 'cr_hr_report/__terp__.py'
--- cr_hr_report/__terp__.py 2012-05-23 15:29:34 +0000
+++ cr_hr_report/__terp__.py 1970-01-01 00:00:00 +0000
@@ -1,59 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# __terp__.py
-# payment_receipt
-# First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
-# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of
-# conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list
-# of conditions and the following disclaimer in the documentation and/or other materials
-# provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are those of the
-# authors and should not be interpreted as representing official policies, either expressed
-# or implied, of ClearCorp S.A..
-#
-##############################################################################
-
-{
- 'name': 'ClearCorp report module for voucher and other payments',
- 'version': '0.1',
- 'url': 'http://launchpad.net/openerp-costa-rica',
- 'author': 'CLEARCORP S.A.',
- 'website': 'http://clearcorp.co.cr',
- 'category': '',
- 'description': """ClearCorp 'reports' for vouchers:
- Reports:
- * Voucher
- """,
- 'depends': [
- 'account',
- 'account_voucher_payment_method',
- 'base_currency_symbol',
- 'report_webkit',
- ],
- 'init_xml': [],
- 'update_xml': [
- 'payroll_report.xml',
- ],
- 'license': 'Other OSI approved licence',
- 'installable': True,
- 'active': False,
-}
=== removed file 'cr_hr_report/data.xml'
--- cr_hr_report/data.xml 2012-05-16 22:20:19 +0000
+++ cr_hr_report/data.xml 1970-01-01 00:00:00 +0000
@@ -1,218 +0,0 @@
-<?xml version="1.0" ?>
- <openerp>
- <data noupdate="1">
- <record id="ir_header_webkit_base_check" model="ir.header_webkit">
- <field eval=""""Portrait"""" name="orientation"/>
- <field eval=""""Letter"""" name="format"/>
- <field name="html"><![CDATA[<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "header" onload="subst()">
- <table class="header-table" cellspacing = "3">
- <tbody>
- <tr>
- <td>
- <div id="header_logo">${helper.embed_logo_by_name('company_logo')|n}</div>
- </td>
- <td>
- <table class="company_data">
- <tr class = "title">
- <td>${company.partner_id.name |entity}</td>
- <td style = "text-align : right;" rowspan = "6">${_("MONEY RECEIPT")}</td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].street or ''|entity}, ${company.partner_id.address[0].street2 or ''|entity}</td>
- <td style = "text-align : right;"></td>
- </tr>
- <tr>
- <td>${_("Tel. PBX")}: ${company.partner_id.address[0].phone or '-'|entity} - ${_("FAX")}: ${company.partner_id.address[0].fax or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].zip or ''|entity} ${company.partner_id.address[0].city or ''|entity}, ${company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name or ''|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("CED. JUR")}: ${company.partner_id.ref or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("Web")}: ${company.partner_id.website or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- <hr/>
- ${_debug or ''|n} </body>
-</html>]]>
- </field>
- <field eval="95.0" name="margin_top"/>
- <field eval="14.0" name="margin_left"/>
- <field eval="14.0" name="margin_right"/>
- <field name="css" ><![CDATA[
- /*HEADER*/
-.header {
- padding : 100px 10px 5px 10px;
- border:0; margin: 0;
-}
-.header-table {
- width: 100%;
- margin-top: 8%;
-}
-
-.title {
- font-size:16;
- font-weight: bold;
-}
-
-.company_address{
- width : 100%;
- text-align: right;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.company_data {
- width : 100%;
- text-align: center;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.header_logo{
- width : 150px;
-}
-
-/*BODY*/
-
-
-
-#document_data{
- margin-bottom : 50px;
- width : 100%;
-}
-
-#number{
- text-align : left;
- color : red;
- font-size : 0.9em;
- float : left;
-}
-
-#date {
- margin : 20px 0px 5px 400px;
-}
-
-.detail {
- margin-top : 10px;
- width : 100%;
-}
-
-.text_font{
- font-family : courier, arial, sans, serif;
- font-size : 14px;
- font-style : bold;
- margin-left : 15px
-}
-
-.detail_line{
- width : 100%;
- float : left;
-}
-.amount_text{
- font-family : courier, arial, sans, serif;
- font-size : 16px;
- font-style : italic;
- margin : 5px;
- width : 100%;
- font-style : bold;
-}
-
-.info{
- padding-top : 35px;
-}
-
-.info_detail{
- font-family : courier, arial, sans, serif;
- font-size : 9px;
- font-style : italic;
-}
-
-.signature {
- text-align : center;
- background-color : #BFBFBF;
- border: 1px solid black;
- -webkit-border-radius: 10px;
-}
-.sign_detail {
- margin-bottom : 40px;
-}
-
-.payment_method{
- width : 50%;
- float :left;
- margin-left : 30px;
-}
-
-#val_first{
- width : 100%;
- margin-top : 20px;
- margin-bottom : 20px;
-}
-
-#val_second{
- width : 100%;
-}
-
-.line{
- width : 30%;
- float :left;
- margin-left : 10px;
-}
-
-#validation {
- border-collapse:separate;
- border-spacing: 20px;
- margin-top : 30px;
-}
-
-#wrapper{
- margin-top : 30px;
-}
-
-.text_doct{
- font-family : arial, sans, serif;
- font-size : 16px;
- font-weight : bolder;
-}
-
-.sign_line{
- margin-top : 50px;
- border-top: 1px solid black;
- width : 100%;
- height : 1px;
-}
-]]>
- </field>
- </record>
- </data>
-</openerp>
=== removed directory 'cr_hr_report/i18n'
=== removed file 'cr_hr_report/i18n/es_CR.po'
--- cr_hr_report/i18n/es_CR.po 2012-05-04 14:04:10 +0000
+++ cr_hr_report/i18n/es_CR.po 1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * ccorp_payment_receipt
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.3\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
-"POT-Creation-Date: 2012-01-03 22:28+0000\n"
-"PO-Revision-Date: 2012-01-03 22:28+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:39
-msgid "Check No."
-msgstr "CHEQUE No."
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:13
-msgid "No."
-msgstr "No."
-
-#. module: ccorp_payment_receipt
-#: model:ir.actions.report.xml,name:ccorp_payment_receipt.account_voucher_ccorp
-msgid "Payment Voucher"
-msgstr "Imprimir Recibo"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:46
-msgid "AUTORIZADO MEDIANTE OFICIO No.04-00007-97 DE FECHA 30-09-97 DE LA D.G.T.D."
-msgstr "AUTORIZADO MEDIANTE OFICIO No.04-00007-97 DE FECHA 30-09-97 DE LA D.G.T.D."
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:23
-msgid "Concept of"
-msgstr "POR CONCEPTO DE"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:45
-msgid "LA VALIDEZ DE ESTE RECIBO QUEDA SUJETA A QUE LOS CHEQUES RECIBIDOS SEAN PAGADOS POR EL BANCO A NUESTRA SATISFACCION"
-msgstr "LA VALIDEZ DE ESTE RECIBO QUEDA SUJETA A QUE LOS CHEQUES RECIBIDOS SEAN PAGADOS POR EL BANCO A NUESTRA SATISFACCION"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:37
-msgid "Cash"
-msgstr "EFECTIVO"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:20
-msgid "The amount of"
-msgstr "LA SUMA DE"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:26
-msgid "Observations"
-msgstr "OBSERVACIONES"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:49
-msgid "P/"
-msgstr "P/"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:17
-msgid "We recieve from"
-msgstr "RECIBIMOS DE"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:1
-msgid "MONEY RECEIPT"
-msgstr "RECIBO DE DINERO"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:1
-msgid "Date"
-msgstr "FECHA"
-
-#. module: ccorp_payment_receipt
-#: report:report.account.voucher.layout_ccorp:1
-msgid "In words"
-msgstr "EN LETRAS"
=== removed file 'cr_hr_report/payroll_report.xml'
--- cr_hr_report/payroll_report.xml 2012-05-23 15:29:34 +0000
+++ cr_hr_report/payroll_report.xml 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
- <data>
- <report auto="False" id="hr_payslip_run_ccorp" model="hr.payslip.run"
- name="hr.payslip.run.layout_ccorp" file="cr_hr_report/report/payroll_report.mako" string="Reporte de Planilla" report_type="webkit"/>
- </data>
-</openerp>
=== removed directory 'cr_hr_report/report'
=== removed file 'cr_hr_report/report/__init__.py'
--- cr_hr_report/report/__init__.py 2012-05-23 15:29:34 +0000
+++ cr_hr_report/report/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# __init__.py
-# payroll_report
-# First author: Carlos Vásquez <carlos.vasquez@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
-# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of
-# conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list
-# of conditions and the following disclaimer in the documentation and/or other materials
-# provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are those of the
-# authors and should not be interpreted as representing official policies, either expressed
-# or implied, of ClearCorp S.A..
-#
-##############################################################################
-
-import payroll_report
=== removed file 'cr_hr_report/report/amount_to_text.py'
--- cr_hr_report/report/amount_to_text.py 2012-05-04 14:04:10 +0000
+++ cr_hr_report/report/amount_to_text.py 1970-01-01 00:00:00 +0000
@@ -1,127 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#from tools import #debug
-UNIDADES = (
- '',
- 'UN ',
- 'DOS ',
- 'TRES ',
- 'CUATRO ',
- 'CINCO ',
- 'SEIS ',
- 'SIETE ',
- 'OCHO ',
- 'NUEVE ',
- 'DIEZ ',
- 'ONCE ',
- 'DOCE ',
- 'TRECE ',
- 'CATORCE ',
- 'QUINCE ',
- 'DIECISEIS ',
- 'DIECISIETE ',
- 'DIECIOCHO ',
- 'DIECINUEVE ',
- 'VEINTE '
-)
-DECENAS = (
- 'VENTI',
- 'TREINTA ',
- 'CUARENTA ',
- 'CINCUENTA ',
- 'SESENTA ',
- 'SETENTA ',
- 'OCHENTA ',
- 'NOVENTA ',
- 'CIEN '
-)
-CENTENAS = (
- 'CIENTO ',
- 'DOSCIENTOS ',
- 'TRESCIENTOS ',
- 'CUATROCIENTOS ',
- 'QUINIENTOS ',
- 'SEISCIENTOS ',
- 'SETECIENTOS ',
- 'OCHOCIENTOS ',
- 'NOVECIENTOS '
-)
-
-def number_to_text_es(number_in,currency,join_dec=' Y ',separator=',',decimal_point='.'):
-
- converted = ''
- if currency == False:
- currency = ''
-
- if type(number_in) != 'str':
- number = str(number_in)
- else:
- number = number_in
-
- number_str=number
- #if we are using the coma as separator we need to remove them from the string
- try:
- number_str = number_str.replace(separator,'')
- except ValueError:
- print 'The separator used for the thousands its not supported'
-
- #debug(number_str)
-
- try:
- number_int, number_dec = number_str.split(decimal_point)
- except ValueError:
- number_int = number_str
- number_dec = ""
-
- number_str = number_int.zfill(9)
- millones = number_str[:3]
- miles = number_str[3:6]
- cientos = number_str[6:]
-
- if(millones):
- if(millones == '001'):
- converted += 'UN MILLON '
- elif(int(millones) > 0):
- converted += '%sMILLONES ' % __convertNumber(millones)
-
- if(miles):
- if(miles == '001'):
- converted += 'MIL '
- elif(int(miles) > 0):
- converted += '%sMIL ' % __convertNumber(miles)
- if(cientos):
- if(cientos == '001'):
- converted += 'UN '
- elif(int(cientos) > 0):
- converted += '%s ' % __convertNumber(cientos)
-
- if number_dec == "":
- number_dec = "00"
- if (len(number_dec) < 2 ):
- number_dec+='0'
-
- has_decimal = float(number_dec) != 0 and join_dec + number_dec + "/100" or ' EXACTOS'
- converted += currency + has_decimal
-
-
- return converted
-
-def __convertNumber(n):
- output = ''
-
- if(n == '100'):
- output = "CIEN "
- elif(n[0] != '0'):
- output = CENTENAS[int(n[0])-1]
-
- k = int(n[1:])
- if(k <= 20):
- output += UNIDADES[k]
- else:
- if((k > 30) & (n[2] != '0')):
- output += '%sY %s' % (DECENAS[int(n[1])-2], UNIDADES[int(n[2])])
- else:
- output += '%s%s' % (DECENAS[int(n[1])-2], UNIDADES[int(n[2])])
-
- return output
=== removed file 'cr_hr_report/report/header.html'
--- cr_hr_report/report/header.html 2012-05-04 14:04:10 +0000
+++ cr_hr_report/report/header.html 1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "header" onload="subst()">
- <table class="header-table" cellspacing = "3">
- <tbody>
- <tr>
- <td>
- ${helper.embed_logo_by_name('company_logo')|n}
- </td>
- <td>
- <table class="company_data">
- <tr class = "title">
- <td>${company.partner_id.name |entity}</td>
- <td style = "text-align : right;" rowspan = "6">${_("MONEY RECEIPT")}</td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].street or ''|entity}, ${company.partner_id.address[0].street2 or ''|entity}</td>
- <td style = "text-align : right;"></td>
- </tr>
- <tr>
- <td>${_("Tel. PBX")}: ${company.partner_id.address[0].phone or '-'|entity} - ${_("FAX")}: ${company.partner_id.address[0].fax or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].zip or ''|entity} ${company.partner_id.address[0].city or ''|entity}, ${company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name or ''|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("CED. JUR")}: ${company.partner_id.ref or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("Web")}: ${company.partner_id.website or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- <hr/>
- ${_debug or ''|n} </body>
-</html>
-
-<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "footer" onload="subst()">
- <table class = "footer_table">
- <tr><td><p class ="company_footer">${company.webkit_footer1 or ' '}</p></td></tr>
- <tr><td><p class ="company_footer">${company.webkit_footer2 or ' '}</p></td></tr>
- <tr><td><p class ="company_footer">${company.webkit_footer3 or ' '}</p></td></tr>
- </table>
- </body>
-</html>
=== removed file 'cr_hr_report/report/payroll_report.mako'
--- cr_hr_report/report/payroll_report.mako 2012-05-23 15:29:34 +0000
+++ cr_hr_report/report/payroll_report.mako 1970-01-01 00:00:00 +0000
@@ -1,202 +0,0 @@
-<html>
- <head>
- <style type="text/css">
- ${css}
-
- .list_table .act_as_row {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size:10px;
- }
-
- .account_line {
- font-weight: bold;
- font-size: 15px;
- background-color:#F0F0F0;
- }
-
- .account_line .act_as_cell {
- height: 30px;
- vertical-align: bottom;
- }
-
- </style>
- </head>
-<body class = "data">
- %for run in objects :
- <%
- emp_by_dep = get_obj_by_dep(run)
- %>
- <%
- total_hn = 0.0
- total_he = 0.0
- total_fe = 0.0
- total_basic = 0.0
- total_exs = 0.0
- total_fes = 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
- %>
- <div style="font-size: 20px; font-weight: bold; text-align: center;"> ${company.partner_id.name | entity} - ${company.currency_id.name | entity}</div>
- <div style="font-size: 25px; font-weight: bold; text-align: center;"> Reporte de Planilla</div>
- <div style="font-size: 20px; font-weight: bold; text-align: center;"> ${run.name}</div>
- <div style="font-size: 16px; font-weight: bold; text-align: center;">Periodo de ${run.date_start} a ${run.date_end}</div>
- </br></br>
- %for department in emp_by_dep:
- <%
- total_hn_dep = 0.0
- total_he_dep = 0.0
- total_fe_dep = 0.0
- total_basic_dep = 0.0
- total_exs_dep = 0.0
- total_fes_dep = 0.0
- total_gross_dep = 0.0
- total_basic_dep = 0.0
- total_rent_dep = 0.0
- total_ccss_dep = 0.0
- total_net_dep = 0.0
- total_emp_dep = 0
- %>
- <div class="account_title bg" style="margin-top: 20px; font-size: 12px; width: 1080px;">${department[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">${_('Cedula')}</div>
- <div class="act_as_cell" style="width: 250px; vertical-align: middle">${_('Nombre')}</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" style="width: 40px;">${_('Hrs.')}<br />${_('Dob')}</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">${_('Ingr.')}<br />${_('Doble')}</div>
- <div class="act_as_cell amount">${_('Otros')}<br />${_('Ingr.')}</div>
- <div class="act_as_cell amount">${_('Salario')}<br />${_('Bruto')}</div>
- <div class="act_as_cell amount">${_('Deducc.')}<br />${_('CCSS/BP')}</div>
- <div class="act_as_cell amount">${_('Impuesto')}<br />${_('Renta')}</div>
- <div class="act_as_cell amount">${_('Otras')}<br />${_('Deducc.')}</div>
- <div class="act_as_cell amount">${_('Salario')}<br />${_('Neto')}</div>
- </div>
- </div>
-
- <div class="act_as_tbody">
- %for slip in sorted(department[1], key=lambda slip: slip.employee_id.name):
- <div class="act_as_row lines">
- ## cedula
- <div class="act_as_cell first_column" style="width: 80px;">${slip.employee_id.identification_id or ''}</div>
- ## nombre
- <div class="act_as_cell">${slip.employee_id.name or '0'}</div>
- ## nh
- <div class="act_as_cell amount">${get_hn(slip.worked_days_line_ids) or '0'}</div>
- ## eh
- <div class="act_as_cell amount">${get_he(slip.worked_days_line_ids) or '0'}</div>
- ## ef
- <div class="act_as_cell amount">${get_fe(slip.worked_days_line_ids) or '0'}</div>
- ## basic
- <div class="act_as_cell amount">${formatLang(get_basic(slip.line_ids)) or '0'}</div>
- ## exs
- <div class="act_as_cell amount">${formatLang(get_exs(slip.line_ids)) or '0'}</div>
- ## fes
- <div class="act_as_cell amount">${formatLang(get_fes(slip.line_ids)) or '0'}</div>
- ## otros
- <div class="act_as_cell amount">${ '0'}</div>
- ## gross
- <div class="act_as_cell amount ">${formatLang(get_gross(slip.line_ids)) or '0'}</div>
- ## ccss
- <div class="act_as_cell amount">${formatLang(get_ccss(slip.line_ids)) or '0'}</div>
- ## RENTA
- <div class="act_as_cell amount">${formatLang(get_rent(slip.line_ids)) or '0'}</div>
- ## otros
- <div class="act_as_cell amount">${ '0'}</div>
- ## NETOS
- <div class="act_as_cell amount">${formatLang(get_net(slip.line_ids)) or '0'}</div>
- <%
- ## Totales por Departamento
- total_hn_dep += get_hn(slip.worked_days_line_ids)
- total_he_dep += get_he(slip.worked_days_line_ids)
- total_fe_dep += get_fe(slip.worked_days_line_ids)
- total_basic_dep += get_basic(slip.line_ids)
- total_exs_dep += get_exs(slip.line_ids)
- total_fes_dep += get_fes(slip.line_ids)
- total_gross_dep += get_gross(slip.line_ids)
- total_rent_dep += get_rent(slip.line_ids)
- total_ccss_dep += get_ccss(slip.line_ids)
- total_net_dep += get_net(slip.line_ids)
- total_emp_dep += 1
-
- ## Totales Generales
- total_hn += get_hn(slip.worked_days_line_ids)
- total_he += get_he(slip.worked_days_line_ids)
- total_fe += get_fe(slip.worked_days_line_ids)
- total_basic += get_basic(slip.line_ids)
- total_exs += get_exs(slip.line_ids)
- total_fes += get_fes(slip.line_ids)
- total_gross += get_gross(slip.line_ids)
- total_rent += get_rent(slip.line_ids)
- total_ccss += get_ccss(slip.line_ids)
- total_net += get_net(slip.line_ids)
- 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_dep} Empleados</div>
- <div class="act_as_cell amount">${total_hn_dep}</div>
- <div class="act_as_cell amount">${total_he_dep}</div>
- <div class="act_as_cell amount">${total_fe_dep}</div>
- <div class="act_as_cell amount">${formatLang(total_basic_dep)}</div>
- <div class="act_as_cell amount">${formatLang(total_exs_dep)}</div>
- <div class="act_as_cell amount">${formatLang(total_fes_dep)}</div>
- <div class="act_as_cell amount">${_('0')}</div>
- <div class="act_as_cell amount">${formatLang(total_gross_dep)}</div>
- <div class="act_as_cell amount">${formatLang(total_ccss_dep)}</div>
- <div class="act_as_cell amount">${formatLang(total_rent_dep)}</div>
- <div class="act_as_cell amount">${_('0')}</div>
- <div class="act_as_cell amount">${formatLang(total_net_dep)}</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 GENERAL')}</div>
- <div class="act_as_cell" style="width: 250px;">${total_emp} Empleados</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" style="width: 40px;">${total_fe}</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_fes)}</div>
- <div class="act_as_cell amount">${_('0')}</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')}</div>
- <div class="act_as_cell amount">${formatLang(total_net)}</div>
- </div>
- </div>
- </div>
- %endfor
- <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">${'HECHO POR:'}</div>
- <div class="act_as_cell" style="padding-top:80px;padding-bottom:5px">${'REVISADO POR:'}</div>
- <div class="act_as_cell" style="padding-top:80px;padding-bottom:5px">${'APROBADO POR:'}</div>
- </div>
- </div>
- </div>
- <p style="page-break-after:always"></p>
-
-
-</body>
-</html>
=== removed file 'cr_hr_report/report/payroll_report.py'
--- cr_hr_report/report/payroll_report.py 2012-05-23 15:29:34 +0000
+++ cr_hr_report/report/payroll_report.py 1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-#
-# payment_receipt
-# First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
-# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of
-# conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list
-# of conditions and the following disclaimer in the documentation and/or other materials
-# provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are those of the
-# authors and should not be interpreted as representing official policies, either expressed
-# or implied, of ClearCorp S.A..
-#
-##############################################################################
-
-import time
-import pooler
-from report import report_sxw
-from amount_to_text import number_to_text_es
-import locale
-
-class hr_payslip_run_report(report_sxw.rml_parse):
- def __init__(self, cr, uid, name, context):
- super(hr_payslip_run_report, self).__init__(cr, uid, name, context=context)
- self.localcontext.update({
- 'time': time,
- 'cr' : cr,
- 'uid': uid,
- 'get_text':self.get_text,
- 'get_hn':self.get_hn,
- 'get_he':self.get_he,
- 'get_fe':self.get_fe,
- 'get_basic':self.get_basic,
- 'get_exs':self.get_exs,
- 'get_fes':self.get_fes,
- 'get_gross':self.get_gross,
- 'get_ccss':self.get_ccss,
- 'get_net':self.get_net,
- 'get_rent':self.get_rent,
- 'get_obj_by_dep':self.get_obj_by_dep,
- })
-
- def get_prefix(self,currency,company_id):
- separator = ','
- decimal_point = '.'
- res = ''
- name_currency = currency.currency_name
- if name_currency == False:
- name_currency = company_id.currency_id.currency_name
- res = company_id.currency_id.symbol_prefix
- if name_currency == None:
- name_currency = company_id.currency_id.currency_name
- res = company_id.currency_id.symbol_prefix
-
-
- return res
-
- def get_hn(self,line_ids):
- code = 'HN'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.number_of_hours
-
- return res
-
- def get_he(self,line_ids):
- code = 'HE'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.number_of_hours
-
- return res
-
-
- def get_fe(self,line_ids):
- code = 'FE'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.number_of_hours
-
- return res
-
- def get_basic(self,line_ids):
- code = 'BASIC'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
- return res
-
- def get_exs(self,line_ids):
- code = 'EXS'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
-
- return res
-
-
- def get_fes(self,line_ids):
- code = 'FES'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
-
- return res
-
-
- def get_gross(self,line_ids):
- code = 'GROSS'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
-
- return res
-
- def get_ccss(self,line_ids):
- code = 'CCSS-EMP'
- code2 = 'Banco Popular-EMP'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
- elif line.code == code2:
- res += line.total
-
- return res
-
-
- def get_net(self,line_ids):
- code = 'NET'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
-
- return res
-
-
- def get_rent(self,line_ids):
- code = 'Renta'
- res = 0
- for line in line_ids:
- if line.code == code:
- res += line.total
-
-
- return res
-
-
- def get_obj_by_dep(self,run):
- obj_by_dep = []
- dep_list = []
- emp_by_dep = []
-
- for payslip in run.slip_ids:
- dep_name = payslip.employee_id.department_id.name
- if dep_name not in dep_list:
- dep_list.append(dep_name)
-
- for dep in dep_list:
- dep_emp = []
- for payslip in run.slip_ids:
- if payslip.employee_id.department_id.name == dep:
- dep_emp.append(payslip)
- obj_by_dep.append(dep_emp)
-
- i = 0
- for dep in dep_list:
- tup_temp = (dep, obj_by_dep[i])
- emp_by_dep.append(tup_temp)
- i += 1
-
-
- return emp_by_dep
-
- def get_text(self,amount,currency,lang,company_id):
- separator = ','
- decimal_point = '.'
- name_currency = currency.currency_name
- if name_currency == False:
- name_currency = company_id.currency_id.currency_name
- if name_currency == None:
- name_currency = company_id.currency_id.currency_name
- if lang:
- lang_pool = self.pool.get('res.lang')
- id_lang = lang_pool.search(self.cr,self.uid,[('code','=',lang)])
- obj_lang = lang_pool.browse(self.cr,self.uid,id_lang)[0]
- separator = obj_lang and obj_lang.thousands_sep or separator
- decimal_point = obj_lang and obj_lang.decimal_point or decimal_point
- res = number_to_text_es(amount,name_currency,separator=separator,decimal_point=decimal_point)
- return res
-
-report_sxw.report_sxw(
- 'report.hr.payslip.run.layout_ccorp',
- 'hr.payslip.run',
- 'addons/cr_hr_report/report/payroll_report.mako',
- parser=hr_payslip_run_report)
=== removed file 'cr_hr_report/report/style.css'
--- cr_hr_report/report/style.css 2012-05-04 14:04:10 +0000
+++ cr_hr_report/report/style.css 1970-01-01 00:00:00 +0000
@@ -1,143 +0,0 @@
-/*HEADER*/
-.header {
- padding : 100px 10px 5px 10px;
- border:0; margin: 0;
-}
-.header-table {
- width: 100%;
- margin-top: 8%;
-}
-
-.title {
- font-size:16;
- font-weight: bold;
-}
-
-.company_address{
- width : 100%;
- text-align: right;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.company_data {
- width : 100%;
- text-align: center;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.header_logo{
- width : 150px;
-}
-
-/*BODY*/
-
-
-
-#document_data{
- margin-bottom : 50px;
- width : 100%;
-}
-
-#number{
- text-align : left;
- color : red;
- font-size : 0.9em;
- float : left;
-}
-
-#date {
- margin : 20px 0px 5px 400px;
-}
-
-.detail {
- margin-top : 10px;
- width : 100%;
-}
-
-.text_font{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- font-style : bold;
- margin-left : 15px;
-}
-
-.detail_line{
- width : 100%;
- float : left;
-}
-.amount_text{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- margin-left : 15px;
- font-style : bold;
-}
-
-.info{
- padding-top : 35px;
- width: 100%;
-}
-
-.info_detail{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 11px;
- font-style : italic;
-}
-
-.signature {
- text-align : center;
- background-color : #EBEBEB;
- border: 1px solid black;
- -webkit-border-radius: 10px;
- width : 100%;
-}
-.sign_detail {
- margin-bottom : 40px;
-}
-
-.payment_method{
- width : 50%;
- float :left;
- margin-left : 30px;
-}
-
-#val_first{
- width : 100%;
- margin-top : 20px;
- margin-bottom : 20px;
-}
-
-#val_second{
- width : 100%;
-}
-
-.line{
- width : 50%;
- float :left;
- margin-left : 10px;
-}
-
-#validation {
- border-collapse:separate;
- border-spacing: 20px;
- margin-top : 30px;
- width : 100%;
-}
-
-#wrapper{
- margin-top : 30px;
-}
-
-.text_doct{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- font-weight : bolder;
-}
-
-.sign_line{
- margin-top : 38px;
- border-top: 1px solid black;
- width : 100%;
- height : 1px;
-}
=== modified file 'l10n_cr_hr_payroll/__openerp__.py'
--- l10n_cr_hr_payroll/__openerp__.py 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/__openerp__.py 2012-05-25 22:10:23 +0000
@@ -44,7 +44,8 @@
'report_webkit',
],
'update_xml': [
- 'payroll_report.xml',
+ 'payroll_report.xml',
+ 'l10n_cr_hr_payroll_view.xml'
],
'installable': True,
'auto_install': False,
=== removed file 'l10n_cr_hr_payroll/data.xml'
--- l10n_cr_hr_payroll/data.xml 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/data.xml 1970-01-01 00:00:00 +0000
@@ -1,218 +0,0 @@
-<?xml version="1.0" ?>
- <openerp>
- <data noupdate="1">
- <record id="ir_header_webkit_base_check" model="ir.header_webkit">
- <field eval=""""Portrait"""" name="orientation"/>
- <field eval=""""Letter"""" name="format"/>
- <field name="html"><![CDATA[<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "header" onload="subst()">
- <table class="header-table" cellspacing = "3">
- <tbody>
- <tr>
- <td>
- <div id="header_logo">${helper.embed_logo_by_name('company_logo')|n}</div>
- </td>
- <td>
- <table class="company_data">
- <tr class = "title">
- <td>${company.partner_id.name |entity}</td>
- <td style = "text-align : right;" rowspan = "6">${_("MONEY RECEIPT")}</td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].street or ''|entity}, ${company.partner_id.address[0].street2 or ''|entity}</td>
- <td style = "text-align : right;"></td>
- </tr>
- <tr>
- <td>${_("Tel. PBX")}: ${company.partner_id.address[0].phone or '-'|entity} - ${_("FAX")}: ${company.partner_id.address[0].fax or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].zip or ''|entity} ${company.partner_id.address[0].city or ''|entity}, ${company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name or ''|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("CED. JUR")}: ${company.partner_id.ref or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("Web")}: ${company.partner_id.website or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- <hr/>
- ${_debug or ''|n} </body>
-</html>]]>
- </field>
- <field eval="95.0" name="margin_top"/>
- <field eval="14.0" name="margin_left"/>
- <field eval="14.0" name="margin_right"/>
- <field name="css" ><![CDATA[
- /*HEADER*/
-.header {
- padding : 100px 10px 5px 10px;
- border:0; margin: 0;
-}
-.header-table {
- width: 100%;
- margin-top: 8%;
-}
-
-.title {
- font-size:16;
- font-weight: bold;
-}
-
-.company_address{
- width : 100%;
- text-align: right;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.company_data {
- width : 100%;
- text-align: center;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.header_logo{
- width : 150px;
-}
-
-/*BODY*/
-
-
-
-#document_data{
- margin-bottom : 50px;
- width : 100%;
-}
-
-#number{
- text-align : left;
- color : red;
- font-size : 0.9em;
- float : left;
-}
-
-#date {
- margin : 20px 0px 5px 400px;
-}
-
-.detail {
- margin-top : 10px;
- width : 100%;
-}
-
-.text_font{
- font-family : courier, arial, sans, serif;
- font-size : 14px;
- font-style : bold;
- margin-left : 15px
-}
-
-.detail_line{
- width : 100%;
- float : left;
-}
-.amount_text{
- font-family : courier, arial, sans, serif;
- font-size : 16px;
- font-style : italic;
- margin : 5px;
- width : 100%;
- font-style : bold;
-}
-
-.info{
- padding-top : 35px;
-}
-
-.info_detail{
- font-family : courier, arial, sans, serif;
- font-size : 9px;
- font-style : italic;
-}
-
-.signature {
- text-align : center;
- background-color : #BFBFBF;
- border: 1px solid black;
- -webkit-border-radius: 10px;
-}
-.sign_detail {
- margin-bottom : 40px;
-}
-
-.payment_method{
- width : 50%;
- float :left;
- margin-left : 30px;
-}
-
-#val_first{
- width : 100%;
- margin-top : 20px;
- margin-bottom : 20px;
-}
-
-#val_second{
- width : 100%;
-}
-
-.line{
- width : 30%;
- float :left;
- margin-left : 10px;
-}
-
-#validation {
- border-collapse:separate;
- border-spacing: 20px;
- margin-top : 30px;
-}
-
-#wrapper{
- margin-top : 30px;
-}
-
-.text_doct{
- font-family : arial, sans, serif;
- font-size : 16px;
- font-weight : bolder;
-}
-
-.sign_line{
- margin-top : 50px;
- border-top: 1px solid black;
- width : 100%;
- height : 1px;
-}
-]]>
- </field>
- </record>
- </data>
-</openerp>
=== added file 'l10n_cr_hr_payroll/l10n_cr_hr_payroll_view.xml'
--- l10n_cr_hr_payroll/l10n_cr_hr_payroll_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_cr_hr_payroll/l10n_cr_hr_payroll_view.xml 2012-05-25 22:10:23 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <!-- Jobs -->
+ <record id="hr_job_period_rule_form" model="ir.ui.view">
+ <field name="name">hr.job.period.rule.form</field>
+ <field name="model">hr.job</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_hr_job_form"/>
+ <field name="arch" type="xml">
+ <data>
+ <field name = "name" position = "after">
+ <field name="code" />
+ </field>
+ </data>
+ </field>
+ </record>
+ <!-- End Jobs -->
+
+ </data>
+</openerp>
=== removed file 'l10n_cr_hr_payroll/report/amount_to_text.py'
--- l10n_cr_hr_payroll/report/amount_to_text.py 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/report/amount_to_text.py 1970-01-01 00:00:00 +0000
@@ -1,127 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#from tools import #debug
-UNIDADES = (
- '',
- 'UN ',
- 'DOS ',
- 'TRES ',
- 'CUATRO ',
- 'CINCO ',
- 'SEIS ',
- 'SIETE ',
- 'OCHO ',
- 'NUEVE ',
- 'DIEZ ',
- 'ONCE ',
- 'DOCE ',
- 'TRECE ',
- 'CATORCE ',
- 'QUINCE ',
- 'DIECISEIS ',
- 'DIECISIETE ',
- 'DIECIOCHO ',
- 'DIECINUEVE ',
- 'VEINTE '
-)
-DECENAS = (
- 'VENTI',
- 'TREINTA ',
- 'CUARENTA ',
- 'CINCUENTA ',
- 'SESENTA ',
- 'SETENTA ',
- 'OCHENTA ',
- 'NOVENTA ',
- 'CIEN '
-)
-CENTENAS = (
- 'CIENTO ',
- 'DOSCIENTOS ',
- 'TRESCIENTOS ',
- 'CUATROCIENTOS ',
- 'QUINIENTOS ',
- 'SEISCIENTOS ',
- 'SETECIENTOS ',
- 'OCHOCIENTOS ',
- 'NOVECIENTOS '
-)
-
-def number_to_text_es(number_in,currency,join_dec=' Y ',separator=',',decimal_point='.'):
-
- converted = ''
- if currency == False:
- currency = ''
-
- if type(number_in) != 'str':
- number = str(number_in)
- else:
- number = number_in
-
- number_str=number
- #if we are using the coma as separator we need to remove them from the string
- try:
- number_str = number_str.replace(separator,'')
- except ValueError:
- print 'The separator used for the thousands its not supported'
-
- #debug(number_str)
-
- try:
- number_int, number_dec = number_str.split(decimal_point)
- except ValueError:
- number_int = number_str
- number_dec = ""
-
- number_str = number_int.zfill(9)
- millones = number_str[:3]
- miles = number_str[3:6]
- cientos = number_str[6:]
-
- if(millones):
- if(millones == '001'):
- converted += 'UN MILLON '
- elif(int(millones) > 0):
- converted += '%sMILLONES ' % __convertNumber(millones)
-
- if(miles):
- if(miles == '001'):
- converted += 'MIL '
- elif(int(miles) > 0):
- converted += '%sMIL ' % __convertNumber(miles)
- if(cientos):
- if(cientos == '001'):
- converted += 'UN '
- elif(int(cientos) > 0):
- converted += '%s ' % __convertNumber(cientos)
-
- if number_dec == "":
- number_dec = "00"
- if (len(number_dec) < 2 ):
- number_dec+='0'
-
- has_decimal = float(number_dec) != 0 and join_dec + number_dec + "/100" or ' EXACTOS'
- converted += currency + has_decimal
-
-
- return converted
-
-def __convertNumber(n):
- output = ''
-
- if(n == '100'):
- output = "CIEN "
- elif(n[0] != '0'):
- output = CENTENAS[int(n[0])-1]
-
- k = int(n[1:])
- if(k <= 20):
- output += UNIDADES[k]
- else:
- if((k > 30) & (n[2] != '0')):
- output += '%sY %s' % (DECENAS[int(n[1])-2], UNIDADES[int(n[2])])
- else:
- output += '%s%s' % (DECENAS[int(n[1])-2], UNIDADES[int(n[2])])
-
- return output
=== removed file 'l10n_cr_hr_payroll/report/header.html'
--- l10n_cr_hr_payroll/report/header.html 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/report/header.html 1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "header" onload="subst()">
- <table class="header-table" cellspacing = "3">
- <tbody>
- <tr>
- <td>
- ${helper.embed_logo_by_name('company_logo')|n}
- </td>
- <td>
- <table class="company_data">
- <tr class = "title">
- <td>${company.partner_id.name |entity}</td>
- <td style = "text-align : right;" rowspan = "6">${_("MONEY RECEIPT")}</td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].street or ''|entity}, ${company.partner_id.address[0].street2 or ''|entity}</td>
- <td style = "text-align : right;"></td>
- </tr>
- <tr>
- <td>${_("Tel. PBX")}: ${company.partner_id.address[0].phone or '-'|entity} - ${_("FAX")}: ${company.partner_id.address[0].fax or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${company.partner_id.address[0].zip or ''|entity} ${company.partner_id.address[0].city or ''|entity}, ${company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name or ''|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("CED. JUR")}: ${company.partner_id.ref or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- <tr>
- <td>${_("Web")}: ${company.partner_id.website or '-'|entity}</td>
- <td style = "text-align : right;"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- <hr/>
- ${_debug or ''|n} </body>
-</html>
-
-<html>
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <script>
- function subst() {
- var vars={};
- var x=document.location.search.substring(1).split('&');
- for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
- var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
- for(var i in x) {
- var y = document.getElementsByClassName(x[i]);
- for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
- }
- }
- </script>
- <style type="text/css">
- ${css}
- </style>
- </head>
- <body class = "footer" onload="subst()">
- <table class = "footer_table">
- <tr><td><p class ="company_footer">${company.webkit_footer1 or ' '}</p></td></tr>
- <tr><td><p class ="company_footer">${company.webkit_footer2 or ' '}</p></td></tr>
- <tr><td><p class ="company_footer">${company.webkit_footer3 or ' '}</p></td></tr>
- </table>
- </body>
-</html>
=== modified file 'l10n_cr_hr_payroll/report/payroll_report.py'
--- l10n_cr_hr_payroll/report/payroll_report.py 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/report/payroll_report.py 2012-05-25 22:10:23 +0000
@@ -35,7 +35,6 @@
import time
import pooler
from report import report_sxw
-from amount_to_text import number_to_text_es
import locale
class hr_payslip_run_report(report_sxw.rml_parse):
@@ -45,7 +44,6 @@
'time': time,
'cr' : cr,
'uid': uid,
- 'get_text':self.get_text,
'get_hn':self.get_hn,
'get_he':self.get_he,
'get_fe':self.get_fe,
@@ -204,22 +202,6 @@
return emp_by_dep
- def get_text(self,amount,currency,lang,company_id):
- separator = ','
- decimal_point = '.'
- name_currency = currency.currency_name
- if name_currency == False:
- name_currency = company_id.currency_id.currency_name
- if name_currency == None:
- name_currency = company_id.currency_id.currency_name
- if lang:
- lang_pool = self.pool.get('res.lang')
- id_lang = lang_pool.search(self.cr,self.uid,[('code','=',lang)])
- obj_lang = lang_pool.browse(self.cr,self.uid,id_lang)[0]
- separator = obj_lang and obj_lang.thousands_sep or separator
- decimal_point = obj_lang and obj_lang.decimal_point or decimal_point
- res = number_to_text_es(amount,name_currency,separator=separator,decimal_point=decimal_point)
- return res
report_sxw.report_sxw(
'report.hr.payslip.run.layout_ccorp',
=== removed file 'l10n_cr_hr_payroll/report/style.css'
--- l10n_cr_hr_payroll/report/style.css 2012-05-23 15:29:34 +0000
+++ l10n_cr_hr_payroll/report/style.css 1970-01-01 00:00:00 +0000
@@ -1,143 +0,0 @@
-/*HEADER*/
-.header {
- padding : 100px 10px 5px 10px;
- border:0; margin: 0;
-}
-.header-table {
- width: 100%;
- margin-top: 8%;
-}
-
-.title {
- font-size:16;
- font-weight: bold;
-}
-
-.company_address{
- width : 100%;
- text-align: right;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.company_data {
- width : 100%;
- text-align: center;
- font-family: Arial,Verdana, Sans, Serif;
- font-size: 13;
-}
-
-.header_logo{
- width : 150px;
-}
-
-/*BODY*/
-
-
-
-#document_data{
- margin-bottom : 50px;
- width : 100%;
-}
-
-#number{
- text-align : left;
- color : red;
- font-size : 0.9em;
- float : left;
-}
-
-#date {
- margin : 20px 0px 5px 400px;
-}
-
-.detail {
- margin-top : 10px;
- width : 100%;
-}
-
-.text_font{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- font-style : bold;
- margin-left : 15px;
-}
-
-.detail_line{
- width : 100%;
- float : left;
-}
-.amount_text{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- margin-left : 15px;
- font-style : bold;
-}
-
-.info{
- padding-top : 35px;
- width: 100%;
-}
-
-.info_detail{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 11px;
- font-style : italic;
-}
-
-.signature {
- text-align : center;
- background-color : #EBEBEB;
- border: 1px solid black;
- -webkit-border-radius: 10px;
- width : 100%;
-}
-.sign_detail {
- margin-bottom : 40px;
-}
-
-.payment_method{
- width : 50%;
- float :left;
- margin-left : 30px;
-}
-
-#val_first{
- width : 100%;
- margin-top : 20px;
- margin-bottom : 20px;
-}
-
-#val_second{
- width : 100%;
-}
-
-.line{
- width : 50%;
- float :left;
- margin-left : 10px;
-}
-
-#validation {
- border-collapse:separate;
- border-spacing: 20px;
- margin-top : 30px;
- width : 100%;
-}
-
-#wrapper{
- margin-top : 30px;
-}
-
-.text_doct{
- font-family : Arial,Verdana, Sans, Serif;
- font-size : 16px;
- font-weight : bolder;
-}
-
-.sign_line{
- margin-top : 38px;
- border-top: 1px solid black;
- width : 100%;
- height : 1px;
-}
Follow ups