Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
mailerrortemplatesodoo18odoo19
4 Răspunsuri
703 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Codesphere Tech

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

Kalana Piyumantha
Autor

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

Imagine profil
Ramiz Belim
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Redian Software Pvt Ltd
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Kunjan Patel
Cel mai bun răspuns
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
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

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
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
import error occurd when migrating from v18 to v19 .ImportError: cannot import name 'decimal_precision' from 'odoo.addons' (unknown location) Rezolvat
error import odoo18 odoo19
Imagine profil
Imagine profil
1
dec. 25
214
Error when sending email with template in Odoo 9
mail error templates template odoo9
Imagine profil
2
oct. 17
5223
Change User Mail Template
mail templates
Imagine profil
Imagine profil
2
mai 24
3731
odoo server error
mail error
Imagine profil
0
sept. 23
2185
odoo 16 saas
odoo18 odoo19
Imagine profil
0
iul. 23
6
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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