fix rma , add 湛江data

This commit is contained in:
ivan deng
2020-03-26 13:17:17 +08:00
parent 9659ab1f01
commit b65f613ea8
2 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@
{
'name': 'Customize odoo OEM (Boost, My Odoo)',
'version': '13.20.03.23',
'version': '13.20.03.26',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'https://www.sunpop.cn',

View File

@@ -14,8 +14,7 @@ class IrModule(models.Model):
# installed_version = fields.Char('Latest Version', compute='_get_latest_version')
# latest_version = fields.Char('Installed Version', readonly=True)
local_updatable = fields.Boolean('Local updatable', compute='_get_latest_version',
compute_sudo=True, default=False, store=True)
local_updatable = fields.Boolean('Local updatable', compute='_get_latest_version', default=False, store=True)
def module_multi_uninstall(self):
""" Perform the various steps required to uninstall a module completely
@@ -33,10 +32,11 @@ class IrModule(models.Model):
})
return action
@api.depends('name')
@api.depends('name', 'latest_version', 'state')
def _get_latest_version(self):
default_version = modules.adapt_version('1.0')
for module in self:
module.local_updatable = False
module.installed_version = self.get_module_info(module.name).get('version', default_version)
if module.installed_version and module.latest_version and operator.gt(module.installed_version, module.latest_version):
module.local_updatable = True