Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

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.

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
javascriptv17
4 Replies
11372 Rodiniai
Portretas
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
Portretas
Atmesti
Portretas
Riddhi
Best Answer

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
Portretas
Atmesti
Portretas
Arturo Lira
Best Answer
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
Portretas
Atmesti
Portretas
Odoo Lab
Best Answer

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
Portretas
Atmesti
Portretas
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,


Try this code :

/** @odoo-module **/   

 import ajax from "web.ajax";



Hope it helps


0
Portretas
Atmesti
Jay
Autorius

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!

Registracija
Related Posts Replies Rodiniai Veikla
Modules are needed by other modules but have not been defined / Modules could not be loaded because they have unmet dependencies
javascript v17
Portretas
Portretas
2
gruod. 24
7590
where can i find the web.core and qweb.core in Odoo17? Solved
javascript v17
Portretas
Portretas
Portretas
Portretas
3
bal. 24
7503
add a custom code when form view is loaded in odoo 17 Solved
javascript v17
Portretas
1
saus. 24
5195
UncaughtPromiseError null
javascript v17 UncaughtPromiseError
Portretas
0
bal. 25
1533
Custom button trigger in FormController?
javascript action v17
Portretas
0
gruod. 24
2369
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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