İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Template does not exist

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
templatev15OWL
4 Cevaplar
14082 Görünümler
Avatar
jan banda

I am learning OWL. I created custom module 'owl_funn'. I want to extend Component.

I want to add template to my custom Component, but I'm getting error:

Uncaught Promise > Template owl_funn.MyComponent does not exist

My component.js looks like:

/** @odoo-module **/

const { Component } = owl;
const { whenReady } = owl.utils;

class MyComponent extends Component {
};

whenReady().then(() => {
const app = new MyComponent();
app.mount(document.body);
});

MyComponent.template = 'owl_funn.MyComponent'

comp.xml looks like:






Welcome to Odoo 2
        



__manifest__.py looks like:

{
"name": "owl_funn",
"summary": "Provides an example module for OWL.",
"description": "Provides an example module for OWL.",
"author": "Martinez",
"website": "http://www.example.com",
"category": "Tutorials",
"depends": ["base", "web"],
"demo": [],
"data": [],
"assets": {
"web.assets_qweb": [
"owl_funn/static/src/xml/comp.xml"
],
"web.assets_backend": [
"/owl_funn/static/src/js/component.js"
]
}
}

Files in __manifest__.py are ok, because when I changed names of files in __manifest__.py then I got error that those files no exists.


I don't want to write template xml inline, because I read that it is not good practice.

Why my js file don't see xml template?


0
Avatar
Vazgeç
ayoub

i have the same problem, any help ?

Avatar
África Santeliz
En İyi Yanıt

After a lot of headaches, I finally figured out that my problem is that I hadn't given my template the owl="1" attribute in the definition.

In my case the structure would be this:

template_file.xml (Note: For some reason I can't make the xml code visible, so I've removed some symbols)


xml version="1.0" encoding="UTF-8"

template xml:space="preserve"

    t t-name="module.Component" owl="1"

       //QWEB CONTENT

    /t

/template


component_file.js


/** @odoo-module **/

const { Component } = owl;

export default class ComponentModel extends Component {
    setup() {
        super.setup(...arguments);
    }
};

ComponentModel.template = 'module.Component';


Now it only remains to properly import the files using the __manifest__.py


'assets': {
    'web.assets_qweb': [
        'module/static/src/**/*.xml',
    ],
    'web.assets_backend': [
        'module/static/src/**/*.js',
    ],
}

I hope it works for you...

3
Avatar
Vazgeç
Avatar
Dharmesh Prajapati
En İyi Yanıt
import { getTemplate } from "@web/core/templates" ;
const app = new App(Js, { getTemplate,});
app.mount(target);
use this......
0
Avatar
Vazgeç
Avatar
Elodie Meunier
En İyi Yanıt

Hello, I have the same issue. Did you find a solution ? Thank you.

0
Avatar
Vazgeç
Avatar
Guillaume Deflaux
En İyi Yanıt

I am having the same issue. Any help would be much appreciated.

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
What is the correct ORM count function to use within Odoo Owl component?
v15 Dashboard OWL
Avatar
Avatar
1
Şub 24
3449
How to extend class with Owl JS in V15? Çözüldü
javascript v15 OWL
Avatar
Avatar
1
Oca 24
8954
How to load external JavaScript library asynchronously using onWillStart function in Owl?
chart v15 Dashboard OWL
Avatar
Avatar
2
Ara 23
6611
Custom Module error "@web/core/hooks" dependency missing
web dependencies v15 OWL
Avatar
0
Tem 23
122
ODOO 15 EE : export in xslx any reporting Çözüldü
report template v15 xslx
Avatar
Avatar
1
Şub 23
4605
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now