Skip to Content
Menu
This question has been flagged

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?

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 18
5726
5
Feb 24
22101
0
Jul 18
1763
2
Jul 18
2142
0
Dec 17
3210