[FIX] hr_recruitment: fix multi company issue
This fix is far from perfect as you still can break things if you clicked on the menu and change company afterwards But it should work the first time you click on it closes odoo/odoo#34488 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -631,6 +631,18 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="hr_applicant_resumes_server">
|
||||
<field name="name">hr.applicant.resumes.server</field>
|
||||
<field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
act = env.ref('hr_recruitment.hr_applicant_resumes').read()[0]
|
||||
act['domain'] = [('res_model', '=', 'hr.applicant'), '|', ('company_id', '=', False), ('company_id', '=', env.user.company_id.id)]
|
||||
action = act
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="hr_applicant_resumes">
|
||||
<field name="name">Resumes and Letters</field>
|
||||
<field name="res_model">ir.attachment</field>
|
||||
@@ -651,7 +663,7 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem name="Resumes and Letters" parent="hr_recruitment.menu_hr_recruitment_root" id="menu_crm_case_categ0_act_job02" action="hr_applicant_resumes" sequence="3"/>
|
||||
<menuitem name="Resumes and Letters" parent="hr_recruitment.menu_hr_recruitment_root" id="menu_crm_case_categ0_act_job02" action="hr_applicant_resumes_server" sequence="3"/>
|
||||
|
||||
<!-- Stage Tree View -->
|
||||
<record model="ir.ui.view" id="hr_recruitment_stage_tree">
|
||||
|
||||
Reference in New Issue
Block a user