Merge lp://staging/~savoirfairelinux-openerp/openerp-hr/unique_code into lp://staging/openerp-hr

Status: Merged
Merged at revision: 74
Proposed branch: lp://staging/~savoirfairelinux-openerp/openerp-hr/unique_code
Merge into: lp://staging/openerp-hr
Diff against target: 139 lines (+121/-0)
3 files modified
hr_department_sequence/hr_department.py (+17/-0)
hr_department_sequence/i18n/fr.po (+52/-0)
hr_department_sequence/i18n/hr_department_sequence.pot (+52/-0)
To merge this branch: bzr merge lp://staging/~savoirfairelinux-openerp/openerp-hr/unique_code
Reviewer Review Type Date Requested Status
Daniel Reis lgtm Approve
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve
HR Core Editors Pending
Review via email: mp+196184@code.staging.launchpad.net

Description of the change

Added a unique constraint for department codes per company.
Added name_search and name_get as '[CODE] Department name'
Added french locale

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (code review)
Revision history for this message
Daniel Reis (dreis-pt) wrote :

Hello Sandy,

Since you're at it, you could also add the generic .pot file, to make this translatable.

Also, I wouldn't like to have the "name_get" changes here.
I suggest that to be a separate module, so that people can choose to use it or not.
And it should implement that both on "name_get" and "name_search".

I did an implementation for that, and use it in production, doing that both for Departments and Employees. See the "hr_refcodes" ad https://code.launchpad.net/~dreis-pt/reis-openerp-addons/7.0
Arguably, it could be split in two modules.
(And you can find there also modules to display/search Customer and Contract codes).

review: Needs Fixing
68. By El Hadji Dem (http://www.savoirfairelinux.com)

[MRG] hr_skill module

69. By El Hadji Dem (http://www.savoirfairelinux.com)

[MRG] Fix the copyright and update to reflect the new fields and views

70. By El Hadji Dem (http://www.savoirfairelinux.com)

[MRG] hr_language

Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

Thank you for your review, Daniel,

The .pot file is already included, I think you missed it.

What's wrong with an optional custom name_get, it will only display the code if you explicitly say so in the context.
Is it really necessary to divide this module even further. Seems that if you use code for departments, you would want to list them as codes.

71. By Launchpad Translations on behalf of hr-core-editors

Launchpad automatic translations update.

72. By Launchpad Translations on behalf of hr-core-editors

Launchpad automatic translations update.

Revision history for this message
Daniel Reis (dreis-pt) :
review: Approve (lgtm)
73. By Sandy Carter (http://www.savoirfairelinux.com)

[MRG] Specificy on_delete='cascade' for parent_id of hr_department

74. By Sandy Carter (http://www.savoirfairelinux.com)

[MRG] Added a unique constraint for department codes per company.
Added name_search and name_get as '[CODE] Department name'
Added french locale

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.