mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
init app-odoo 15 from 13
This commit is contained in:
18
app_odoo_customize/models/base_language_install.py
Normal file
18
app_odoo_customize/models/base_language_install.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# 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"
|
||||
|
||||
def lang_install(self):
|
||||
self.ensure_one()
|
||||
if self.overwrite:
|
||||
self.env.cr.execute("""
|
||||
delete from ir_translation
|
||||
where lang=%s
|
||||
""", (self.lang,))
|
||||
self.env.cr.commit()
|
||||
return super(BaseLanguageInstall, self).lang_install()
|
||||
Reference in New Issue
Block a user