Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Odoo 17, the following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle.

Odebírat

Get notified when there's activity on this post

This question has been flagged
javascriptv17
4 Odpovědi
11428 Zobrazení
Avatar
Jay

Hello, 

I am getting this error in this javascript code yet it is working well in Odoo 16.

The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle: web.ajax

How do I go about this?
Thanks in advance.

/** @odoo-module **/

odoo.define("dynamic_access_rights.core", [], function(require) {
"use strict";

const ajax = require("web.ajax");
let dynamics = null;

function update_buttons(target_buttons){
for(let button of target_buttons){
let klas = `dynamics-${button.restriction}`
let name = button.name
let buttons1 = $(`button[name='${name}']`)
let buttons2 = $(`.${name}`)
buttons1.each(function (){
$(this).addClass(klas)
})
buttons2.each(function (){
$(this).addClass(klas)
})
}
}
function update_pages(target_pages){
for(let page of target_pages){
let klas = `dynamics-${page.restriction}`
let name = page.name
let anchors = $(`a[role='tab']`)
anchors.each(function (){
if($(this).text().toLowerCase() === name.toString().toLowerCase()){
let page_id = $(this).attr('href');
$(this).addClass(klas)
$(`${page_id}`).addClass(klas)
}
})
}
}

function refresh_rights(){
let urlString = window.location.href.split('#')[1]
const params = new URLSearchParams(urlString);
let active_model = params.get('model')
let data = dynamics[active_model]
if(data && data['buttons']){
update_buttons(data['buttons'])
}
if(data && data['pages']){
update_pages(data['pages'])
}
}

$(document).ready(function(){
ajax.jsonRpc("/fetch-dynamic-objects", "call", {},)
.then(function (data) {
console.log("data is",data)
dynamics = data;
setInterval(refresh_rights, 500)
}).catch(function (error) {
if (error) {
console.error(error)
}
});
})
})


0
Avatar
Zrušit
Avatar
Riddhi
Nejlepší odpověď

I am facing same issue with Productscreen using odoo18, please help me out.


<div class="alert alert-danger o_error_detail fw-bold m-auto">The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:<ul><li>@custom_pos/models/order_summary</li><li>web.ajax</li></ul>The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems:<ul><li>@custom_pos/models/pos_order_line</li><li>@custom_pos/app/screens/product_screen/order_summary/pos_order_summary</li></ul></div>

/** @odoo-module **/

import { registry } from "@web/core/registry";
import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen";
import PosOrderSummary from "@custom_pos/app/screens/product_screen/order_summary/order_summary";

// Extend ProductScreen and register the component
export const CustomProductScreen = {
...ProductScreen,
components: {
...ProductScreen.components,
PosOrderSummary,
},
};

registry.category("pos_screens").add("product_screen", CustomProductScreen);
0
Avatar
Zrušit
Avatar
Arturo Lira
Nejlepší odpověď
Hello.
With the new changes, you need to write your dependencies as follows:


import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen";

import { RefundButton } from "@point_of_sale/app/screens/product_screen/control_buttons/refund_button/refund_button";


and just add an empty array


odoo.define('pos_customize.ProductScreen',[], function(require) {

.

.

.

}

This worked for me, I hope it helps you.


0
Avatar
Zrušit
Avatar
Odoo Lab
Nejlepší odpověď

Based on odoo 17 doc
you can list the dependencies in array like this 

** @odoo-module **/
odoo.define("dynamic_access_rights.core", ["web.ajax"], function(require) {
"use strict";
...
}
hope it helps


0
Avatar
Zrušit
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Nejlepší odpověď

Hi,


Try this code :

/** @odoo-module **/   

 import ajax from "web.ajax";



Hope it helps


0
Avatar
Zrušit
Jay
Autor

Hi,

It shows a blank page meaning no modules are loaded at all.

Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Modules are needed by other modules but have not been defined / Modules could not be loaded because they have unmet dependencies
javascript v17
Avatar
Avatar
2
pro 24
7647
where can i find the web.core and qweb.core in Odoo17? Vyřešeno
javascript v17
Avatar
Avatar
Avatar
Avatar
3
dub 24
7554
add a custom code when form view is loaded in odoo 17 Vyřešeno
javascript v17
Avatar
1
led 24
5225
UncaughtPromiseError null
javascript v17 UncaughtPromiseError
Avatar
0
dub 25
1550
Custom button trigger in FormController?
javascript action v17
Avatar
0
pro 24
2385
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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