blob: 9031192af1240f483e47e179ec57176df7e27fef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
odoo.define('lunch.LunchKanbanRecord', function (require) {
"use strict";
/**
* This file defines the KanbanRecord for the Lunch Kanban view.
*/
var KanbanRecord = require('web.KanbanRecord');
var LunchKanbanRecord = KanbanRecord.extend({
events: _.extend({}, KanbanRecord.prototype.events, {
'click': '_onSelectRecord',
}),
//--------------------------------------------------------------------------
// Handlers
//--------------------------------------------------------------------------
/**
* Open the add product wizard
*
* @private
* @param {MouseEvent} ev Click event
*/
_onSelectRecord: function (ev) {
ev.preventDefault();
// ignore clicks on oe_kanban_action elements
if (!$(ev.target).hasClass('oe_kanban_action')) {
this.trigger_up('open_wizard', {productId: this.recordData.product_id ? this.recordData.product_id.res_id: this.recordData.id});
}
},
});
return LunchKanbanRecord;
});
|