This commit is contained in:
Cédric Krier committed 2011-03-28 01:34:09 +02:00
commit a94effaefb
2 files changed
+4 -13

No files matched your search

+1 -11
View File
@@ -36,17 +36,7 @@ class Country(ModelSQL, ModelView):
if 'code' in vals and vals['code']:
vals = vals.copy()
vals['code'] = vals['code'].upper()
new_id = super(Country, self).create(vals)
if 'module' in Transaction().context:
cursor = Transaction().cursor
cursor.execute('INSERT INTO ir_translation ' \
'(name, lang, type, src, res_id, value, module, fuzzy) ' \
'VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
('country.country,name', 'en_US', 'model',
vals['name'], new_id, '',
Transaction().context.get('module'),
False))
return new_id
return super(Country, self).create(vals)
def write(self, ids, vals):
if 'code' in vals and vals['code']:
+3 -2
View File
@@ -12,8 +12,9 @@ field,"country.subdivision,parent",0,Parent,Основной,0
field,"country.subdivision,rec_name",0,Name,Наименование,0
field,"country.subdivision,type",0,Type,Тип,0
help,"country.country,code",0,"The ISO country code in two chars.
You can use this field for quick search.",,0
help,"country.country,name",0,The full name of the country.,,0
You can use this field for quick search.","ISO-код страны из двух симовлов.
Вы можете использовать это поле для быстрого поиска.",0
help,"country.country,name",0,The full name of the country.,Полное название страны.,0
model,"country.country,name",0,Country,Страны мира,0
model,"country.country,name",ad,Andorra,Андорра,0
model,"country.country,name",ae,United Arab Emirates,Объединённые Арабские Эмираты,0
1 type name res_id src value fuzzy
12 field country.subdivision,rec_name 0 Name Наименование 0
13 field country.subdivision,type 0 Type Тип 0
14 help country.country,code 0 The ISO country code in two chars. You can use this field for quick search. ISO-код страны из двух симовлов. Вы можете использовать это поле для быстрого поиска. 0
15 help country.country,name 0 The full name of the country. Полное название страны. 0
16 model country.country,name 0 Country Страны мира 0
17 model country.country,name ad Andorra Андорра 0
18 model country.country,name ad ae Andorra United Arab Emirates Андорра Объединённые Арабские Эмираты 0
19 model country.country,name ae af United Arab Emirates Afghanistan Объединённые Арабские Эмираты Афганистан 0
20 model country.country,name af ag Afghanistan Antigua and Barbuda Афганистан Антигуа и Барбуда 0