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

Language Code Error In odoo19 , when Migrate a module from version 18 to Version 19

Iscriviti

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

La domanda è stata contrassegnata
mailerrortemplatesodoo18odoo19
4 Risposte
705 Visualizzazioni
Avatar
Kalana Piyumantha

Invalid language code: ${object.employee_id.partner_id.lang}, 

 How Can i Solve this I tried this way also, 

<field name="lang">{{object.employee_id.partner_id.lang}}</field>
odoo.tools.convert.ParseError: while parsing file:/e:/odoo19e/custom/payroll-custom/vkd_employee_resignation/data/mail_templates.xml:3

Oops! We couldn't save your template due to an issue with this value: {{object.employee_id.partner_id.lang}}. Correct it and try again.

But there is a error too, Can Someone Help me to solve this??

0
Avatar
Abbandona
Codesphere Tech

Hello,
Is the partner_id is custom field in Employee model?

Kalana Piyumantha
Autore

Any other Solution? I think this is not a Practical one, Because as a good practice we cannot change the core modules, only our custom modules, 

Are there any simply Soltions to this??

<field name="lang">{{object.employee_id.partner_id.lang}}</field>
Kunjan Patel

Hello,
I have edited the answer.
I hope this helps.

Codesphere Tech

Is this custom field "partner_id"? Please reply this

Avatar
Ramiz Belim
Risposta migliore

Hello,
The error occurs because partner_id.lang is not always considered a valid language code at the mail template rendering stage, and sometimes Odoo validation fails when accessing nested fields this way inside <field name="lang">.

Instead, you should directly use the employee language field, which is already validated by Odoo. This approach is also used in Odoo Enterprise:

<field name="lang">{{ object.employee_id.lang }}</field>


0
Avatar
Abbandona
Avatar
Redian Software Pvt Ltd
Risposta migliore

In Odoo 19, language codes must follow the strict ISO format ll_CC.

If your module from Odoo 18 includes old or custom codes like en_UK, en_in, fr_BE@euro, or any non-standard code, Odoo 19 will raise a Language Code Error.

Fix:

  • Update all language codes in XML, demo data, and PO files to valid formats (e.g., en_GB, en_US, sw_KE, hi_IN).

  • Rename PO translation files accordingly.

  • Remove or clean invalid res.lang entries.

Once all codes follow xx_YY format, the module will install correctly in Odoo 19.

0
Avatar
Abbandona
Avatar
Kunjan Patel
Risposta migliore
Hello Kalana Piyumantha,
I hope you are doing well

Simple Fix for Dynamic Lang in Odoo 19
1. Best Solution: Use partner_to field - Odoo auto-detects lang from partner
  <field name="partner_to">{{object.employee_id.partner_id.id}}</field>
2. Or: Remove/leave lang field empty in your custom module override
  <field name="lang"></field>

I hope this information helps you 

Thanks & Regards,
Kunjan Patel
0
Avatar
Abbandona
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Risposta migliore

Hi,

That error usually means that the language data for your database (in res.lang) doesn’t match what v19 expects — Odoo prohibits changing language codes on upgrade via res.lang.csv, so the import fails. 

To solve this:

  • Don’t attempt to modify existing language codes when migrating. Keep the original code values in res.lang.

  • If you need a new language, add it after the upgrade via Settings → Languages.

  • If the module provides custom translations, ensure their .po / .csv files use valid, consistent language codes recognized by Odoo.

Hope it helps.

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
Post correlati Risposte Visualizzazioni Attività
import error occurd when migrating from v18 to v19 .ImportError: cannot import name 'decimal_precision' from 'odoo.addons' (unknown location) Risolto
error import odoo18 odoo19
Avatar
Avatar
1
dic 25
214
Error when sending email with template in Odoo 9
mail error templates template odoo9
Avatar
2
ott 17
5223
Change User Mail Template
mail templates
Avatar
Avatar
2
mag 24
3731
odoo server error
mail error
Avatar
0
set 23
2185
odoo 16 saas
odoo18 odoo19
Avatar
0
lug 23
6
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