跳至内容
菜单
此问题已终结
3675 查看

I am delevoping a module which depend on Attendances(the Technical Name is 'hr_attendance').

I want to override the JaveScript module '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?

形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
1571
3
7月 25
2334
1
7月 25
1914
0
1月 25
1423
1
12月 24
1832