[FIX] base: khmer language (Cambodia)

The code of khmer language was not the offical one. Installing it
produce an error in the Babel python library.

It's not possible to easily fix it by correcting the code km_KM to km_KH
because Odoo
prohibit changing language code. The solution to this is to remove the
Khmer language from the res_lang.csv file and add it to an xml data
file with the correct code. There, we can put on this record the
"noupdate" tag. This tag
will block any modification on the ir_model_data corresponding to the
xml_id=lang_km
and so avoid the error if we update the base module. Old database still
wont be able
to use khmer language (so we'll need to manually change it in database)
but new one created
after this commit will be able to use it without issue.
This commit is contained in:
William Henrotin
2018-03-29 08:47:21 +02:00
parent b747c3010a
commit f1e842bcd2
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -1,6 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- khmer language has the wrong code in res.lang.csv
We put the good one here to have the noupdate tag and avoid
the error (this fix will be obsolete from SaaS 11.2) -->
<record id="lang_km" model="res.lang">
<field name="name">Khmer / ភាសាខ្មែរ</field>
<field name="code">km_KH</field>
<field name="iso_code">km</field>
<field name="direction">ltr</field>
<field name="translatable">1</field>
<field name="grouping">[3,0]</field>
<field name="date_format">%d %B %y</field>
<field name="time_format">%H:%M:%S</field>
</record>
<record id="view_menu" model="ir.ui.view">
<field name="name">ir.ui.menu.tree</field>
<field name="model">ir.ui.menu</field>
+1 -1
View File
@@ -35,7 +35,7 @@ base.lang_de_CH,"German (CH) / Deutsch (CH)",de_CH,de_CH,"Left-to-Right","[3,3]"
"base.lang_it","Italian / Italiano","it_IT","it","Left-to-Right","[3,0]",",",".","%d/%m/%Y","%H:%M:%S","True"
"base.lang_ja_JP","Japanese / 日本語","ja_JP","ja","Left-to-Right","[3,0]",".",",","%Y年%m月%d日","%H時%M分%S秒","True"
"base.lang_kab_DZ","Kabyle / Taqbaylit","kab_DZ","kab","Left-to-Right","[]",".",",","%m/%d/%Y","%I:%M:%S %p","True"
"base.lang_km","Khmer / ភាសាខ្មែរ","km_KM","km","Left-to-Right","[3,0]",".",",","%d %B %Y","%H:%M:%S","True"
"base.lang_ko_KP","Korean (KP) / 한국어 (KP)","ko_KP","ko_KP","Left-to-Right","[3,0]",".",",","%m/%d/%Y","%I:%M:%S %p","True"
"base.lang_ko_KR","Korean (KR) / 한국어 (KR)","ko_KR","ko_KR","Left-to-Right","[3,0]",".",",","%Y년 %m월 %d일","%H시 %M분 %S초","True"
"base.lang_lo_LA","Lao / ພາສາລາວ","lo_LA","lo","Left-to-Right","[3,0]",".",",","%d/%m/y","%H:%M:%S","True"
1 id name code iso_code direction grouping decimal_point thousands_sep date_format time_format translatable
35 base.lang_it Italian / Italiano it_IT it Left-to-Right [3,0] , . %d/%m/%Y %H:%M:%S True
36 base.lang_ja_JP Japanese / 日本語 ja_JP ja Left-to-Right [3,0] . , %Y年%m月%d日 %H時%M分%S秒 True
37 base.lang_kab_DZ Kabyle / Taqbaylit kab_DZ kab Left-to-Right [] . , %m/%d/%Y %I:%M:%S %p True
38 base.lang_km base.lang_ko_KP Khmer / ភាសាខ្មែរ Korean (KP) / 한국어 (KP) km_KM ko_KP km ko_KP Left-to-Right [3,0] . , %d %B %Y %m/%d/%Y %H:%M:%S %I:%M:%S %p True
39 base.lang_ko_KP base.lang_ko_KR Korean (KP) / 한국어 (KP) Korean (KR) / 한국어 (KR) ko_KP ko_KR ko_KP ko_KR Left-to-Right [3,0] . , %m/%d/%Y %Y년 %m월 %d일 %I:%M:%S %p %H시 %M분 %S초 True
40 base.lang_ko_KR base.lang_lo_LA Korean (KR) / 한국어 (KR) Lao / ພາສາລາວ ko_KR lo_LA ko_KR lo Left-to-Right [3,0] . , %Y년 %m월 %d일 %d/%m/y %H시 %M분 %S초 %H:%M:%S True
41 base.lang_lo_LA base.lang_lv Lao / ພາສາລາວ Latvian / latviešu valoda lo_LA lv_LV lo lv Left-to-Right [3,0] . , ,   %d/%m/y %Y.%m.%d. %H:%M:%S True