Merge lp:~savoirfairelinux-openerp/openerp-hr/7.0-experience into lp:openerp-hr
- 7.0-experience
- Merge into 7.0
Status: | Rejected |
---|---|
Rejected by: | Sandy Carter (http://www.savoirfairelinux.com) |
Proposed branch: | lp:~savoirfairelinux-openerp/openerp-hr/7.0-experience |
Merge into: | lp:openerp-hr |
Diff against target: |
734 lines (+672/-0) 12 files modified
hr_experience/__init__.py (+26/-0) hr_experience/__openerp__.py (+57/-0) hr_experience/hr_academic.py (+53/-0) hr_experience/hr_academic_view.xml (+55/-0) hr_experience/hr_certification.py (+51/-0) hr_experience/hr_certification_view.xml (+55/-0) hr_experience/hr_experience.py (+56/-0) hr_experience/hr_experience_view.xml (+24/-0) hr_experience/hr_professional.py (+50/-0) hr_experience/hr_professional_view.xml (+51/-0) hr_experience/i18n/hr_experience.pot (+190/-0) hr_experience/security/ir.model.access.csv (+4/-0) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/openerp-hr/7.0-experience |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Reis | Needs Information | ||
Maxime Chambreuil (http://www.savoirfairelinux.com) | code review | Needs Fixing | |
Review via email: mp+195315@code.launchpad.net |
Commit message
Description of the change
[IMP] fix the copyright and update to reflect the new fields and views
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote : | # |
I agree with the applicant point.
Concerning the rest, I based the analysis on LinkedIn and each of Experience, Academic and Certifications share the same type of fields.
By having the same model, it is easier to import data from LinkedIn afterwards.
Daniel Reis (dreis-pt) wrote : | # |
I don't see that pushing the LinkedIn data for Experience to a table and Academic to another would be a problem. I would rather concentrate on choosing the data model that better fits the use cases in OpenERP.
From and end-user PoV, Experience, Academic and Certifications are different things.
And for an end-user, it's reasonable for Certifications to go alongside other skills: after all they are a just a special type of skill, that is independently certified.
I think a user expects to see a "Experience" field, and an "Academic" field.
Same for a resume report: you expect them to be in separate sections.
Also, the fields needed to describe "Academic" and "Experience" are quite different, so there's also no rationale there for having them on the same table.
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote : | # |
> I think a user expects to see a "Experience" field, and an "Academic" field.
We can make 3 different lists with different domains in the view and have the same table in the db.
> Same for a resume report: you expect them to be in separate sections.
They are in separate section in the report.
> Also, the fields needed to describe "Academic" and "Experience" are quite
> different, so there's also no rationale there for having them on the same
> table.
Well, in fact, they are not so different. They share a lot of common fields.
You can see this solution as the same used for Partner, Contact and Address...
Daniel Reis (dreis-pt) wrote : | # |
> We can make 3 different lists with different domains in the view and have the same table in the db.
OK, that could work.
IMHO it's more difficult to implement than separate tables, but that's just an opinion.
Experience and Academic lines/forms should propose only the relevant fields for each.
And what about Certifications?
IMO they should be stored alongside other employee skills, so that they can be equally usable to relate to Job descriptions or training courses.
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote : | # |
Please add the 3 different lists with different domains in the view
Daniel Reis (dreis-pt) : | # |
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) wrote : | # |
Do you know how to add filter or domain for one2many field ??
I try this http://
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote : | # |
Everything has been fixed. Resetting as 'Needs Review'.
Daniel Reis (dreis-pt) wrote : | # |
Hi there. I noticed that this is not the implementation Maxime suggested.
We are creating three with basically the same data fields (as Maxime predicted).
From an OO design and database normalization standpoint, this doesn't look good
I'm sorry if changing my mind causes extra work, but I can see that Maxime was right.
If the one2many with domains is too difficult to implement (?), you could try subclasses:
- create a "hr.curriculum" base class with all the common fields
- make "hr.experience", "hr.academic", "hr.certification" inherit from "hr.curriculum"
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote : | # |
Proposal moved to github
Unmerged revisions
- 72. By El Hadji Dem (http://www.savoirfairelinux.com)
-
[IMP] separate academic, professional and certfication experiences, pep8
- 71. By EL HADJI DEM <email address hidden>
-
[IMP] add hr_experience.pot file and delete fr.po
- 70. By EL HADJI DEM <email address hidden>
-
[IMP] don't need to instantiate a class in 7.0
- 69. By EL HADJI DEM <email address hidden>
-
[IMP] fix the copyright and update to reflect the new fields and views
- 68. By EL HADJI DEM <email address hidden>
-
[ADD] adds hr_experience module
Preview Diff
1 | === added directory 'hr_experience' | |||
2 | === added file 'hr_experience/__init__.py' | |||
3 | --- hr_experience/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ hr_experience/__init__.py 2013-12-18 18:14:50 +0000 | |||
5 | @@ -0,0 +1,26 @@ | |||
6 | 1 | # -*- encoding: utf-8 -*- | ||
7 | 2 | ############################################################################### | ||
8 | 3 | # | ||
9 | 4 | # OpenERP, Open Source Management Solution | ||
10 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
11 | 6 | # | ||
12 | 7 | # This program is free software: you can redistribute it and/or modify | ||
13 | 8 | # it under the terms of the GNU Affero General Public License as | ||
14 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
15 | 10 | # License, or (at your option) any later version. | ||
16 | 11 | # | ||
17 | 12 | # This program is distributed in the hope that it will be useful, | ||
18 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | 15 | # GNU Affero General Public License for more details. | ||
21 | 16 | # | ||
22 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
23 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | 19 | # | ||
25 | 20 | ############################################################################### | ||
26 | 21 | |||
27 | 22 | import hr_academic | ||
28 | 23 | import hr_professional | ||
29 | 24 | import hr_certification | ||
30 | 25 | |||
31 | 26 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
32 | 0 | 27 | ||
33 | === added file 'hr_experience/__openerp__.py' | |||
34 | --- hr_experience/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
35 | +++ hr_experience/__openerp__.py 2013-12-18 18:14:50 +0000 | |||
36 | @@ -0,0 +1,57 @@ | |||
37 | 1 | # -*- encoding: utf-8 -*- | ||
38 | 2 | ############################################################################### | ||
39 | 3 | # | ||
40 | 4 | # OpenERP, Open Source Management Solution | ||
41 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
42 | 6 | # | ||
43 | 7 | # This program is free software: you can redistribute it and/or modify | ||
44 | 8 | # it under the terms of the GNU Affero General Public License as | ||
45 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
46 | 10 | # License, or (at your option) any later version. | ||
47 | 11 | # | ||
48 | 12 | # This program is distributed in the hope that it will be useful, | ||
49 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
50 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
51 | 15 | # GNU Affero General Public License for more details. | ||
52 | 16 | # | ||
53 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
54 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
55 | 19 | # | ||
56 | 20 | ############################################################################### | ||
57 | 21 | |||
58 | 22 | { | ||
59 | 23 | "name": "Experience Management", | ||
60 | 24 | "version": "0.1", | ||
61 | 25 | "author": "Savoir-faire Linux", | ||
62 | 26 | "maintainer": 'Savoir-faire Linux', | ||
63 | 27 | "website": "http://www.savoirfairelinux.com", | ||
64 | 28 | "category": "Human Resources", | ||
65 | 29 | "description": """ | ||
66 | 30 | Experience Management | ||
67 | 31 | ===================== | ||
68 | 32 | |||
69 | 33 | This module allows you to manage your employee experiences: | ||
70 | 34 | * Professional | ||
71 | 35 | * Academic | ||
72 | 36 | * Certification | ||
73 | 37 | |||
74 | 38 | Contributors | ||
75 | 39 | ------------ | ||
76 | 40 | * El Hadji DEM (elhaji.dem@savoirfairelinux.com) | ||
77 | 41 | """, | ||
78 | 42 | |||
79 | 43 | "depends": ["hr", ], | ||
80 | 44 | 'external_dependencies': {}, | ||
81 | 45 | 'data': [ | ||
82 | 46 | "security/ir.model.access.csv", | ||
83 | 47 | "hr_experience_view.xml", | ||
84 | 48 | "hr_academic_view.xml", | ||
85 | 49 | "hr_professional_view.xml", | ||
86 | 50 | "hr_certification_view.xml", | ||
87 | 51 | ], | ||
88 | 52 | "demo": [], | ||
89 | 53 | "test": [], | ||
90 | 54 | "installable": True, | ||
91 | 55 | "active": False, | ||
92 | 56 | } | ||
93 | 57 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
94 | 0 | 58 | ||
95 | === added file 'hr_experience/hr_academic.py' | |||
96 | --- hr_experience/hr_academic.py 1970-01-01 00:00:00 +0000 | |||
97 | +++ hr_experience/hr_academic.py 2013-12-18 18:14:50 +0000 | |||
98 | @@ -0,0 +1,53 @@ | |||
99 | 1 | # -*- encoding: utf-8 -*- | ||
100 | 2 | ############################################################################### | ||
101 | 3 | # | ||
102 | 4 | # OpenERP, Open Source Management Solution | ||
103 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
104 | 6 | # | ||
105 | 7 | # This program is free software: you can redistribute it and/or modify | ||
106 | 8 | # it under the terms of the GNU Affero General Public License as | ||
107 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
108 | 10 | # License, or (at your option) any later version. | ||
109 | 11 | # | ||
110 | 12 | # This program is distributed in the hope that it will be useful, | ||
111 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
112 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
113 | 15 | # GNU Affero General Public License for more details. | ||
114 | 16 | # | ||
115 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
116 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
117 | 19 | # | ||
118 | 20 | ############################################################################### | ||
119 | 21 | |||
120 | 22 | from openerp.osv import fields, orm | ||
121 | 23 | |||
122 | 24 | |||
123 | 25 | class hr_academic(orm.Model): | ||
124 | 26 | _name = 'hr.academic' | ||
125 | 27 | _columns = { | ||
126 | 28 | 'name': fields.char('Name', size=64, required=True, translate=True), | ||
127 | 29 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), | ||
128 | 30 | 'start_date': fields.date('Start date'), | ||
129 | 31 | 'end_date': fields.date('End date'), | ||
130 | 32 | 'description': fields.text('Description', translate=True), | ||
131 | 33 | 'partner_id': fields.many2one('res.partner', 'Partner', | ||
132 | 34 | help="Employer, School, University, Certification Authority"), | ||
133 | 35 | 'location': fields.char('Location', size=64, translate=True), | ||
134 | 36 | 'diploma': fields.char('Diploma', size=64, translate=True), | ||
135 | 37 | 'study_field': fields.char('Field of study', size=64, translate=True), | ||
136 | 38 | 'activities': fields.text('Activities and associations', translate=True), | ||
137 | 39 | 'expire': fields.boolean('Expire'), | ||
138 | 40 | } | ||
139 | 41 | |||
140 | 42 | _defaults = { | ||
141 | 43 | 'expire': True, | ||
142 | 44 | } | ||
143 | 45 | |||
144 | 46 | |||
145 | 47 | class hr_employee(orm.Model): | ||
146 | 48 | _inherit = 'hr.employee' | ||
147 | 49 | _columns = { | ||
148 | 50 | 'academic_ids': fields.one2many('hr.academic', 'employee_id', 'Academic experiences'), | ||
149 | 51 | } | ||
150 | 52 | |||
151 | 53 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
152 | 0 | 54 | ||
153 | === added file 'hr_experience/hr_academic_view.xml' | |||
154 | --- hr_experience/hr_academic_view.xml 1970-01-01 00:00:00 +0000 | |||
155 | +++ hr_experience/hr_academic_view.xml 2013-12-18 18:14:50 +0000 | |||
156 | @@ -0,0 +1,55 @@ | |||
157 | 1 | <openerp> | ||
158 | 2 | <data> | ||
159 | 3 | <!-- academic tree--> | ||
160 | 4 | <record model="ir.ui.view" id="view_academic_tree"> | ||
161 | 5 | <field name="name">hr.academic.tree</field> | ||
162 | 6 | <field name="model">hr.academic</field> | ||
163 | 7 | <field name="arch" type="xml"> | ||
164 | 8 | <tree string="Academic experiences"> | ||
165 | 9 | <field name="name"/> | ||
166 | 10 | <field name="employee_id"/> | ||
167 | 11 | <field name="partner_id"/> | ||
168 | 12 | <field name="start_date"/> | ||
169 | 13 | <field name="end_date"/> | ||
170 | 14 | </tree> | ||
171 | 15 | </field> | ||
172 | 16 | </record> | ||
173 | 17 | <!-- academic form--> | ||
174 | 18 | <record model="ir.ui.view" id="view_academic_form"> | ||
175 | 19 | <field name="name">hr.academic.form</field> | ||
176 | 20 | <field name="model">hr.academic</field> | ||
177 | 21 | <field name="arch" type="xml"> | ||
178 | 22 | <form string="Academic experience"> | ||
179 | 23 | <field name="name"/> | ||
180 | 24 | <field name="employee_id"/> | ||
181 | 25 | <separator string="Dates" colspan="4"/> | ||
182 | 26 | <field name="start_date"/> | ||
183 | 27 | <field name="expire"/> | ||
184 | 28 | <field name="end_date" attrs="{'invisible':[('expire', '=', False)]}"/> | ||
185 | 29 | <separator string="Partner information" colspan="4"/> | ||
186 | 30 | <field name="partner_id"/> | ||
187 | 31 | <field name="location"/> | ||
188 | 32 | <group colspan="4"> | ||
189 | 33 | <separator string="Academic information" colspan="4"/> | ||
190 | 34 | <field name="diploma" /> | ||
191 | 35 | <field name="study_field"/> | ||
192 | 36 | <field name="activities"/> | ||
193 | 37 | </group> | ||
194 | 38 | <separator string="Description" colspan="4"/> | ||
195 | 39 | <field name="description" colspan="4" nolabel="1"/> | ||
196 | 40 | </form> | ||
197 | 41 | </field> | ||
198 | 42 | </record> | ||
199 | 43 | <!-- Menu --> | ||
200 | 44 | <record model="ir.actions.act_window" id="open_view_academic_form"> | ||
201 | 45 | <field name="res_model">hr.academic</field> | ||
202 | 46 | <field name="view_type">form</field> | ||
203 | 47 | <field name="view_mode">tree,form</field> | ||
204 | 48 | </record> | ||
205 | 49 | <menuitem name="Academic Experiences" | ||
206 | 50 | parent="hr.menu_hr_configuration" | ||
207 | 51 | id="menu_open_view_academic_form" | ||
208 | 52 | action="open_view_academic_form"/> | ||
209 | 53 | |||
210 | 54 | </data> | ||
211 | 55 | </openerp> | ||
212 | 0 | 56 | ||
213 | === added file 'hr_experience/hr_certification.py' | |||
214 | --- hr_experience/hr_certification.py 1970-01-01 00:00:00 +0000 | |||
215 | +++ hr_experience/hr_certification.py 2013-12-18 18:14:50 +0000 | |||
216 | @@ -0,0 +1,51 @@ | |||
217 | 1 | # -*- encoding: utf-8 -*- | ||
218 | 2 | ############################################################################### | ||
219 | 3 | # | ||
220 | 4 | # OpenERP, Open Source Management Solution | ||
221 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
222 | 6 | # | ||
223 | 7 | # This program is free software: you can redistribute it and/or modify | ||
224 | 8 | # it under the terms of the GNU Affero General Public License as | ||
225 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
226 | 10 | # License, or (at your option) any later version. | ||
227 | 11 | # | ||
228 | 12 | # This program is distributed in the hope that it will be useful, | ||
229 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
230 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
231 | 15 | # GNU Affero General Public License for more details. | ||
232 | 16 | # | ||
233 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
234 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
235 | 19 | # | ||
236 | 20 | ############################################################################### | ||
237 | 21 | |||
238 | 22 | from openerp.osv import fields, orm | ||
239 | 23 | |||
240 | 24 | |||
241 | 25 | class hr_certification(orm.Model): | ||
242 | 26 | _name = 'hr.certification' | ||
243 | 27 | _columns = { | ||
244 | 28 | 'name': fields.char('Name', size=64, required=True, translate=True), | ||
245 | 29 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), | ||
246 | 30 | 'start_date': fields.date('Start date'), | ||
247 | 31 | 'end_date': fields.date('End date'), | ||
248 | 32 | 'description': fields.text('Description', translate=True), | ||
249 | 33 | 'partner_id': fields.many2one('res.partner', 'Partner', | ||
250 | 34 | help="Employer, School, University, Certification Authority"), | ||
251 | 35 | 'location': fields.char('Location', size=64, translate=True), | ||
252 | 36 | 'certification': fields.char('Certification Number', size=64), | ||
253 | 37 | 'expire': fields.boolean('Expire'), | ||
254 | 38 | } | ||
255 | 39 | |||
256 | 40 | _defaults = { | ||
257 | 41 | 'expire': True, | ||
258 | 42 | } | ||
259 | 43 | |||
260 | 44 | |||
261 | 45 | class hr_employee(orm.Model): | ||
262 | 46 | _inherit = 'hr.employee' | ||
263 | 47 | _columns = { | ||
264 | 48 | 'certification_ids': fields.one2many('hr.certification', 'employee_id', 'Certifications'), | ||
265 | 49 | } | ||
266 | 50 | |||
267 | 51 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
268 | 0 | 52 | ||
269 | === added file 'hr_experience/hr_certification_view.xml' | |||
270 | --- hr_experience/hr_certification_view.xml 1970-01-01 00:00:00 +0000 | |||
271 | +++ hr_experience/hr_certification_view.xml 2013-12-18 18:14:50 +0000 | |||
272 | @@ -0,0 +1,55 @@ | |||
273 | 1 | <openerp> | ||
274 | 2 | <data> | ||
275 | 3 | <!-- certification tree --> | ||
276 | 4 | <record model="ir.ui.view" id="view_certification_tree"> | ||
277 | 5 | <field name="name">hr.certification.tree</field> | ||
278 | 6 | <field name="model">hr.certification</field> | ||
279 | 7 | <field name="type">tree</field> | ||
280 | 8 | <field name="arch" type="xml"> | ||
281 | 9 | <tree string="certifications"> | ||
282 | 10 | <field name="name"/> | ||
283 | 11 | <field name="employee_id"/> | ||
284 | 12 | <field name="partner_id"/> | ||
285 | 13 | <field name="start_date"/> | ||
286 | 14 | <field name="end_date"/> | ||
287 | 15 | </tree> | ||
288 | 16 | </field> | ||
289 | 17 | </record> | ||
290 | 18 | <!-- certification tree --> | ||
291 | 19 | <record model="ir.ui.view" id="view_certification_form"> | ||
292 | 20 | <field name="name">hr.certification.form</field> | ||
293 | 21 | <field name="model">hr.certification</field> | ||
294 | 22 | <field name="type">form</field> | ||
295 | 23 | <field name="arch" type="xml"> | ||
296 | 24 | <form string="certification"> | ||
297 | 25 | <field name="name"/> | ||
298 | 26 | <field name="employee_id"/> | ||
299 | 27 | <separator string="Dates" colspan="4"/> | ||
300 | 28 | <field name="start_date"/> | ||
301 | 29 | <field name="expire"/> | ||
302 | 30 | <field name="end_date" attrs="{'invisible':[('expire', '=', False)]}"/> | ||
303 | 31 | <separator string="Partner information" colspan="4"/> | ||
304 | 32 | <field name="partner_id"/> | ||
305 | 33 | <field name="location"/> | ||
306 | 34 | <group colspan="4"> | ||
307 | 35 | <separator string="Certification information" colspan="4"/> | ||
308 | 36 | <field name="certification"/> | ||
309 | 37 | </group> | ||
310 | 38 | <separator string="Description" colspan="4"/> | ||
311 | 39 | <field name="description" colspan="4" nolabel="1"/> | ||
312 | 40 | </form> | ||
313 | 41 | </field> | ||
314 | 42 | </record> | ||
315 | 43 | <!-- Menu --> | ||
316 | 44 | <record model="ir.actions.act_window" id="open_view_certification_form"> | ||
317 | 45 | <field name="res_model">hr.certification</field> | ||
318 | 46 | <field name="view_type">form</field> | ||
319 | 47 | <field name="view_mode">tree,form</field> | ||
320 | 48 | </record> | ||
321 | 49 | <menuitem name="Certifications" | ||
322 | 50 | parent="hr.menu_hr_configuration" | ||
323 | 51 | id="menu_open_view_certification_form" | ||
324 | 52 | action="open_view_certification_form"/> | ||
325 | 53 | |||
326 | 54 | </data> | ||
327 | 55 | </openerp> | ||
328 | 0 | 56 | ||
329 | === added file 'hr_experience/hr_experience.py' | |||
330 | --- hr_experience/hr_experience.py 1970-01-01 00:00:00 +0000 | |||
331 | +++ hr_experience/hr_experience.py 2013-12-18 18:14:50 +0000 | |||
332 | @@ -0,0 +1,56 @@ | |||
333 | 1 | # -*- encoding: utf-8 -*- | ||
334 | 2 | ############################################################################### | ||
335 | 3 | # | ||
336 | 4 | # OpenERP, Open Source Management Solution | ||
337 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
338 | 6 | # | ||
339 | 7 | # This program is free software: you can redistribute it and/or modify | ||
340 | 8 | # it under the terms of the GNU Affero General Public License as | ||
341 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
342 | 10 | # License, or (at your option) any later version. | ||
343 | 11 | # | ||
344 | 12 | # This program is distributed in the hope that it will be useful, | ||
345 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
346 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
347 | 15 | # GNU Affero General Public License for more details. | ||
348 | 16 | # | ||
349 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
350 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
351 | 19 | # | ||
352 | 20 | ############################################################################### | ||
353 | 21 | from openerp.osv import fields, orm | ||
354 | 22 | |||
355 | 23 | class hr_experience(orm.Model): | ||
356 | 24 | _name = 'hr.experience' | ||
357 | 25 | _columns = { | ||
358 | 26 | 'name': fields.char('Name', size=64, required=True, translate=True), | ||
359 | 27 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), | ||
360 | 28 | 'category': fields.selection((('professional', 'Professional'), | ||
361 | 29 | ('academic', 'Academic'), | ||
362 | 30 | ('certification', 'Certification')), | ||
363 | 31 | 'Category', required=True), | ||
364 | 32 | 'start_date': fields.date('Start date'), | ||
365 | 33 | 'end_date': fields.date('End date'), | ||
366 | 34 | 'description': fields.text('Description', translate=True), | ||
367 | 35 | 'partner_id': fields.many2one('res.partner', 'Partner', help="Employer, School, University, Certification Authority"), | ||
368 | 36 | 'location': fields.char('Location', size=64, translate=True), | ||
369 | 37 | 'diploma': fields.char('Diploma', size=64, translate=True), | ||
370 | 38 | 'study_field': fields.char('Field of study', size=64, translate=True), | ||
371 | 39 | 'result': fields.char('Result', size=64, translate=True), | ||
372 | 40 | 'activities': fields.text('Activities and associations', translate=True), | ||
373 | 41 | 'certification': fields.char('Certification Number', size=64), | ||
374 | 42 | 'expire': fields.boolean('Expire'), | ||
375 | 43 | } | ||
376 | 44 | |||
377 | 45 | _defaults = { | ||
378 | 46 | 'category': 'professional', | ||
379 | 47 | 'expire': True, | ||
380 | 48 | } | ||
381 | 49 | |||
382 | 50 | class hr_employee(orm.Model): | ||
383 | 51 | _inherit = 'hr.employee' | ||
384 | 52 | _columns = { | ||
385 | 53 | 'experience_ids': fields.one2many('hr.experience', 'employee_id', 'Experiences'), | ||
386 | 54 | } | ||
387 | 55 | |||
388 | 56 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
389 | 0 | 57 | ||
390 | === added file 'hr_experience/hr_experience_view.xml' | |||
391 | --- hr_experience/hr_experience_view.xml 1970-01-01 00:00:00 +0000 | |||
392 | +++ hr_experience/hr_experience_view.xml 2013-12-18 18:14:50 +0000 | |||
393 | @@ -0,0 +1,24 @@ | |||
394 | 1 | <openerp> | ||
395 | 2 | <data> | ||
396 | 3 | <!-- inheritEmployee --> | ||
397 | 4 | <record model="ir.ui.view" id="view_employee_form_inherit"> | ||
398 | 5 | <field name="name">hr.experience.employee.form</field> | ||
399 | 6 | <field name="model">hr.employee</field> | ||
400 | 7 | <field name="inherit_id" ref="hr.view_employee_form"/> | ||
401 | 8 | <field name="type">form</field> | ||
402 | 9 | <field name="arch" type="xml"> | ||
403 | 10 | <notebook position="inside"> | ||
404 | 11 | <page string="Academic"> | ||
405 | 12 | <field name="academic_ids"/> | ||
406 | 13 | </page> | ||
407 | 14 | <page string="Professional"> | ||
408 | 15 | <field name="professional_ids"/> | ||
409 | 16 | </page> | ||
410 | 17 | <page string="Certification"> | ||
411 | 18 | <field name="certification_ids"/> | ||
412 | 19 | </page> | ||
413 | 20 | </notebook> | ||
414 | 21 | </field> | ||
415 | 22 | </record> | ||
416 | 23 | </data> | ||
417 | 24 | </openerp> | ||
418 | 0 | 25 | ||
419 | === added file 'hr_experience/hr_professional.py' | |||
420 | --- hr_experience/hr_professional.py 1970-01-01 00:00:00 +0000 | |||
421 | +++ hr_experience/hr_professional.py 2013-12-18 18:14:50 +0000 | |||
422 | @@ -0,0 +1,50 @@ | |||
423 | 1 | # -*- encoding: utf-8 -*- | ||
424 | 2 | ############################################################################### | ||
425 | 3 | # | ||
426 | 4 | # OpenERP, Open Source Management Solution | ||
427 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
428 | 6 | # | ||
429 | 7 | # This program is free software: you can redistribute it and/or modify | ||
430 | 8 | # it under the terms of the GNU Affero General Public License as | ||
431 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
432 | 10 | # License, or (at your option) any later version. | ||
433 | 11 | # | ||
434 | 12 | # This program is distributed in the hope that it will be useful, | ||
435 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
436 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
437 | 15 | # GNU Affero General Public License for more details. | ||
438 | 16 | # | ||
439 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
440 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
441 | 19 | # | ||
442 | 20 | ############################################################################### | ||
443 | 21 | |||
444 | 22 | from openerp.osv import fields, orm | ||
445 | 23 | |||
446 | 24 | |||
447 | 25 | class hr_professional(orm.Model): | ||
448 | 26 | _name = 'hr.professional' | ||
449 | 27 | _columns = { | ||
450 | 28 | 'name': fields.char('Name', size=64, required=True, translate=True), | ||
451 | 29 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), | ||
452 | 30 | 'start_date': fields.date('Start date'), | ||
453 | 31 | 'end_date': fields.date('End date'), | ||
454 | 32 | 'description': fields.text('Description', translate=True), | ||
455 | 33 | 'partner_id': fields.many2one('res.partner', 'Partner', | ||
456 | 34 | help="Employer, School, University, Certification Authority"), | ||
457 | 35 | 'location': fields.char('Location', size=64, translate=True), | ||
458 | 36 | 'expire': fields.boolean('Expire'), | ||
459 | 37 | } | ||
460 | 38 | |||
461 | 39 | _defaults = { | ||
462 | 40 | 'expire': True, | ||
463 | 41 | } | ||
464 | 42 | |||
465 | 43 | |||
466 | 44 | class hr_employee(orm.Model): | ||
467 | 45 | _inherit = 'hr.employee' | ||
468 | 46 | _columns = { | ||
469 | 47 | 'professional_ids': fields.one2many('hr.professional', 'employee_id', ' Professional Experiences'), | ||
470 | 48 | } | ||
471 | 49 | |||
472 | 50 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
473 | 0 | 51 | ||
474 | === added file 'hr_experience/hr_professional_view.xml' | |||
475 | --- hr_experience/hr_professional_view.xml 1970-01-01 00:00:00 +0000 | |||
476 | +++ hr_experience/hr_professional_view.xml 2013-12-18 18:14:50 +0000 | |||
477 | @@ -0,0 +1,51 @@ | |||
478 | 1 | <openerp> | ||
479 | 2 | <data> | ||
480 | 3 | <!-- professional tree --> | ||
481 | 4 | <record model="ir.ui.view" id="view_professional_tree"> | ||
482 | 5 | <field name="name">hr.professional.tree</field> | ||
483 | 6 | <field name="model">hr.professional</field> | ||
484 | 7 | <field name="type">tree</field> | ||
485 | 8 | <field name="arch" type="xml"> | ||
486 | 9 | <tree string="Professional Experiences"> | ||
487 | 10 | <field name="name"/> | ||
488 | 11 | <field name="employee_id"/> | ||
489 | 12 | <field name="partner_id"/> | ||
490 | 13 | <field name="start_date"/> | ||
491 | 14 | <field name="end_date"/> | ||
492 | 15 | </tree> | ||
493 | 16 | </field> | ||
494 | 17 | </record> | ||
495 | 18 | <!-- professional form --> | ||
496 | 19 | <record model="ir.ui.view" id="view_professional_form"> | ||
497 | 20 | <field name="name">hr.professional.form</field> | ||
498 | 21 | <field name="model">hr.professional</field> | ||
499 | 22 | <field name="type">form</field> | ||
500 | 23 | <field name="arch" type="xml"> | ||
501 | 24 | <form string="Professional Experience"> | ||
502 | 25 | <field name="name"/> | ||
503 | 26 | <field name="employee_id"/> | ||
504 | 27 | <separator string="Dates" colspan="4"/> | ||
505 | 28 | <field name="start_date"/> | ||
506 | 29 | <field name="expire"/> | ||
507 | 30 | <field name="end_date" attrs="{'invisible':[('expire', '=', False)]}"/> | ||
508 | 31 | <separator string="Partner information" colspan="4"/> | ||
509 | 32 | <field name="partner_id"/> | ||
510 | 33 | <field name="location"/> | ||
511 | 34 | <separator string="Description" colspan="4"/> | ||
512 | 35 | <field name="description" colspan="4" nolabel="1"/> | ||
513 | 36 | </form> | ||
514 | 37 | </field> | ||
515 | 38 | </record> | ||
516 | 39 | <!-- Menu --> | ||
517 | 40 | <record model="ir.actions.act_window" id="open_view_professional_form"> | ||
518 | 41 | <field name="res_model">hr.professional</field> | ||
519 | 42 | <field name="view_type">form</field> | ||
520 | 43 | <field name="view_mode">tree,form</field> | ||
521 | 44 | </record> | ||
522 | 45 | <menuitem name="Professional Experiences" | ||
523 | 46 | parent="hr.menu_hr_configuration" | ||
524 | 47 | id="menu_open_view_professional_form" | ||
525 | 48 | action="open_view_professional_form"/> | ||
526 | 49 | |||
527 | 50 | </data> | ||
528 | 51 | </openerp> | ||
529 | 0 | 52 | ||
530 | === added directory 'hr_experience/i18n' | |||
531 | === added file 'hr_experience/i18n/hr_experience.pot' | |||
532 | --- hr_experience/i18n/hr_experience.pot 1970-01-01 00:00:00 +0000 | |||
533 | +++ hr_experience/i18n/hr_experience.pot 2013-12-18 18:14:50 +0000 | |||
534 | @@ -0,0 +1,190 @@ | |||
535 | 1 | # Translation of OpenERP Server. | ||
536 | 2 | # This file contains the translation of the following modules: | ||
537 | 3 | # * hr_experience | ||
538 | 4 | # | ||
539 | 5 | msgid "" | ||
540 | 6 | msgstr "" | ||
541 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
542 | 8 | "Report-Msgid-Bugs-To: \n" | ||
543 | 9 | "POT-Creation-Date: 2013-12-18 17:21+0000\n" | ||
544 | 10 | "PO-Revision-Date: 2013-12-18 12:22-0500\n" | ||
545 | 11 | "Last-Translator: \n" | ||
546 | 12 | "Language-Team: \n" | ||
547 | 13 | "MIME-Version: 1.0\n" | ||
548 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
549 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
550 | 16 | "Plural-Forms: \n" | ||
551 | 17 | "X-Generator: Poedit 1.5.4\n" | ||
552 | 18 | |||
553 | 19 | #. module: hr_experience | ||
554 | 20 | #: view:hr.certification:0 | ||
555 | 21 | msgid "certification" | ||
556 | 22 | msgstr "" | ||
557 | 23 | |||
558 | 24 | #. module: hr_experience | ||
559 | 25 | #: field:hr.certification,certification:0 | ||
560 | 26 | msgid "Certification Number" | ||
561 | 27 | msgstr "" | ||
562 | 28 | |||
563 | 29 | #. module: hr_experience | ||
564 | 30 | #: help:hr.academic,partner_id:0 help:hr.certification,partner_id:0 | ||
565 | 31 | #: help:hr.professional,partner_id:0 | ||
566 | 32 | msgid "Employer, School, University, Certification Authority" | ||
567 | 33 | msgstr "" | ||
568 | 34 | |||
569 | 35 | #. module: hr_experience | ||
570 | 36 | #: field:hr.academic,diploma:0 | ||
571 | 37 | msgid "Diploma" | ||
572 | 38 | msgstr "" | ||
573 | 39 | |||
574 | 40 | #. module: hr_experience | ||
575 | 41 | #: view:hr.academic:0 view:hr.certification:0 view:hr.professional:0 | ||
576 | 42 | msgid "Partner information" | ||
577 | 43 | msgstr "" | ||
578 | 44 | |||
579 | 45 | #. module: hr_experience | ||
580 | 46 | #: field:hr.academic,location:0 field:hr.certification,location:0 | ||
581 | 47 | #: field:hr.professional,location:0 | ||
582 | 48 | msgid "Location" | ||
583 | 49 | msgstr "" | ||
584 | 50 | |||
585 | 51 | #. module: hr_experience | ||
586 | 52 | #: field:hr.academic,employee_id:0 field:hr.certification,employee_id:0 | ||
587 | 53 | #: field:hr.professional,employee_id:0 | ||
588 | 54 | #: model:ir.model,name:hr_experience.model_hr_employee | ||
589 | 55 | msgid "Employee" | ||
590 | 56 | msgstr "" | ||
591 | 57 | |||
592 | 58 | #. module: hr_experience | ||
593 | 59 | #: field:hr.academic,start_date:0 field:hr.certification,start_date:0 | ||
594 | 60 | #: field:hr.professional,start_date:0 | ||
595 | 61 | msgid "Start date" | ||
596 | 62 | msgstr "" | ||
597 | 63 | |||
598 | 64 | #. module: hr_experience | ||
599 | 65 | #: field:hr.academic,activities:0 | ||
600 | 66 | msgid "Activities and associations" | ||
601 | 67 | msgstr "" | ||
602 | 68 | |||
603 | 69 | #. module: hr_experience | ||
604 | 70 | #: view:hr.academic:0 field:hr.academic,description:0 view:hr.certification:0 | ||
605 | 71 | #: field:hr.certification,description:0 view:hr.professional:0 | ||
606 | 72 | #: field:hr.professional,description:0 | ||
607 | 73 | msgid "Description" | ||
608 | 74 | msgstr "" | ||
609 | 75 | |||
610 | 76 | #. module: hr_experience | ||
611 | 77 | #: field:hr.academic,study_field:0 | ||
612 | 78 | msgid "Field of study" | ||
613 | 79 | msgstr "" | ||
614 | 80 | |||
615 | 81 | #. module: hr_experience | ||
616 | 82 | #: model:ir.ui.menu,name:hr_experience.menu_open_view_academic_form | ||
617 | 83 | msgid "Academic Experiences" | ||
618 | 84 | msgstr "" | ||
619 | 85 | |||
620 | 86 | #. module: hr_experience | ||
621 | 87 | #: view:hr.certification:0 | ||
622 | 88 | msgid "Certification information" | ||
623 | 89 | msgstr "" | ||
624 | 90 | |||
625 | 91 | #. module: hr_experience | ||
626 | 92 | #: field:hr.academic,expire:0 field:hr.certification,expire:0 | ||
627 | 93 | #: field:hr.professional,expire:0 | ||
628 | 94 | msgid "Expire" | ||
629 | 95 | msgstr "" | ||
630 | 96 | |||
631 | 97 | #. module: hr_experience | ||
632 | 98 | #: view:hr.professional:0 | ||
633 | 99 | msgid "Professional Experience" | ||
634 | 100 | msgstr "" | ||
635 | 101 | |||
636 | 102 | #. module: hr_experience | ||
637 | 103 | #: view:hr.academic:0 | ||
638 | 104 | msgid "Academic information" | ||
639 | 105 | msgstr "" | ||
640 | 106 | |||
641 | 107 | #. module: hr_experience | ||
642 | 108 | #: view:hr.academic:0 view:hr.certification:0 view:hr.professional:0 | ||
643 | 109 | msgid "Dates" | ||
644 | 110 | msgstr "" | ||
645 | 111 | |||
646 | 112 | #. module: hr_experience | ||
647 | 113 | #: field:hr.employee,certification_ids:0 | ||
648 | 114 | #: model:ir.ui.menu,name:hr_experience.menu_open_view_certification_form | ||
649 | 115 | msgid "Certifications" | ||
650 | 116 | msgstr "" | ||
651 | 117 | |||
652 | 118 | #. module: hr_experience | ||
653 | 119 | #: field:hr.academic,name:0 field:hr.certification,name:0 | ||
654 | 120 | #: field:hr.professional,name:0 | ||
655 | 121 | msgid "Name" | ||
656 | 122 | msgstr "" | ||
657 | 123 | |||
658 | 124 | #. module: hr_experience | ||
659 | 125 | #: view:hr.academic:0 field:hr.employee,academic_ids:0 | ||
660 | 126 | msgid "Academic experiences" | ||
661 | 127 | msgstr "" | ||
662 | 128 | |||
663 | 129 | #. module: hr_experience | ||
664 | 130 | #: field:hr.employee,professional_ids:0 | ||
665 | 131 | msgid " Professional Experiences" | ||
666 | 132 | msgstr "" | ||
667 | 133 | |||
668 | 134 | #. module: hr_experience | ||
669 | 135 | #: view:hr.employee:0 | ||
670 | 136 | msgid "Academic" | ||
671 | 137 | msgstr "" | ||
672 | 138 | |||
673 | 139 | #. module: hr_experience | ||
674 | 140 | #: view:hr.employee:0 | ||
675 | 141 | msgid "Professional" | ||
676 | 142 | msgstr "" | ||
677 | 143 | |||
678 | 144 | #. module: hr_experience | ||
679 | 145 | #: view:hr.academic:0 | ||
680 | 146 | msgid "Academic experience" | ||
681 | 147 | msgstr "" | ||
682 | 148 | |||
683 | 149 | #. module: hr_experience | ||
684 | 150 | #: model:ir.model,name:hr_experience.model_hr_professional | ||
685 | 151 | msgid "hr.professional" | ||
686 | 152 | msgstr "" | ||
687 | 153 | |||
688 | 154 | #. module: hr_experience | ||
689 | 155 | #: field:hr.academic,end_date:0 field:hr.certification,end_date:0 | ||
690 | 156 | #: field:hr.professional,end_date:0 | ||
691 | 157 | msgid "End date" | ||
692 | 158 | msgstr "" | ||
693 | 159 | |||
694 | 160 | #. module: hr_experience | ||
695 | 161 | #: model:ir.model,name:hr_experience.model_hr_academic | ||
696 | 162 | msgid "hr.academic" | ||
697 | 163 | msgstr "" | ||
698 | 164 | |||
699 | 165 | #. module: hr_experience | ||
700 | 166 | #: view:hr.certification:0 | ||
701 | 167 | msgid "certifications" | ||
702 | 168 | msgstr "" | ||
703 | 169 | |||
704 | 170 | #. module: hr_experience | ||
705 | 171 | #: view:hr.employee:0 | ||
706 | 172 | msgid "Certification" | ||
707 | 173 | msgstr "" | ||
708 | 174 | |||
709 | 175 | #. module: hr_experience | ||
710 | 176 | #: model:ir.model,name:hr_experience.model_hr_certification | ||
711 | 177 | msgid "hr.certification" | ||
712 | 178 | msgstr "" | ||
713 | 179 | |||
714 | 180 | #. module: hr_experience | ||
715 | 181 | #: field:hr.academic,partner_id:0 field:hr.certification,partner_id:0 | ||
716 | 182 | #: field:hr.professional,partner_id:0 | ||
717 | 183 | msgid "Partner" | ||
718 | 184 | msgstr "" | ||
719 | 185 | |||
720 | 186 | #. module: hr_experience | ||
721 | 187 | #: view:hr.professional:0 | ||
722 | 188 | #: model:ir.ui.menu,name:hr_experience.menu_open_view_professional_form | ||
723 | 189 | msgid "Professional Experiences" | ||
724 | 190 | msgstr "" | ||
725 | 0 | 191 | ||
726 | === added directory 'hr_experience/security' | |||
727 | === added file 'hr_experience/security/ir.model.access.csv' | |||
728 | --- hr_experience/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
729 | +++ hr_experience/security/ir.model.access.csv 2013-12-18 18:14:50 +0000 | |||
730 | @@ -0,0 +1,4 @@ | |||
731 | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | ||
732 | 2 | "access_hr_academic","hr.academic","model_hr_academic",base.group_hr_user,1,1,1,1 | ||
733 | 3 | "access_hr_professional","hr.professional","model_hr_professional",base.group_hr_user,1,1,1,1 | ||
734 | 4 | "access_hr_certification","hr.certification","model_hr_certification",base.group_hr_user,1,1,1,1 |
To fix: you're missing the i18n .pot file.
On the design choices: I certainly wouldn't mix Experience, Academic and Certifications.
Experience is mostly informative.
Academic can have reporting implications, so I might need to have Academic mandatory, but leave Experience optional.
This tips me that they should be two different fields on the employee form.
About Certification, they are more like Skills than Experience.
In fact, they are Certified Skills, and would be better off as an enhancement on the skills modules.
Another thing that makes me uneasy: this works only Employees, what about Applicants? (I know, it's not an easy question, but I suspect that here is a smart answer for it)