Javascript ODOO12如何调用客户端操作

Javascript ODOO12如何调用客户端操作,javascript,python-3.x,xml,odoo,odoo-12,Javascript,Python 3.x,Xml,Odoo,Odoo 12,我试图调用一个带有一些JS函数的客户端操作,但没有成功 我的xml: <data> <record id="some_client_action" model="ir.actions.client"> <field name="name">check action</field> <field name="tag">tag_test_name</field>

我试图调用一个带有一些JS函数的客户端操作,但没有成功

我的xml:

<data>
        <record id="some_client_action" model="ir.actions.client">
            <field name="name">check action</field>
            <field name="tag">tag_test_name</field>
        </record>

        <menuitem id="menu_test_id"
            name="Menu test"
            action="some_client_action"
            sequence="-100" groups="base.group_user"/>
    </data>

    <template id="some_template_id">
        <t t-name="SomeTemplate">
            <p>TEST</p>
        </t>
    </template>
但是,当我单击刚刚创建的新菜单时,将显示“衰减”错误:

 Uncaught TypeError: Cannot read property 'on' of undefined
http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646
Traceback:
TypeError: Cannot read property 'on' of undefined
    at http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:87
    at Function._.each._.forEach (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:12:558)
    at Class.on (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:30)
    at Class._startController (http://localhost:8069/web/content/937-e8af9cf/web.assets_backend.js:485:322)
    at http://localhost:8069/web/content/937-e8af9cf/web.assets_backend.js:463:25
    at http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:681
    at fire (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:796:299)
    at Object.add [as done] (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:797:467)
    at Array.<anonymous> (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:649)
    at Function.each (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:62
Uncaught TypeError:无法读取未定义的属性“on”
http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646
回溯:
TypeError:无法读取未定义的属性“on”
在http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:87
at功能。每个功能。每个功能(http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:12:558)
上课时(http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:30)
在课堂上(http://localhost:8069/web/content/937-e8af9cf/web.assets_backend.js:485:322)
在http://localhost:8069/web/content/937-e8af9cf/web.assets\u backend.js:463:25
在http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:681
着火(http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:796:299)
在Object.add[完成时](http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:797:467)
在阵列上。(http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:649)
在功能上,每个(http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:62
控制台显示:INIT函数

有人知道如何加载模板吗? 我正在尝试加载模板,并使用rpc从python代码中获取一些信息。我不想使用Qweb之类的工具获取这些信息,我需要使用JS

 Uncaught TypeError: Cannot read property 'on' of undefined
http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646
Traceback:
TypeError: Cannot read property 'on' of undefined
    at http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:87
    at Function._.each._.forEach (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:12:558)
    at Class.on (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:3646:30)
    at Class._startController (http://localhost:8069/web/content/937-e8af9cf/web.assets_backend.js:485:322)
    at http://localhost:8069/web/content/937-e8af9cf/web.assets_backend.js:463:25
    at http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:681
    at fire (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:796:299)
    at Object.add [as done] (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:797:467)
    at Array.<anonymous> (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:802:649)
    at Function.each (http://localhost:8069/web/content/683-24d55fb/web.assets_common.js:62