[CLEAN] website_hr_recruitment: some cleaning in python
Moved write_date column from website_hr_recruitment to hr, because it could be usefull to have this column directly existing in the model. Other website-related columns remains in the website module. Also moved python file into a new models directory; also renamed the file. Please use correct file name instead of finding a loosely-related file name. bzr revid: tde@openerp.com-20131003121414-2xd4nab2znfabdjj
This commit is contained in:
parent
9f0b4bc8c4
commit
6e042ea147
|
@ -122,6 +122,7 @@ class hr_job(osv.osv):
|
||||||
'company_id': fields.many2one('res.company', 'Company'),
|
'company_id': fields.many2one('res.company', 'Company'),
|
||||||
'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitement in Progress')], 'Status', readonly=True, required=True,
|
'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitement in Progress')], 'Status', readonly=True, required=True,
|
||||||
help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."),
|
help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."),
|
||||||
|
'write_date': fields.datetime('Update Date', readonly=True),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.job', context=c),
|
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.job', context=c),
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
import controllers
|
import controllers
|
||||||
import recruitment
|
import models
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
import hr_job
|
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
from openerp.osv import osv, fields
|
from openerp.osv import osv, fields
|
||||||
|
|
||||||
# defined for access rules
|
|
||||||
class hr_job(osv.osv):
|
class hr_job(osv.osv):
|
||||||
|
""" Override to add website-related columns: published, description. """
|
||||||
_inherit = "hr.job"
|
_inherit = "hr.job"
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'write_date': fields.datetime('Update Date', readonly=True),
|
|
||||||
'website_published': fields.boolean('Available in the website'),
|
'website_published': fields.boolean('Available in the website'),
|
||||||
'website_description': fields.html('Description for the website'),
|
'website_description': fields.html('Description for the website'),
|
||||||
}
|
}
|
Loading…
Reference in New Issue