I am delevoping a module which depend on Attendances(the Technical Name is 'hr_attendance').
I want to override the JaveScript mudule 'hr_attendance.employee_kanban_view_handler' and type the code as below:
odoo.define('hr_attendance_my.employee_kanban_view_handler', function(require) {
"use strict";
var KanbanRecord = require('hr_attendance.employee_kanban_view_handler');
KanbanRecord.include({
_openRecord: function () {
if (this.modelName === 'hr.employee' && this.$el.parents('.o_hr_employee_attendance_kanban').length) {
var action = {
type: 'ir.actions.client',
name: 'Confirm',
tag: 'hr_attendance_kiosk_confirm',
employee_id: this.record.id.raw_value,
employee_name: this.record.name.raw_value,
employee_state: this.record.attendance_state.raw_value,
employee_image: this.record.image, //the insert line.
};
this.do_action(action);
} else {
this._super.apply(this, arguments);
}
}
});
});
So that, I can pass the image of the employee to the JavaScript medule 'hr_attendance.kiosk_confirm'.
However, the broswer catch a Failed modules:
["hr_attendance_my.employee_kanban_view_handler"]
So, anyone can give me something advice for this issue?
ZOOU Qinn