summaryrefslogtreecommitdiff
path: root/indoteknik_custom/static/src/js/delivery_order.js
blob: 565610adeb26d79b3c56358761b77d6380aa1592 (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
37
38
39
40
41
42
43
44
odoo.define('indoteknik_custom.FieldChar', function (require) {
    "use strict";

    console.log('12345');
    var FieldChar = require('web.basic_fields').FieldChar;
    var registry = require('web.field_registry');

    var FieldCharCustom = FieldChar.extend({
        _onKeyup: function (ev) {
            console.log('keyuppp');
            if (ev.which === $.ui.keyCode.ENTER) {
                console.log('abc');
            }
            this._super.apply(this, arguments);
        },
    });

    registry.add('name', FieldCharCustom);

    return FieldCharCustom;

//    var core = require('web.core');
//    var _t = core._t;
//    var FormView = require('web.FormView');

//    FormView.include({
//        init: function (parent, model, renderer, params) {
//            var self = this;
//            self._super.apply(self.arguments);
//        },
//        onchange_name: function () {
//            this._super();
//            console.log('bbbb');
//            if (this.model === 'delivery.order') {
//                this.$('#name').on('keyup', function () {
//                   console.log('aaa')
//                });
//            }
//        }
//    });
//
//    core.action_registry.add('indoteknik_custom.FieldChar', FormView);
//    return FormView;
});