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