prepare #IB181K app_odoo_customize对18版本增加模块类型,Odoo中文应用。了解下我们需要优先升级的模块18

This commit is contained in:
Chill
2024-11-05 18:46:14 +08:00
parent 0544991f29
commit 911e49d52e
3 changed files with 12 additions and 2 deletions

View File

@@ -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