Skip to content

Commit 9719feb

Browse files
committed
[FIX] hr_recruitment: prevent error on changing stage of an applicant
An error occurs when a user quickly creates a template for a stage, bypassing the validation of the `Applies to` field. As a result, an error is triggered when the user selects a stage that uses that template. **Steps to reproduce:** * Install `hr_recruitment` * hr_recruitment>Configuration>Stages>stage named `New`>Quick Create a mail template with random name and save. * Applications>All Applications>New application>Set stage to `New` `KeyError:False` **Solution:** * Disable quick create as to prevent creating mail templates with empty model ids. **Sentry-6675399135** closes odoo#218921 X-original-commit: 9bcb3ef Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com> Signed-off-by: Anshik Gopalbhai Brahmbhatt (agbr) <agbr@odoo.com>
1 parent f6e9034 commit 9719feb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

addons/hr_recruitment/views/hr_recruitment_stage_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<group>
5959
<field name="name"/>
6060
<field name="sequence" groups="base.group_no_one"/>
61-
<field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]"/>
61+
<field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]" options="{'no_quick_create': True}"/>
6262
</group>
6363
<group name="stage_details">
6464
<field name="fold"/>

0 commit comments

Comments
 (0)