merge
This commit is contained in:
commit
a94effaefb
2 files changed
+4
-13
No files matched your search
+1
-11
@@ -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']:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Reference in new issue
Block a user