[MOV-MIG] website_hr_recruitment : move some file and migrate some others ot new api
This commit is contained in:
@@ -14,8 +14,8 @@ Odoo Contact Form
|
||||
'security/website_hr_recruitment_security.xml',
|
||||
'data/config_data.xml',
|
||||
'views/hr_job_views.xml',
|
||||
'views/templates.xml',
|
||||
'views/hr_recruitment_view.xml',
|
||||
'views/website_hr_recruitment_templates.xml',
|
||||
'views/hr_recruitment_views.xml',
|
||||
],
|
||||
'demo': [
|
||||
'data/hr_job_demo.xml',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import hr_job
|
||||
import hr_recruitment_source
|
||||
import hr_recruitment
|
||||
import hr_applicant
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.osv import osv
|
||||
from odoo import models
|
||||
|
||||
class Applicant(models.Model):
|
||||
|
||||
class hr_applicant(osv.Model):
|
||||
_inherit = 'hr.applicant'
|
||||
|
||||
def website_form_input_filter(self, request, values):
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.osv import osv, fields
|
||||
from odoo import api, fields, models
|
||||
|
||||
class Job(models.Model):
|
||||
|
||||
class hr_job(osv.osv):
|
||||
_name = 'hr.job'
|
||||
_inherit = ['hr.job', 'website.seo.metadata', 'website.published.mixin']
|
||||
|
||||
def _website_url(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = super(hr_job, self)._website_url(cr, uid, ids, field_name, arg, context=context)
|
||||
for job in self.browse(cr, uid, ids, context=context):
|
||||
res[job.id] = "/jobs/detail/%s" % job.id
|
||||
return res
|
||||
website_description = fields.Html('Website description', translate=True)
|
||||
|
||||
def set_open(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'website_published': False}, context=context)
|
||||
return super(hr_job, self).set_open(cr, uid, ids, context)
|
||||
@api.multi
|
||||
def _website_url(self, field_name, arg):
|
||||
result = super(Job, self)._website_url(field_name, arg)
|
||||
for job in self:
|
||||
result[job.id] = "/jobs/detail/%s" % job.id
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
'website_description': fields.html('Website description', translate=True),
|
||||
}
|
||||
@api.multi
|
||||
def set_open(self):
|
||||
self.write({'website_published': False})
|
||||
return super(Job, self).set_open()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<odoo>
|
||||
<record id="view_hr_job_form_website_published_button" model="ir.ui.view" >
|
||||
<field name="name">hr.job.form.inherit.published.button</field>
|
||||
<field name="model">hr.job</field>
|
||||
@@ -14,5 +13,4 @@
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user