Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Issue with Translating description_ecommerce Field in Odoo Online (Multi-Company Setup)

Subscriure's

Get notified when there's activity on this post

This question has been flagged
translationstranslationhtmltranslatableHtmlHTML
903 Vistes
Avatar
Massimiliano Gandini

Hello Odoo Community,

I’m reaching out to seek your expertise on an issue we’re encountering with translating the description_ecommerce field in a multi-company Odoo Online database. The translations for this field remain blank, and the "source" column (which usually holds the default language content) seems to be missing.

The Issue

The field description_ecommerce, which is designed to hold HTML content for products, is marked as translatable (translate=True) in the database. However, when attempting to add translations via Google API:

  • The translations don’t work; all languages except the default one show blank content.
  • The "source" column doesn’t appear, which I believe is leading to the translation issue since the default text isn’t stored properly for reference.

Steps We’ve Taken to Resolve It

Below is the relevant part of the code: 

for field, field_name in fields_to_translate.items():
    source_text = record.with_context(lang='en_US')[field_name]  # Fetch the source content in default language
    if not source_text:
        chatter_logs.append(f"FIELD: {field_name} | **Source**: [EMPTY]")
        continue

    log_line = f"FIELD: {field_name} | **Source**: {source_text}"

    for lang in languages:
        if lang.code == "en_US":  # Skip default language
            continue

        payload = {
            "q": source_text,
            "target": lang.code.split("_")[0],
            "format": "html",
            "key": api_key
        }
        response = requests.post(api_url, data=payload)

        if response.status_code == 200:
            result = response.json()
            translated_text = result.get("data", {}).get("translations", [])[0].get("translatedText", "")
            log_line += f" | **{lang.code}**: {translated_text}"
        else:
            log_line += f" | **{lang.code}**: [ERROR]"

    chatter_logs.append(log_line)
    • We tested the code thoroughly, but despite adjusting the field configuration and ensuring the field is recognized as translatable, the translations remained blank.

Additional Step

  • As a final attempt to isolate the issue, we created a new HTML field (x_studio_description_ecommerce) via Odoo Studio, set it as translatable, and updated the server action to include this field for translation.
  • However, the problem persisted with this new field as well, showing the same behavior of blank translations and no "source" column.

Request for Support

Based on the above, I’d like to ask for your guidance with the following:

  1. Why might the "source" column for the description_ecommerce field (and the new custom field) be missing?
  2. Are there any steps or configurations we might have overlooked while working with the description_ecommerce field in a multi-company setup?

Your insights would be immensely helpful in resolving this issue. Thank you for your time and expertise!

Best regards,

Max

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
HTML
qweb html name Html HTML
Avatar
Avatar
Avatar
2
d’abr. 23
3002
Thank you message to translate
translations translation
Avatar
Avatar
1
de març 21
4252
how can one translate the unsubscribe page? Solved
translations translation unsubscribe
Avatar
Avatar
1
de jul. 23
2956
Translate module - v16
translations translation odoo16features
Avatar
0
de març 23
3021
[Odoo 10] Can not export translation.
export translations translation
Avatar
Avatar
Avatar
Avatar
3
de gen. 23
6405
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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