Skip to Content
Menu
This question has been flagged
1 Reply
2135 Views

I have a python module I want to add JS Functionality to it. This is how I have specified the templates:


record id="actions_oracle_client" model="ir.actions.client">
field name="name">mymodule
field name="tag">mymodule.OracleServices
field name="target">main
/record>


Removed some symbols because the xml would render in "code" block.  I also have this xml:

?xml version="1.0" encoding="UTF-8" ?>
templates xml:space="preserve">
t t-name="mymodule.OracleServices" owl="1">
div class="o_action">

/div>
/t>
/templates>


and finally the js:

/** @odoo-module */
import { registry } from "@web/core/registry";
import { Layout } from "@web/search/layout";
import { getDefaultConfig } from "@web/views/view";

import { Component, useSubEnv } from "@odoo/owl";

export class OracleServices extends Component {
setup(){
useSubEnv({
config: {
... getDefaultConfig(),
... this.env.config,
},
});
}
}

OracleServices.template = "mymodule.OracleServices";
OracleServices.components = { Layout };

registry.category("actions").add("mymodule.OracleServices", OracleServices)



So now I do wonder why do I have this error: 

UncaughtPromiseError > OwlError

Uncaught Promise > Missing template: "mymodule.OracleServices" (for component "OracleServices")

Avatar
Discard
Best Answer

Hi,

Please refer to the following link for a better understanding of creating a client action:


https://www.cybrosys.com/blog/how-to-configure-client-action-in-odoo-17


Hope this helps.

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
1900
2
Apr 25
645
0
Apr 25
955
0
Mar 25
638
1
Dec 24
948