This question has been flagged
1 Reply
6508 Views

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
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