添加功能

This commit is contained in:
zhouzhou
2024-09-26 09:08:01 +08:00
parent a483ba0d39
commit c766dba734
2 changed files with 77 additions and 0 deletions
@@ -0,0 +1,21 @@
from odoo import api, fields, models, _
class YuthonJobPostings(models.Model):
_name = 'yuthon.job.postings'
_description = '招聘信息'
name = fields.Char(string="工作岗位", required=True)
user_id = fields.Many2one('res.users', string="申报员", default=lambda self: self.env.user)
date_of_filing = fields.Date(string="申报日期")
reason_recruitment = fields.Char(string="招聘事由")
ideal_date = fields.Date(string="希望到岗日期")
recruit_start_date = fields.Date(string="招聘开始日期")
recruit_end_date = fields.Date(string="招聘截止日期")
recruit_over_date = fields.Date(string="招聘结束日期")
recruit_priority = fields.Selection([('high', '高'), ('middle', '中'), ('low', '低')], string="招聘优先级")
place_work = fields.Char(string="工作地点")
is_referral = fields.Boolean(string="允许员工推荐")
job_description = fields.Text(string="招聘情况说明")
publish_applicant_ids = fields.Many2many('publish.applicant.setting', string="招聘发布途径")
function = fields.Text(string="岗位职责")
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_yuthon_job_postings_tree" model="ir.ui.view">
<field name="name">yuthon.job.postings.tree</field>
<field name="model">yuthon.job.postings</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
</tree>
</field>
</record>
<record id="view_yuthon_job_postings_form" model="ir.ui.view">
<field name="name">yuthon.job.postings.form</field>
<field name="model">yuthon.job.postings</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="col-12 text-center">
<h1>
<field name="name" required="1"/>
</h1>
</div>
<group col="4">
<group>
<field name="user_id" required="1" string="申报员"/>
<field name="recruit_start_date"/>
</group>
<group>
<field name="date_of_filing"/>
<field name="recruit_end_date"/>
</group>
<group>
<field name="reason_recruitment"/>
<field name="recruit_over_date"/>
<field name="place_work"/>
</group>
<group>
<field name="ideal_date"/>
<field name="recruit_priority"/>
<field name="is_referral"/>
</group>
</group>
<group>
<field name="job_description"/>
<field name="publish_applicant_ids" widget="many2many_tags"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="yuthon_job_postings_action" model="ir.actions.act_window">
<field name="name">招聘信息</field>
<field name="res_model">yuthon.job.postings</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>