Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
6609 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
ago. 18
6760
5
fev. 24
24249
0
jul. 18
2713
2
jul. 18
3102
0
dez. 17
4063