add product pro

This commit is contained in:
Ivan Office
2024-08-02 13:33:32 +08:00
parent e3e6a536aa
commit d85d28a3ce
2 changed files with 9 additions and 8 deletions

View File

@@ -23,7 +23,7 @@
{ {
'name': 'odoo17 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data,Development Enhance', 'name': 'odoo17 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data,Development Enhance',
'version': '24.07.12', 'version': '24.08.02',
'author': 'odooai.cn', 'author': 'odooai.cn',
'category': 'Extra Tools', 'category': 'Extra Tools',
'website': 'https://www.odooai.cn', 'website': 'https://www.odooai.cn',

View File

@@ -72,12 +72,13 @@ class IrModule(models.Model):
# 处理可更新字段, 不要compute会出错 # 处理可更新字段, 不要compute会出错
for mod_name in modules.get_modules(): for mod_name in modules.get_modules():
mod = known_mods_names.get(mod_name) mod = known_mods_names.get(mod_name)
installed_version = self.get_module_info(mod.name).get('version', default_version) if mod:
if installed_version and mod.latest_version and operator.gt(installed_version, mod.latest_version): installed_version = self.get_module_info(mod.name).get('version', default_version)
local_updatable = True if installed_version and mod.latest_version and operator.gt(installed_version, mod.latest_version):
else: local_updatable = True
local_updatable = False else:
if mod.local_updatable != local_updatable: local_updatable = False
mod.write({'local_updatable': local_updatable}) if mod.local_updatable != local_updatable:
mod.write({'local_updatable': local_updatable})
return res return res