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č

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
mailerrortemplatesodoo18odoo19
4 Odgovori
706 Prikazi
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
Opusti
Codesphere Tech

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

Kalana Piyumantha
Avtor

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
Best Answer

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
Opusti
Avatar
Redian Software Pvt Ltd
Best Answer

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
Opusti
Avatar
Kunjan Patel
Best Answer
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
Opusti
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

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
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
Related Posts Odgovori Prikazi Aktivnost
import error occurd when migrating from v18 to v19 .ImportError: cannot import name 'decimal_precision' from 'odoo.addons' (unknown location) Solved
error import odoo18 odoo19
Avatar
Avatar
1
dec. 25
214
Error when sending email with template in Odoo 9
mail error templates template odoo9
Avatar
2
okt. 17
5223
Change User Mail Template
mail templates
Avatar
Avatar
2
maj 24
3731
odoo server error
mail error
Avatar
0
sep. 23
2185
odoo 16 saas
odoo18 odoo19
Avatar
0
jul. 23
6
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