تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2349 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 24
2075
2
أبريل 25
873
0
أبريل 25
1116
0
مارس 25
739
1
ديسمبر 24
1082