Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

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

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
mailerrortemplatesodoo18odoo19
4 Replies
707 Tampilan
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
Buang
Codesphere Tech

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

Kalana Piyumantha
Penulis

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
Jawaban Terbai

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
Buang
Avatar
Redian Software Pvt Ltd
Jawaban Terbai

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
Buang
Avatar
Kunjan Patel
Jawaban Terbai
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
Buang
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai

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
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
import error occurd when migrating from v18 to v19 .ImportError: cannot import name 'decimal_precision' from 'odoo.addons' (unknown location) Diselesaikan
error import odoo18 odoo19
Avatar
Avatar
1
Des 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
Mei 24
3731
odoo server error
mail error
Avatar
0
Sep 23
2185
odoo 16 saas
odoo18 odoo19
Avatar
0
Jul 23
6
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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