Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

"Unallowed to fetch files" Error after I tried to implement a dashboard

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
2 Risposte
195 Visualizzazioni
Avatar
Tadelo Ferede
Traceback (most recent call last):
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\cache.py", line 103, in lookup
    r = d[key]
        ~^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\python\Lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\func.py", line 97, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\lru.py", line 33, in __getitem__
    a = self.d[obj]
        ~~~~~~^^^^^
KeyError: ('ir.qweb', <function IrQWeb._generate_asset_links_cache at 0x000001AD6C795BC0>, 'web.assets_frontend', True, False, (('website_id', 1),), False)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\cache.py", line 103, in lookup
    r = d[key]
        ~^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\python\Lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\func.py", line 97, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\lru.py", line 33, in __getitem__
    a = self.d[obj]
        ~~~~~~^^^^^
KeyError: ('ir.asset', <function IrAsset._get_asset_paths at 0x000001AD6C207A60>, 'web.assets_frontend', (('website_id', 1),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<1873>", line 1675, in template_1873
  File "<1873>", line 1194, in template_1873_content
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2532, in _load_values
    return get_value()
           ^^^^^^^^^^^
  File "<1873>", line 1184, in template_1873_t_cache_0_cache
  File "<1873>", line 551, in template_1873_t_cache_0
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2489, in _get_asset_nodes
    links = self._get_asset_links(bundle, css=css, js=js, debug=debug)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2504, in _get_asset_links
    return self._generate_asset_links_cache(bundle, css=css, js=js, assets_params=assets_params, rtl=rtl)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\python\Lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\cache.py", line 110, in lookup
    value = d[key] = self.method(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2558, in _generate_asset_links_cache
    return self._generate_asset_links(bundle, css, js, False, assets_params, rtl)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2634, in _generate_asset_links
    asset_bundle = self._get_asset_bundle(bundle, css=css, js=js, debug_assets=debug_assets, rtl=rtl, assets_params=assets_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2581, in _get_asset_bundle
    files, external_assets = self._get_asset_content(bundle_name, assets_params)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 2563, in _get_asset_content
    asset_paths = self.env['ir.asset']._get_asset_paths(bundle=bundle, assets_params=assets_params)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\python\Lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\cache.py", line 110, in lookup
    value = d[key] = self.method(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_asset.py", line 155, in _get_asset_paths
    self._fill_asset_paths(bundle, asset_paths, [], addons, installed, **assets_params)
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_asset.py", line 192, in _fill_asset_paths
    self._process_path(bundle, asset.directive, asset.target, asset.path, asset_paths, seen, addons, installed, bundle_start_index, **assets_params)
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_asset.py", line 212, in _process_path
    paths = self._get_paths(path_def, installed)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_asset.py", line 346, in _get_paths
    raise Exception(f"Unallowed to fetch files from addon {addon} for file {path_def}")
Exception: Unallowed to fetch files from addon website_payment for file website_payment/static/src/snippets/s_donation/000.js

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\http.py", line 1962, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\service\model.py", line 156, in retrying
    result = func()
             ^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\http.py", line 1929, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\http.py", line 2090, in dispatch
    return self.request.registry['ir.http']._dispatch(endpoint)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_http.py", line 335, in _dispatch
    result.flatten()
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\http.py", line 1389, in flatten
    self.response.append(self.render())
                         ^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\http.py", line 1381, in render
    return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\website\models\ir_ui_view.py", line 449, in _render_template
    return super()._render_template(template, values=values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_ui_view.py", line 2197, in _render_template
    return self.env['ir.qweb']._render(template, values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\tools\profiler.py", line 306, in _tracked_method_render
    return method_render(self, template, values, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo 18.0.20250305\server\odoo\addons\base\models\ir_qweb.py", line 606, in _render
    result = ''.join(rendering)
             ^^^^^^^^^^^^^^^^^^
  File "<185>", line 237, in template_185
  File "<185>", line 226, in template_185_content
  File "<184>", line 51, in template_184
  File "<184>", line 40, in template_184_content
  File "<1873>", line 1683, in template_1873
odoo.addons.base.models.ir_qweb.QWebException: Error while rendering the template
Exception: Unallowed to fetch files from addon website_payment for file website_payment/static/src/snippets/s_donation/000.js
Template: website.layout
Path: /t/html/head/t[11]
Node: <t t-call-assets="web.assets_frontend" t-js="false"/>
0
Avatar
Abbandona
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Risposta migliore

Hi,

This error occurs because Odoo 18 strictly controls which addons are allowed to contribute files to frontend asset bundles, and while rendering web.assets_frontend it detected a JavaScript file from the website_payment addon that is being loaded without proper authorization. The dashboard implementation itself is not the real issue; rather, it triggered a rebuild of the frontend assets, which exposed an incorrect or missing dependency or asset declaration. In most cases, this happens when a custom module extends website.layout, calls web.assets_frontend, or adds frontend logic without declaring website_payment as a dependency in the module’s __manifest__.py, or when a JS file from another addon is referenced directly instead of being included through the asset system. Odoo 18 blocks this to enforce addon isolation and prevent unintended asset injection. To resolve the issue, ensure that any module using website frontend templates properly depends on website and website_payment, avoid directly referencing JS files by path in XML, declare custom assets only within your own module’s asset section, and then restart Odoo and upgrade the module to clear the asset cache.


Hope it helps

0
Avatar
Abbandona
Avatar
Tadelo Ferede
Autore Risposta migliore
Thank you very much for your valuable explanation. After carefully reviewing your suggestions and further analyzing my work, I was able to resolve the issue.

The problem occurred because the Web Payment module installation was interrupted due to an error in the JavaScript file of the custom dashboard module. Since the custom dashboard installation contained incorrect JavaScript, it caused the installation process to stop before the Web Payment module could be fully installed.

As a result, the Web Payment module remained in an incomplete state, which led to the issue. I resolved this by completing the Web Payment module installation through the terminal. Once the installation was completed successfully, the issue was fully resolved.
0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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