Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Custom code: Odoo 17: Import CSV Failed to fetch (VM Local)

Naroči se

Get notified when there's activity on this post

This question has been flagged
2 Odgovori
868 Prikazi
Avatar
Diego Perona

Hello everyone,

I'm developing custom modules in Odoo 17 and am encountering a persistent issue when trying to import a CSV file into a custom model. Any help would be greatly appreciated.

Environment Context:

  • Odoo Version: Odoo 17
  • System: Odoo is installed on a Virtual Machine (VM) running Ubuntu Server 22.04.
  • Odoo Access: I access the Odoo web interface (http://localhost:8069) from the Chrome browser, which is also installed and running inside the same Virtual Machine. So, both the browser and the Odoo server are within the same VM environment.
  • Affected Modules: I'm working on a custom module (amazon_catalogs) that defines several models for storing reference data. The issue occurs when attempting to import data into any of these models.
  • Database: I'm working on the Ofituria database.

Detailed Problem Description:

When I try to import a CSV file via the Odoo interface (e.g., in Amazon Catalogs -> Supplier Mapping -> Gear icon -> Import records -> Upload file):

  1. I select the CSV file from the VM's file explorer.
  2. The file explorer closes.
  3. The Odoo screen, where it should preview the data and allow me to map columns, remains blank and unchanged, as if no file was uploaded.
  4. In the browser console (Chrome, inside the VM), the following error is displayed:
    UncaughtPromiseError > TypeError
    Uncaught Promise > Failed to fetch
    TypeError: Failed to fetch
        at Object.post (http://localhost:8069/web/assets/80df7b8/web.assets_web.min.js:2932:30)
        at FileInput.uploadFiles (http://localhost:8069/web/assets/80df7b8/web.assets_web.min.js:2520:32)
        at FileInput.onFileInputChange (http://localhost:8069/web/assets/80df7b8/web.assets_web.min.js:2522:85)
        at Object.mainEventHandler (http://localhost:8069/web/assets/80df7b8/web.assets_web.min.js:1593:77)
        at HTMLInputElement.listener (http://localhost:8069/web/assets/80df7b8/web.assets_web.min.js:748:15)
    

Troubleshooting Steps Already Taken (and Results):

  1. Odoo Server Logs Check: I've monitored the Odoo service logs (sudo journalctl -u odoo.service -f) during the import attempt. No new entries, ERRORs, or WARNINGs appear in the server logs at the time of failure. This strongly suggests the request is not even reaching the server.
  2. Simplified CSV Test: I created a very simple CSV file (just headers and one or two basic data rows, e.g., internal_supplier_code,nationality\nTEST1,ES) with UTF-8 encoding. The error persists.
  3. Incognito Mode: I tried the import in Chrome's incognito mode (within the VM), and the Failed to fetch error still occurs. This rules out browser cache or extension conflicts.

My Current Hypotheses (and Request for Help):

Given that the server doesn't register the request and the issue occurs on the browser side within the same VM, my current suspicions are:

  • Internal VM Firewall (Ubuntu - ufw): Could a local firewall (like ufw) be blocking even localhost communications on that specific port? What specific rules should I check for or apply/disable for testing? I've checked sudo ufw status but am unsure what exactly to look for.
  • VM Resource Limitations: Could the browser be running out of memory or CPU when trying to process the file or the upload request, even for a simple CSV? The VM is allocated 4GB RAM and 2 CPU cores.
  • Subtle CSV File Corruption/Access Issue: Even though a simple CSV failed, could there be a peculiarity in how the browser accesses/reads the file from the VM's filesystem that prevents it from being sent?

Any guidance or suggestions would be greatly appreciated. Thank you in advance!

0
Avatar
Opusti
Avatar
Diego Perona
Avtor Best Answer

I'm still stuck with a TypeError: Failed to fetch when trying to import CSV/Excel files into Odoo 17. Critically, both Odoo (the server) and the browser (Chrome/Firefox) are running within the same Virtual Machine (Ubuntu Server 22.04 with a graphical environment), and there are no logs on the Odoo server when the failure occurs. This indicates the request isn't even reaching the server.

I've followed all suggestions and exhausted the main lines of investigation. I'd greatly appreciate any new ideas on what else might be causing this.

What I've tried and ruled out:

  • Browser Issue:
    • Fails in Chrome (TypeError: Failed to fetch in console).
    • Fails in Firefox (fails silently, import screen doesn't advance).
    • Incognito mode/clean profiles tested on both.
    • Ruled out: The problem isn't browser-specific, nor is it extensions/cache.
  • Firewall/Internal Network Issue:
    • ufw is inactive on the VM.
    • /etc/hosts is correct (127.0.0.1 localhost).
    • Loopback (lo) interface restarted and active (127.0.0.1).
    • Odoo listens on 0.0.0.0:8069.
    • Ruled out: Not a firewall block or obvious internal network misconfiguration.
  • Odoo/Server Issue:
    • Odoo server logs (journalctl -u odoo.service -f) show no entries during the import failure.
    • limit_request_body in odoo.conf is set to 100MB.
    • Ruled out: The request isn't reaching the server; Odoo isn't directly responsible for the "fetch" failure.
  • CSV/File Location Issue:
    • Tested with an extremely simple CSV (one data row).
    • Files moved to secure local folders (~/Documents/odoo_csv) within the VM.
    • Ruled out: Not the file content or its location.
  • Graphical Environment/Chrome Launch Issue:
    • While the Missing X server or $DISPLAY error persists when trying to launch Chrome with debugging flags (--disable-web-security), the VM's general graphical environment does work (I use the browser normally from it).
    • Not fully ruled out: The influence of a graphical/permission issue on the browser's interaction with the system during upload is still a possibility, but it's not the obvious root of the "fetch" itself.

Seeking New Ideas:

Since the request dies before even leaving the browser and reaching Odoo, and we've ruled out the most common causes of Failed to fetch, I'm looking for ideas on:

  • Deeper corruption in the VM's network stack that specifically affects POST requests for file uploads from browsers to localhost.
  • Operating system-level permission issues that prevent the browser process from reading the file for upload or performing the network operation, even if standard file permissions look fine.
  • Other low-level services or configurations in Ubuntu Server that might be intercepting or corrupting these requests before they're sent.
  • Any other insights that could explain this behavior in a completely local VM environment.

Any additional perspectives or suggestions for low-level debugging would be highly valuable.

Thanks again for your time and help!

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

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

Prijavi
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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