From 911e49d52e3cf78e283489378292cfcbecfc11c4 Mon Sep 17 00:00:00 2001 From: Chill Date: Tue, 5 Nov 2024 18:46:14 +0800 Subject: [PATCH] =?UTF-8?q?prepare=20#IB181K=20app=5Fodoo=5Fcustomize?= =?UTF-8?q?=E5=AF=B918=E7=89=88=E6=9C=AC=E5=A2=9E=E5=8A=A0=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=B1=BB=E5=9E=8B=EF=BC=8COdoo=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E3=80=82=E4=BA=86=E8=A7=A3=E4=B8=8B=E6=88=91?= =?UTF-8?q?=E4=BB=AC=E9=9C=80=E8=A6=81=E4=BC=98=E5=85=88=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=9718?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_odoo_customize/__manifest__.py | 2 +- app_odoo_customize/models/ir_module_module.py | 9 ++++++++- app_odoo_customize/views/ir_module_module_views.xml | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index 64bd54d2..2f587839 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'odoo18 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data,Development Enhance', - 'version': '24.11.04', + 'version': '24.11.05', 'author': 'odooai.cn', 'category': 'Extra Tools', 'website': 'https://www.odooai.cn', diff --git a/app_odoo_customize/models/ir_module_module.py b/app_odoo_customize/models/ir_module_module.py index 5029d324..947ec4df 100644 --- a/app_odoo_customize/models/ir_module_module.py +++ b/app_odoo_customize/models/ir_module_module.py @@ -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 diff --git a/app_odoo_customize/views/ir_module_module_views.xml b/app_odoo_customize/views/ir_module_module_views.xml index 63e35a56..d351572c 100644 --- a/app_odoo_customize/views/ir_module_module_views.xml +++ b/app_odoo_customize/views/ir_module_module_views.xml @@ -36,6 +36,9 @@ + + +