This question has been flagged
2254 Views

I am trying to override calendar into my custom module. I called JS inside my module /module_name/static/src/js/jsfile.js

.js

openerp.autochip = function(instance) {
    instance.web_calendar.CalendarView.include({
        render_buttons: function($node) {

        }, 
    })
}

.xml

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <template id="custom_unique_planner_id" name="service advisor planner" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <!--script type="text/javascript" src="/autochip/static/src/js/form_widgets.js"></script-->
                <script type="text/javascript" src="/autochip/static/src/js/javascriptfile.js"></script>
            </xpath>
        </template>
    </data>
</openerp>

When i run this i'm getting black screen and i checked JS by clicking F12 i got below error

error: Some modules could not be started 
Failed modules: Array[1]0: "web.web_client"length: 1__proto__: Array[0]
Non loaded modules: Array[14]0: "web.ChangePassword"1: "base.apps"2: "account.reconciliation"3: "im_odoo_support.OdooSupport"4: "__job1"5: "mail.chat_client_action"6: "mail.composer"7: "mail.chat_manager"8: "mail.Chatter"9: "mail.systray"10: "mail.window_manager"11: "mail_tip.mail_tip"12: "web.planner"13: "web_settings_dashboard"length: 14__proto__: Array[0]window.odoo.log @ web.assets_common.js:2523


Also when i check the issue is coming from this line

instance.web_calendar.CalendarView.include({

What is the issue? How to resolve it?

Avatar
Discard