İç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

Problem including JS asset in v18

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
v18
2 Cevaplar
7937 Görünümler
Avatar
Lele Gaifax

I'm porting an addon I wrote for Odoo17 to v18, and it's going well. 

One issue I'm still unable to figure out is related to the inclusion of a pretty simple JS asset, marked with @odoo-module​: while it works as expected un v17, with v18 I get an odoo.define is not a function​ error in the browser. The reason is that in the latter case it is emitted at the very beginning of web.assets_web.min.js​, before the module_loader.js​ library that defines that function.

In both environments I declared it in the web.assets_backend​ slot of the assets​ entry of the top-level __manifest__.py​ of the addon:

'assets': {'web.assets_backend': ['my_addon/static/src/snippet.js']}


I have read several different addons in the standard community edition source, but could not spot a way to influence the inclusion order, that AFAICT when written that way it should be appended to the bundle...

What am I missing?

Thanks in advance for any hint!

0
Avatar
Vazgeç
Avatar
Radji Mubarak
En İyi Yanıt

I my case the js file is nont being loaded for some reason and I am trying to extend the POS component even though the file is correctly loaded:

'assets': {
'web.assets_backend': [
'my_module_name/static/src/js/cash_move_popup_patch.js',
],
'point_of_sale.assets': [
'my_module_name/static/src/js/cash_move_popup_extend.js',
],
},

Here is the file itself:

/** @odoo-module **/
console.log("Patch file loaded")
import { patch } from "@web/core/utils/patch";
import { CashMovePopup } from "@point_of_sale/app/navbar/cash_move_popup/cash_move_popup";

patch(CashMovePopup.prototype, 'custom_cash_move_popup_patch', {
setup() {
console.log("Custom Patch: CashMovePopup has been called.");
// Prevent the original setup method from executing
},
});

The console logs are not showing

1
Avatar
Vazgeç
Vertec LLC

@Radji Mubarak were you able to resolve this issue? I'm having the exact same problem, nothing seems to be executing in my module either. It's like it's completely missing.

Radji Mubarak

Hello everyon i was able to resolve it
'assets': {
'point_of_sale._assets_pos': [
'my_module_name/static/src/js/cash_move_popup_extend.js',
],
},

The magic was in the *_pos*

Vertec LLC

@Radji, I'm trying to solve a very similar issue with web_editor. I'm doing this:
'assets': {
'web_editor.assets_wysiwyg': [
'web_editor_extensions/static/src/js/wysiwyg.js',
],
},

and also tried this:
'assets': {
'web_editor.backend_assets_wysiwyg': [
'web_editor_extensions/static/src/js/wysiwyg.js',
],
},

And even this:

'assets': {
'web_editor.assets_wysiwyg': [
'web_editor_extensions/static/NOT_A_FOLDER/src/js/wysiwyg.js',
],
},

And I'm not even getting any errors with installing the module. I've tried restarting Odoo on odoo.sh, dropping the staging branch, reinstalling, upgrading, and regenerating the assets. I'm really stumped on this.

Avatar
Lele Gaifax
Üretici En İyi Yanıt

For what is worth, I think the issue was related to some kind of cache somewhere: restarting from a clean checkout of the development environment on a different machine did not exhibit the problem, and thus, after spending some time to cleanup whatever seemd like a cache in the original environment, I eventually got it working there too.

Sorry for the noise and thanks for reading.

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
Is it possible to sell on credit directly at the point of sale and leave the order pending payment?
v18
Avatar
Avatar
2
Eyl 25
683
How to segrigate a product into multiple products & at the same time i have to manufacture that product also with separate BOM? Çözüldü
v18
Avatar
Avatar
1
Haz 25
1837
Turkey live currency rates from TCMB
v18
Avatar
Avatar
Avatar
3
Mar 25
2957
Where is the PDF Partner Ledger QWeb Report and View in Odoo Online?
v18
Avatar
Avatar
1
Şub 25
3001
Vendor Bills don't lookup Vendor Pricelists Çözüldü
v18
Avatar
Avatar
1
May 25
1989
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