mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
Merge branch '13.0' of https://github.com/guohuadeng/app-odoo into 13.0
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
{
|
||||
'name': "App base chinese,中国化基本模块增强",
|
||||
'version': '13.20.02.20',
|
||||
'version': '13.20.03.19',
|
||||
'author': 'Sunpop.cn',
|
||||
'category': 'Base',
|
||||
'website': 'https://www.sunpop.cn',
|
||||
|
||||
@@ -91,4 +91,4 @@ msgstr "单号规则"
|
||||
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__short_name
|
||||
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__short_name
|
||||
msgid "Short Name"
|
||||
msgstr "缩写"
|
||||
msgstr "简称"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!--<xpath expr="//field[@name='ref']" position="move"/>-->
|
||||
<!--</xpath>-->
|
||||
<xpath expr="//field[@name='type']" position="after">
|
||||
<field name="short_name" invisible="1"/>
|
||||
<field name="short_name"/>
|
||||
</xpath>
|
||||
<!-- 信用额度 -->
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
{
|
||||
'name': 'Customize odoo OEM (Boost, My Odoo)',
|
||||
'version': '13.20.03.15',
|
||||
'version': '13.20.03.19',
|
||||
'author': 'Sunpop.cn',
|
||||
'category': 'Productivity',
|
||||
'website': 'https://www.sunpop.cn',
|
||||
|
||||
@@ -14,7 +14,8 @@ 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', default=False, store=True)
|
||||
local_updatable = fields.Boolean('Local updatable', compute='_get_latest_version',
|
||||
compute_sudo=True, default=False, store=True)
|
||||
|
||||
def module_multi_uninstall(self):
|
||||
""" Perform the various steps required to uninstall a module completely
|
||||
@@ -34,8 +35,9 @@ class IrModule(models.Model):
|
||||
|
||||
@api.depends('name')
|
||||
def _get_latest_version(self):
|
||||
super(IrModule, self)._get_latest_version()
|
||||
for rec in self:
|
||||
rec.local_updatable = False
|
||||
if rec.installed_version and rec.latest_version and operator.gt(rec.installed_version, rec.latest_version):
|
||||
rec.local_updatable = True
|
||||
default_version = modules.adapt_version('1.0')
|
||||
for module in self:
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user