Merge lp:~gs.clearcorp/openerp-costa-rica/l10n_cr_hr_holidays into lp:openerp-costa-rica

Proposed by Glen Sojo
Status: Merged
Merged at revision: 249
Proposed branch: lp:~gs.clearcorp/openerp-costa-rica/l10n_cr_hr_holidays
Merge into: lp:openerp-costa-rica
Diff against target: 264 lines (+222/-0)
7 files modified
l10n_cr_hr_holidays/__init__.py (+23/-0)
l10n_cr_hr_holidays/__openerp__.py (+49/-0)
l10n_cr_hr_holidays/i18n/es_CR.po (+37/-0)
l10n_cr_hr_holidays/i18n/l10n_cr_hr_holidays.po (+37/-0)
l10n_cr_hr_holidays/l10n_cr_hr_holidays.py (+39/-0)
l10n_cr_hr_holidays/l10n_cr_hr_holidays_view.xml (+20/-0)
l10n_cr_hr_holidays/leaves_per_period_scheduled_task.xml (+17/-0)
To merge this branch: bzr merge lp:~gs.clearcorp/openerp-costa-rica/l10n_cr_hr_holidays
Reviewer Review Type Date Requested Status
Ronald Rubi (community) Needs Fixing
Review via email: mp+185337@code.launchpad.net

Description of the change

[ADD] Added new Legal Leaves per Period field, Added scheduled task to be executed once every month.

To post a comment you must log in.
Revision history for this message
Ronald Rubi (rr.clearcorp) wrote :

Modify description of the module.
Add License in __openerp__.py
Create symbolic link, source: es_CR.po, target: es.po

review: Needs Fixing
250. By Glen Sojo

[FIX] Added license AGPL in __openerp__.py file and created symbolic link (source: es_CR.po, target: es.po)

251. By Glen Sojo

