授权 范围调整
This commit is contained in:
@@ -54,6 +54,22 @@ class HrJob(models.Model):
|
||||
{'default_job_id': self.id}
|
||||
}
|
||||
|
||||
def action_create_new_job(self):
|
||||
action = self.env.ref("hr_recruitment.hr_applicant_view_form")
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
"name": "新建",
|
||||
"res_model": "hr.applicant",
|
||||
"view_mode": "form",
|
||||
"views": [(action.id, "form")],
|
||||
"view_id": action.id,
|
||||
"target": "main",
|
||||
"context":
|
||||
{
|
||||
'default_job_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
@api.depends('no_of_employee')
|
||||
def _compute_job_personnel_ids(self):
|
||||
for rec in self:
|
||||
|
||||
@@ -137,5 +137,17 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_job_inherit_kanban" model="ir.ui.view">
|
||||
<field name="name">hr.job.inherit.kanban</field>
|
||||
<field name="model">hr.job</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.view_hr_job_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('o_recruitment_job_container')]//button" position="attributes">
|
||||
<attribute name="name">action_create_new_job</attribute>
|
||||
<attribute name="type">object</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user