Merge lp:~vauxoo/addons-vauxoo/7.0-add-module-hr_payslip_validation_home_address-jc into lp:addons-vauxoo/7.0

Proposed by Juan Carlos Hernandez
Status: Merged
Merged at revision: 1017
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-add-module-hr_payslip_validation_home_address-jc
Merge into: lp:addons-vauxoo/7.0
Diff against target: 242 lines (+210/-0)
6 files modified
hr_payslip_validation_home_address/__init__.py (+26/-0)
hr_payslip_validation_home_address/__openerp__.py (+51/-0)
hr_payslip_validation_home_address/i18n/es.po (+34/-0)
hr_payslip_validation_home_address/i18n/es_MX.po (+34/-0)
hr_payslip_validation_home_address/model/__init__.py (+26/-0)
hr_payslip_validation_home_address/model/hr_payroll.py (+39/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-add-module-hr_payslip_validation_home_address-jc
Reviewer Review Type Date Requested Status
Jorge Angel Naranjo Rogel - http://www.vauxoo.com Approve
Juan Carlos Hernandez Needs Resubmitting
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+218723@code.launchpad.net

Description of the change

se agregó módulo que valida si el empleado tiene una dirección particular en las nóminas

To post a comment you must log in.
Revision history for this message
Jorge Angel Naranjo Rogel - http://www.vauxoo.com (jorge-nr) wrote :

@Carlillos

Puedes ser un poco mas explicito en la descripción del modulo. Que se tiene que configurar? donde esta el campo? que arroja cuando no esta configurado el partner del empleado.

Debo aclarar que esta configuración no es para que funcione cfdi, también la ocupamos para la contabilidad de la nómina es por eso que esta vacilación se vuelve importante.

Saludos

Revision history for this message
Juan Carlos Hernandez (openerp1) wrote :

@Jorge
El módulo agrega una validación para que el empleado de una nómina tenga una dirección particular, es decir un partner asociado.
Solo se tienen que instalar el módulo,no hay que hacer ningún tipo de configuración.
Este campo se encuentra en la vista formulario Recursos Humanos/Nóminas del empleado/Empleado en la pestaña "Información personal" el campo se llama Dirección particular.
Si el campo de Dirección particular esta vacio no se podrá confirmar la nómina de dicho empleado y aparecerá una raise mostrando el mensaje de que necesita tener el empleado una dirección particualr, caso contrario si podrá hacerlo.

review: Needs Resubmitting
1011. By Juan Carlos Hernandez

[IMP][hr_payslip_validation_home_address]add description of module

Revision history for this message
Juan Carlos Hernandez (openerp1) wrote :

@Jorge
Ya quedo la descripción documentada en ingles en el modulo

review: Needs Resubmitting
Revision history for this message
Jorge Angel Naranjo Rogel - http://www.vauxoo.com (jorge-nr) wrote :

@carlos

1.- Puedes cambiar por don't el does not.
2.- Aplicar auto-pep 8 a el modulo

1012. By Juan Carlos Hernandez

[IMP][hr_payslip_validation_home_address]add autopep 8

Revision history for this message
Juan Carlos Hernandez (openerp1) wrote :

@Jorge

Listo cambios aplicados

review: Needs Resubmitting
Revision history for this message
Jorge Angel Naranjo Rogel - http://www.vauxoo.com (jorge-nr) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'hr_payslip_validation_home_address'
2=== added file 'hr_payslip_validation_home_address/__init__.py'
3--- hr_payslip_validation_home_address/__init__.py 1970-01-01 00:00:00 +0000
4+++ hr_payslip_validation_home_address/__init__.py 2014-05-14 23:24:55 +0000
5@@ -0,0 +1,26 @@
6+# -*- encoding: utf-8 -*-
7+#
8+# Module Writen to OpenERP, Open Source Management Solution
9+#
10+# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
11+# All Rights Reserved.
12+# info Vauxoo (info@vauxoo.com)
13+#
14+# Coded by: vauxoo consultores (info@vauxoo.com)
15+#
16+#
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as
19+# published by the Free Software Foundation, either version 3 of the
20+# License, or (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+#
30+#
31+import model
32
33=== added file 'hr_payslip_validation_home_address/__openerp__.py'
34--- hr_payslip_validation_home_address/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ hr_payslip_validation_home_address/__openerp__.py 2014-05-14 23:24:55 +0000
36@@ -0,0 +1,51 @@
37+# -*- encoding: utf-8 -*-
38+#
39+# Module Writen to OpenERP, Open Source Management Solution
40+#
41+# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
42+# All Rights Reserved.
43+# info Vauxoo (info@vauxoo.com)
44+#
45+# Coded by: vauxoo consultores (info@vauxoo.com)
46+#
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+#
62+
63+{
64+ "name": "Hr Payroll Home Address Validation",
65+ "version": "1.0",
66+ "author": "Vauxoo",
67+ "category": "Localization/Mexico",
68+ "description" : """
69+ This module adds validation for the field home_address of the employee in payroll
70+ Just have to install the module, not to do any configuration.
71+ This field home_address is found in form view HR / Payroll Employee / Employee_id
72+ in "Personal Information" tab If the field home_address is empty you can not confirm
73+ that employee's payroll and will see the message that the employee needs to have a
74+ home address, otherwise if may confirm the payroll.
75+ """,
76+ "website": "http://www.vauxoo.com/",
77+ "license": "AGPL-3",
78+ "depends": [
79+ "hr_payroll",
80+ "hr_payroll_account"
81+ ],
82+ "data": [
83+ ],
84+ "test": [],
85+ "installable": True,
86+ "active": False,
87+}
88
89=== added directory 'hr_payslip_validation_home_address/i18n'
90=== added file 'hr_payslip_validation_home_address/i18n/es.po'
91--- hr_payslip_validation_home_address/i18n/es.po 1970-01-01 00:00:00 +0000
92+++ hr_payslip_validation_home_address/i18n/es.po 2014-05-14 23:24:55 +0000
93@@ -0,0 +1,34 @@
94+# Translation of OpenERP Server.
95+# This file contains the translation of the following modules:
96+# * hr_payslip_validation_home_address
97+#
98+msgid ""
99+msgstr ""
100+"Project-Id-Version: OpenERP Server 7.0\n"
101+"Report-Msgid-Bugs-To: \n"
102+"POT-Creation-Date: 2014-05-08 00:11+0000\n"
103+"PO-Revision-Date: 2014-05-08 00:11+0000\n"
104+"Last-Translator: <>\n"
105+"Language-Team: \n"
106+"MIME-Version: 1.0\n"
107+"Content-Type: text/plain; charset=UTF-8\n"
108+"Content-Transfer-Encoding: \n"
109+"Plural-Forms: \n"
110+
111+#. module: hr_payslip_validation_home_address
112+#: code:addons/hr_payslip_validation_home_address/model/hr_payroll.py:34
113+#, python-format
114+msgid "Warning"
115+msgstr "Advertencia"
116+
117+#. module: hr_payslip_validation_home_address
118+#: model:ir.model,name:hr_payslip_validation_home_address.model_hr_payslip
119+msgid "Pay Slip"
120+msgstr "Nómina"
121+
122+#. module: hr_payslip_validation_home_address
123+#: code:addons/hr_payslip_validation_home_address/model/hr_payroll.py:34
124+#, python-format
125+msgid "This employee does not have a home address"
126+msgstr "Este empleado no tiene una dirección particular"
127+
128
129=== added file 'hr_payslip_validation_home_address/i18n/es_MX.po'
130--- hr_payslip_validation_home_address/i18n/es_MX.po 1970-01-01 00:00:00 +0000
131+++ hr_payslip_validation_home_address/i18n/es_MX.po 2014-05-14 23:24:55 +0000
132@@ -0,0 +1,34 @@
133+# Translation of OpenERP Server.
134+# This file contains the translation of the following modules:
135+# * hr_payslip_validation_home_address
136+#
137+msgid ""
138+msgstr ""
139+"Project-Id-Version: OpenERP Server 7.0\n"
140+"Report-Msgid-Bugs-To: \n"
141+"POT-Creation-Date: 2014-05-08 00:11+0000\n"
142+"PO-Revision-Date: 2014-05-08 00:11+0000\n"
143+"Last-Translator: <>\n"
144+"Language-Team: \n"
145+"MIME-Version: 1.0\n"
146+"Content-Type: text/plain; charset=UTF-8\n"
147+"Content-Transfer-Encoding: \n"
148+"Plural-Forms: \n"
149+
150+#. module: hr_payslip_validation_home_address
151+#: code:addons/hr_payslip_validation_home_address/model/hr_payroll.py:34
152+#, python-format
153+msgid "Warning"
154+msgstr "Advertencia"
155+
156+#. module: hr_payslip_validation_home_address
157+#: model:ir.model,name:hr_payslip_validation_home_address.model_hr_payslip
158+msgid "Pay Slip"
159+msgstr "Nómina"
160+
161+#. module: hr_payslip_validation_home_address
162+#: code:addons/hr_payslip_validation_home_address/model/hr_payroll.py:34
163+#, python-format
164+msgid "This employee does not have a home address"
165+msgstr "Este empleado no tiene una dirección particular"
166+
167
168=== added directory 'hr_payslip_validation_home_address/model'
169=== added file 'hr_payslip_validation_home_address/model/__init__.py'
170--- hr_payslip_validation_home_address/model/__init__.py 1970-01-01 00:00:00 +0000
171+++ hr_payslip_validation_home_address/model/__init__.py 2014-05-14 23:24:55 +0000
172@@ -0,0 +1,26 @@
173+# -*- encoding: utf-8 -*-
174+#
175+# Module Writen to OpenERP, Open Source Management Solution
176+#
177+# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
178+# All Rights Reserved.
179+# info Vauxoo (info@vauxoo.com)
180+#
181+# Coded by: vauxoo consultores (info@vauxoo.com)
182+#
183+#
184+# This program is free software: you can redistribute it and/or modify
185+# it under the terms of the GNU Affero General Public License as
186+# published by the Free Software Foundation, either version 3 of the
187+# License, or (at your option) any later version.
188+#
189+# This program is distributed in the hope that it will be useful,
190+# but WITHOUT ANY WARRANTY; without even the implied warranty of
191+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
192+# GNU Affero General Public License for more details.
193+#
194+# You should have received a copy of the GNU Affero General Public License
195+# along with this program. If not, see <http://www.gnu.org/licenses/>.
196+#
197+#
198+import hr_payroll
199
200=== added file 'hr_payslip_validation_home_address/model/hr_payroll.py'
201--- hr_payslip_validation_home_address/model/hr_payroll.py 1970-01-01 00:00:00 +0000
202+++ hr_payslip_validation_home_address/model/hr_payroll.py 2014-05-14 23:24:55 +0000
203@@ -0,0 +1,39 @@
204+#!/usr/bin/python
205+# -*- encoding: utf-8 -*-
206+#
207+# Module Writen to OpenERP, Open Source Management Solution
208+# Copyright (C) 2013 Vauxoo (<http://vauxoo.com>).
209+# All Rights Reserved
210+# Credits######################################################
211+# Coded by: vauxoo consultores (info@vauxoo.com)
212+#
213+# This program is free software: you can redistribute it and/or modify
214+# it under the terms of the GNU Affero General Public License as published by
215+# the Free Software Foundation, either version 3 of the License, or
216+# (at your option) any later version.
217+#
218+# This program is distributed in the hope that it will be useful,
219+# but WITHOUT ANY WARRANTY; without even the implied warranty of
220+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
221+# GNU Affero General Public License for more details.
222+#
223+# You should have received a copy of the GNU Affero General Public License
224+# along with this program. If not, see <http://www.gnu.org/licenses/>.
225+#
226+
227+from openerp.osv import osv, orm
228+from openerp.tools.translate import _
229+
230+
231+class hr_payslip(osv.Model):
232+
233+ _inherit = 'hr.payslip'
234+
235+ def hr_verify_sheet(self, cr, uid, ids, context=None):
236+ for payroll in self.browse(cr, uid, ids, context=context):
237+ if not payroll.employee_id.address_home_id:
238+ raise orm.except_orm(
239+ _('Warning'), _('This employee don´t have a home address'))
240+ return super(hr_payslip, self).hr_verify_sheet(cr, uid, ids)
241+
242+hr_payslip()