[FIX] Modified the module's description

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'l10n_cr_hr_holidays'
2=== added file 'l10n_cr_hr_holidays/__init__.py'
3--- l10n_cr_hr_holidays/__init__.py 1970-01-01 00:00:00 +0000
4+++ l10n_cr_hr_holidays/__init__.py 2013-09-12 20:23:06 +0000
5@@ -0,0 +1,23 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Addons modules by CLEARCORP S.A.
11+# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+import l10n_cr_hr_holidays
29\ No newline at end of file
30
31=== added file 'l10n_cr_hr_holidays/__openerp__.py'
32--- l10n_cr_hr_holidays/__openerp__.py 1970-01-01 00:00:00 +0000
33+++ l10n_cr_hr_holidays/__openerp__.py 2013-09-12 20:23:06 +0000
34@@ -0,0 +1,49 @@
35+# -*- coding: utf-8 -*-
36+##############################################################################
37+#
38+# OpenERP, Open Source Management Solution
39+# Addons modules by CLEARCORP S.A.
40+# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
41+#
42+# This program is free software: you can redistribute it and/or modify
43+# it under the terms of the GNU Affero General Public License as
44+# published by the Free Software Foundation, either version 3 of the
45+# License, or (at your option) any later version.
46+#
47+# This program is distributed in the hope that it will be useful,
48+# but WITHOUT ANY WARRANTY; without even the implied warranty of
49+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50+# GNU Affero General Public License for more details.
51+#
52+# You should have received a copy of the GNU Affero General Public License
53+# along with this program. If not, see <http://www.gnu.org/licenses/>.
54+#
55+##############################################################################
56+
57+{
58+ 'name': 'l10n_cr_hr_holidays',
59+ 'version': '1.0',
60+ 'category': 'Human Resources',
61+ "sequence": 38,
62+ 'complexity': "normal",
63+ 'description': """
64+l10n_cr_hr_holidays
65+===================
66+ *Legal leaves per period
67+ *Scheduled legal leaves calculations per period
68+""",
69+ 'author': 'CLEARCORP S.A.',
70+ 'website': 'http://www.clearcorp.co.cr',
71+ 'depends': [
72+ 'hr_holidays'
73+ ],
74+ 'data': [
75+ 'l10n_cr_hr_holidays_view.xml',
76+ 'leaves_per_period_scheduled_task.xml',
77+ ],
78+ 'installable': True,
79+ 'auto_install': False,
80+ 'license': 'AGPL-3',
81+}
82+
83+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
84\ No newline at end of file
85
86=== added directory 'l10n_cr_hr_holidays/i18n'
87=== added symlink 'l10n_cr_hr_holidays/i18n/es.po'
88=== target is u'es_CR.po'
89=== added file 'l10n_cr_hr_holidays/i18n/es_CR.po'
90--- l10n_cr_hr_holidays/i18n/es_CR.po 1970-01-01 00:00:00 +0000
91+++ l10n_cr_hr_holidays/i18n/es_CR.po 2013-09-12 20:23:06 +0000
92@@ -0,0 +1,37 @@
93+# Translation of OpenERP Server.
94+# This file contains the translation of the following modules:
95+# * l10n_cr_hr_holidays
96+#
97+msgid ""
98+msgstr ""
99+"Project-Id-Version: OpenERP Server 7.0\n"
100+"Report-Msgid-Bugs-To: \n"
101+"POT-Creation-Date: 2013-09-12 18:27+0000\n"
102+"PO-Revision-Date: 2013-09-12 18:27+0000\n"
103+"Last-Translator: <>\n"
104+"Language-Team: \n"
105+"MIME-Version: 1.0\n"
106+"Content-Type: text/plain; charset=UTF-8\n"
107+"Content-Transfer-Encoding: \n"
108+"Plural-Forms: \n"
109+
110+#. module: l10n_cr_hr_holidays
111+#: model:ir.model,name:l10n_cr_hr_holidays.model_hr_employee
112+msgid "Employee"
113+msgstr "Empleado"
114+
115+#. module: l10n_cr_hr_holidays
116+#: field:hr.employee,leaves_per_period:0
117+msgid "Legal Leaves per Period"
118+msgstr "Permisos Legales por Periodo"
119+
120+#. module: l10n_cr_hr_holidays
121+#: view:hr.employee:0
122+msgid "days"
123+msgstr "días"
124+
125+#. module: l10n_cr_hr_holidays
126+#: help:hr.employee,leaves_per_period:0
127+msgid "Total number of legal leaves to be added to this employee per period."
128+msgstr "Número total de permisos legales para ser agregados a este empleado por periodo."
129+
130
131=== added file 'l10n_cr_hr_holidays/i18n/l10n_cr_hr_holidays.po'
132--- l10n_cr_hr_holidays/i18n/l10n_cr_hr_holidays.po 1970-01-01 00:00:00 +0000
133+++ l10n_cr_hr_holidays/i18n/l10n_cr_hr_holidays.po 2013-09-12 20:23:06 +0000
134@@ -0,0 +1,37 @@
135+# Translation of OpenERP Server.
136+# This file contains the translation of the following modules:
137+# * l10n_cr_hr_holidays
138+#
139+msgid ""
140+msgstr ""
141+"Project-Id-Version: OpenERP Server 7.0\n"
142+"Report-Msgid-Bugs-To: \n"
143+"POT-Creation-Date: 2013-09-12 18:27+0000\n"
144+"PO-Revision-Date: 2013-09-12 18:27+0000\n"
145+"Last-Translator: <>\n"
146+"Language-Team: \n"
147+"MIME-Version: 1.0\n"
148+"Content-Type: text/plain; charset=UTF-8\n"
149+"Content-Transfer-Encoding: \n"
150+"Plural-Forms: \n"
151+
152+#. module: l10n_cr_hr_holidays
153+#: model:ir.model,name:l10n_cr_hr_holidays.model_hr_employee
154+msgid "Employee"
155+msgstr ""
156+
157+#. module: l10n_cr_hr_holidays
158+#: field:hr.employee,leaves_per_period:0
159+msgid "Legal Leaves per Period"
160+msgstr ""
161+
162+#. module: l10n_cr_hr_holidays
163+#: view:hr.employee:0
164+msgid "days"
165+msgstr ""
166+
167+#. module: l10n_cr_hr_holidays
168+#: help:hr.employee,leaves_per_period:0
169+msgid "Total number of legal leaves to be added to this employee per period."
170+msgstr ""
171+
172
173=== added file 'l10n_cr_hr_holidays/l10n_cr_hr_holidays.py'
174--- l10n_cr_hr_holidays/l10n_cr_hr_holidays.py 1970-01-01 00:00:00 +0000
175+++ l10n_cr_hr_holidays/l10n_cr_hr_holidays.py 2013-09-12 20:23:06 +0000
176@@ -0,0 +1,39 @@
177+# -*- coding: utf-8 -*-
178+##############################################################################
179+#
180+# OpenERP, Open Source Management Solution
181+# Addons modules by CLEARCORP S.A.
182+# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
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+from openerp.osv import osv, fields
199+
200+class hr_employee(osv.Model):
201+
202+ def add_legal_leaves_per_period(self, cr, uid, ids=[], context={}):
203+ if not ids:
204+ ids = self.search(cr, uid, [], context=context)
205+ employees = self.browse(cr, uid, ids, context=context)
206+ for employee_obj in employees:
207+ sum = employee_obj.remaining_leaves + employee_obj.leaves_per_period
208+ self.write(cr, uid, employee_obj.id, {'remaining_leaves': sum}, context=context)
209+
210+ _inherit="hr.employee"
211+
212+ _columns= {
213+ 'leaves_per_period': fields.float(string='Legal Leaves per Period',
214+ help='Total number of legal leaves to be added to this employee per period.')
215+ }
216\ No newline at end of file
217
218=== added file 'l10n_cr_hr_holidays/l10n_cr_hr_holidays_view.xml'
219--- l10n_cr_hr_holidays/l10n_cr_hr_holidays_view.xml 1970-01-01 00:00:00 +0000
220+++ l10n_cr_hr_holidays/l10n_cr_hr_holidays_view.xml 2013-09-12 20:23:06 +0000
221@@ -0,0 +1,20 @@
222+<?xml version="1.0" encoding="UTF-8"?>
223+
224+<openerp>
225+ <data>
226+ <record id="view_l10n_cr_hr_holidays_employee_form" model="ir.ui.view">
227+ <field name="name">view.l10n.cr.hr.holidays.employee.form</field>
228+ <field name="model">hr.employee</field>
229+ <field name="inherit_id" ref="hr.view_employee_form"/>
230+ <field name="priority" eval="17"/>
231+ <field name="arch" type="xml">
232+ <xpath expr="//group[@string='Leaves']/div" position="after">
233+ <label for="leaves_per_period"/>
234+ <div>
235+ <field name="leaves_per_period" class="oe_inline"/> days
236+ </div>
237+ </xpath>
238+ </field>
239+ </record>
240+ </data>
241+</openerp>
242
243=== added file 'l10n_cr_hr_holidays/leaves_per_period_scheduled_task.xml'
244--- l10n_cr_hr_holidays/leaves_per_period_scheduled_task.xml 1970-01-01 00:00:00 +0000
245+++ l10n_cr_hr_holidays/leaves_per_period_scheduled_task.xml 2013-09-12 20:23:06 +0000
246@@ -0,0 +1,17 @@
247+<?xml version="1.0" encoding="UTF-8" ?>
248+
249+<openerp>
250+ <data>
251+ <record model="ir.cron" id="cronjob_legal_leaves_per_period">
252+ <field name='name'>Add legal leaves per period</field>
253+ <field name='interval_number'>1</field>
254+ <field name='interval_type'>months</field>
255+ <field name="numbercall">-1</field>
256+ <field name="active">True</field>
257+ <field name="doall" eval="True" />
258+ <field name="model">hr.employee</field>
259+ <field name="function">add_legal_leaves_per_period</field>
260+ <field name="args">()</field>
261+ </record>
262+ </data>
263+</openerp>
264\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: