Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

standalone OWL application and used Odoo’s Dialog Service?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
javascriptservicedialogowlOwlError
3 Replies
2505 Tampilan
Avatar
bayuik

Has anyone ever built a standalone OWL application and used Odoo’s Dialog Service?

I'm following the official documentation here:

https://www.odoo.com/documentation/18.0/developer/howtos/standalone_owl_application.html

I've tried to keep the UI as minimal as possible and followed the code from the documentation. My root component looks more or less like the example. When I console.log(this.dialogService), the function is there. I also checked the Elements tab and confirmed that the modal-open class is injected into the <body>.

However, the modal dialog does not appear on the screen.

Has anyone encountered a similar issue or found a solution?

0
Avatar
Buang
Avatar
bayuik
Penulis Jawaban Terbai

I’m currently on Odoo 18 Community. After checking the source code (versions 15 to 18) on GitHub, I couldn’t find a component named DialogContainer.

I’ve also attempted to use DialogWrapper and Dialog, but unfortunately the dialog still doesn’t appear on screen.

Have you tested the code snippet you shared? If so, would you be willing to share a minimal working module? That would be extremely helpful.

0
Avatar
Buang
Avatar
Rufus Khalkho
Jawaban Terbai

.

0
Avatar
Buang
Avatar
D Enterprise
Jawaban Terbai

Hii,

The dialog service depends on the DialogContainer component being mounted somewhere in your root DOM. Otherwise, no dialogs will render even though the service is functional and modal-open gets injected.

Make sure your root OWL app includes the DialogContainer , like this:

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

import { DialogContainer } from "@web/core/dialog/dialog_container";


class Root extends Component {

  static template = "test_mobile.Root";


  setup() {

    this.dialogService = useService("dialog");

  }


  ShowDialog() {

    console.log("ShowDialog clicked", this.dialogService);

    this.dialogService.add(AlertDialog, {

      body: "This is a working OWL Alert Dialog!",

    });

  }

}


Root.components = { DialogContainer };


mount(Root, {

  target: document.body,

  services: {

    dialog: dialogService,

  },

});

Make sure you're importing dialogService from @web/core/dialog/dialog_service

Make Sure You Actually Render DialogContainer in Your Template
<DialogContainer/>


i hope it is usefull


0
Avatar
Buang
bayuik
Penulis

Thanks for the detailed explanation!

I’ve tried that, but it still doesn’t work. I checked the import:
import { DialogContainer } from "@web/core/dialog/dialog_container";

It seems that DialogContainer no longer exists — or at least I couldn’t find it.
Maybe you meant:
import { Dialog } from "@web/core/dialog/dialog";

If so, I’ve also tried that, but unfortunately the dialog still doesn’t show up.

I've pushed the sample code to GitHub in case you'd like to take a look or help troubleshoot:
🔗 https://github.com/bayuik/test_mobile

Really appreciate any help!

D Enterprise

Hii,
In your JS (likely root.js):
Make sure you include this:
import { mount, Component, useService } from "@odoo/owl";
import { dialogService } from "@web/core/dialog/dialog_service";
import { DialogContainer } from "@web/core/dialog/dialog_container"; // ✅ required
import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog";

export class Root extends Component {
static template = "test_mobile.Root";

setup() {
this.dialogService = useService("dialog");
}

ShowDialog() {
console.log("ShowDialog clicked", this.dialogService);
this.dialogService.add(AlertDialog, {
body: "This is a working OWL Alert Dialog!",
});
}
}

Root.components = { DialogContainer };

mount(Root, {
target: document.body,
services: {
dialog: dialogService,
},
});
In your QWeb XML (likely root.xml):
Ensure that your root template renders the DialogContainer like this:
<t t-name="test_mobile.Root">
<div>
<h1>Hello World!</h1>
<button t-on-click="ShowDialog">Show Dialog</button>

<!-- required so dialogs can be shown -->
<DialogContainer/>
</div>
</t>
If <DialogContainer/> is not included, the dialogService still works in memory, but no modal will appear.
In __manifest__.py
Make sure these files are included in your assets:
'assets': {
'web.assets_frontend': [
'test_mobile/static/src/static/*.js',
'test_mobile/static/src/static/*.xml',
],
},
Rebuild or Upgrade Your Module
try this i hope it is usefull

bayuik
Penulis

I’m currently on Odoo 18 Community. After checking the source code (versions 15 to 18) on GitHub, I couldn’t find a component named DialogContainer.

I’ve also attempted to use DialogWrapper and Dialog, but unfortunately the dialog still doesn’t appear on screen.

Have you tested the code snippet you shared? If so, would you be willing to share a minimal working module? That would be extremely helpful.

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
issue in useService("bus_Service") in owl
javascript owl odoo17 OwlError
Avatar
Avatar
2
Apr 25
3244
Problem with Odoo11
javascript service
Avatar
0
Apr 25
1030
Patching a non-exported class
javascript point_of_sale owl
Avatar
Avatar
1
Agu 25
1387
How to inherit "pay now" button click event in odoo v17
javascript qweb owl
Avatar
0
Jan 25
1778
OWL Assets (18)
javascript assets owl
Avatar
Avatar
1
Nov 24
3457
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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