add translatetion fix
This commit is contained in:
ivan deng
2017-12-02 05:56:35 +08:00
parent 4c3faf59a6
commit cc74ec9a92
6 changed files with 31 additions and 3 deletions

View File

@@ -2,3 +2,4 @@
import ir_ui_view
import app_theme_config_settings
import base_language_install

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Jarvis (www.odoomod.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models, _
class BaseLanguageInstall(models.TransientModel):
_inherit = "base.language.install"
@api.multi
def lang_install(self):
self.ensure_one()
self.env.cr.execute("""
delete from ir_translation
where (name='ir.module.module,shortdesc'
or name='ir.module.module,description'
or name='ir.module.module,summary')
and lang=%s
""", (self.lang,))
return super(BaseLanguageInstall, self).lang_install()