[IMP] hr_recruitment_skills: Remove Populate button on search view modif
Purpose ======= It becomes unclear what the button does once the search view doesn't filter on the related job's applications (aka the filter is removed for example) Taskid: 2884356 Part-of: odoo/odoo#93684
This commit is contained in:
@@ -26,6 +26,24 @@ odoo.define('hr.applicant.view.kanban', function (require) {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
_onSearch: async function (searchQuery) {
|
||||
this._super.apply(this, arguments);
|
||||
var activeID = this.model.get(this.handle).context.active_id;
|
||||
var jobID = undefined;
|
||||
if (searchQuery.domain && !_.isEmpty(searchQuery.domain)) {
|
||||
searchQuery.domain.forEach(elem => {
|
||||
if (elem.length === 3 && elem[0] === 'job_id') {
|
||||
jobID = elem[2];
|
||||
}
|
||||
})
|
||||
}
|
||||
if (activeID === jobID) {
|
||||
$('button.o_button_recruitment_populate').removeClass('d-none');
|
||||
} else {
|
||||
$('button.o_button_recruitment_populate').addClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</sheet>
|
||||
<footer>
|
||||
<button string="Populate" name="action_validate" type="object" class="btn-primary"/>
|
||||
<button special="cancel" string="Close" type="object" class="btn-primary"/>
|
||||
<button special="cancel" string="Close" type="object" class="btn-secondary"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user