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

This commit is contained in:
Chill
2024-11-06 14:07:23 +08:00
parent bd2e90e6d9
commit c067c819fa
4 changed files with 55 additions and 0 deletions

View File

@@ -96,3 +96,10 @@ class IrModuleModule(models.Model):
if author in ['odooai.cn', 'sunpop.cn', 'odooapp.cn']:
self.module_type = 'odooapp.cn'
return res
def web_read(self, specification):
fields = list(specification.keys())
module_type = self.env.context.get('module_type', 'official')
if module_type == 'odooapp.cn':
self.env.context = {**self.env.context, "module_type": 'official'}
return super().web_read(specification)