コンテンツへスキップ
メニュー
この質問にフラグが付けられました
6381 ビュー

I have inherited js code in my custom module, the code is below:.


odoo.define('website_custom_menu.menu_custom', function (require) {
    'use strict';
    var EditMenuDialog = require('website.contentMenu').EditMenuDialog;
    EditMenuDialog.include({
        start: function () {
            var r = this._super.apply(this, arguments);
            this.$('.oe_menu_editor').nestedSortable({
                listType: 'ul',
                handle: 'div',
                items: 'li',
                maxLevels: 3,
                toleranceElement: '> div',
                forcePlaceholderSize: true,
                opacity: 0.6,
                placeholder: 'oe_menu_placeholder',
                tolerance: 'pointer',
                attribute: 'data-menu-id',
                expression: '()(.+)', // nestedSortable takes the second match of an expression (*sigh*)
            });
            return r;
        }
    });
});


But when I run this it says failed module and after further debugging, I found the following error:

TypeError: Cannot read property 'include' of undefined


How can I solve this?

アバター
破棄
関連投稿 返信 ビュー 活動
0
8月 18
6550
5
2月 24
23924
0
7月 18
2565
2
7月 18
2949
0
12月 17
3894