Help

3

Javascript issue odoo 10 error: Some modules could not be started ??

Avatar
Bodoo

i'm trying to add custom field to hr_timesheet_sheet but i'm stuck in the inheritance of the hr_timsheet_sheet using this code

odoo.define('newmodule_hr_timesheet_sheet.sheet', function (require){"use strict"; 

timesheet.WeeklyTimesheet.include({     

});

}

but i get this js error:

error: Some modules could not be started

Failed modules: Array [ "newmodule_hr_timesheet_sheet.sheet" ] Debug: Object { newmodule_hr_timesheet_sheet.sheet: Object }

is there a solution to solve this issue ??


Avatar
Discard
1 Answer
0
Avatar
Pawan
Best Answer

MouBou,

Try this:

    odoo.define('newmodule_hr_timesheet_sheet.sheet', function (require){"use strict"; 

        var core = require('web.core');

        var timesheet = core.form_custom_registry.get('weekly_timesheet');

        timesheet.include({     

             //YOUR LOGIC HERE

        });

    });


Hop it helps!

Avatar
Discard