mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
prepare #IB181K app_odoo_customize对18版本增加模块类型,Odoo中文应用。了解下我们需要优先升级的模块18
This commit is contained in:
@@ -20,6 +20,7 @@ class IrModuleModule(models.Model):
|
||||
addons_path_id = fields.Many2one('ir.module.addons.path', string='Addons Path ID', readonly=True)
|
||||
addons_path = fields.Char(string='Addons Path', related='addons_path_id.path', readonly=True)
|
||||
license = fields.Char(readonly=True)
|
||||
module_type = fields.Selection(selection_add=[('odooapp.cn', 'Odoo中文应用')])
|
||||
|
||||
def module_multi_uninstall(self):
|
||||
""" Perform the various steps required to uninstall a module completely
|
||||
@@ -87,5 +88,11 @@ class IrModuleModule(models.Model):
|
||||
local_updatable = False
|
||||
if mod.local_updatable != local_updatable:
|
||||
mod.write({'local_updatable': local_updatable})
|
||||
|
||||
return res
|
||||
|
||||
def _update_from_terp(self, terp):
|
||||
res = super()._update_from_terp(terp)
|
||||
author = terp.get('author')
|
||||
if author in ['odooai.cn', 'sunpop.cn', 'odooapp.cn']:
|
||||
self.module_type = 'odooapp.cn'
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user