mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update odoo customize
This commit is contained in:
@@ -36,8 +36,9 @@ class IrModule(models.Model):
|
||||
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
|
||||
else:
|
||||
module.local_updatable = False
|
||||
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
<field name="inherit_id" ref="base.module_view_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<!--点击模块看详情-->
|
||||
<xpath expr="//div[@class='oe_module_vignette']" position="attributes" groups="app_odoo_customize.group_show_quick_upgrade">
|
||||
<xpath expr="//div[hasclass('oe_module_vignette')]" position="attributes" groups="app_odoo_customize.group_show_quick_upgrade">
|
||||
<attribute name="class">oe_module_vignette oe_kanban_global_click</attribute>
|
||||
</xpath>
|
||||
<!--让模块名更显眼-->
|
||||
<xpath expr="//div[@class='oe_module_desc']//code" position="replace"/>
|
||||
<xpath expr="//div[@class='oe_module_desc']//h4" position="after">
|
||||
<xpath expr="//div[hasclass('oe_module_desc')]//code" position="replace"/>
|
||||
<xpath expr="//div[hasclass('oe_module_desc')]//h4" position="after">
|
||||
<code><field name="name"/></code>
|
||||
</xpath>
|
||||
<!--显示快速升级-->
|
||||
@@ -62,11 +62,11 @@
|
||||
<xpath expr="//div[hasclass('dropdown-menu')]" position="inside">
|
||||
<a t-if="installed" name="%(app_odoo_customize.action_server_module_multi_get_po)d" type="action" role="menuitem" class="dropdown-item">Export Translation</a>
|
||||
</xpath>
|
||||
<xpath expr="//div[@class='oe_module_action']/a[@target='_blank']" position="replace" groups="app_odoo_customize.group_show_quick_upgrade"/>
|
||||
<xpath expr="//div[hasclass('oe_module_action')]/a[@target='_blank']" position="replace" groups="app_odoo_customize.group_show_quick_upgrade"/>
|
||||
</field>
|
||||
</record>
|
||||
<!--默认打开可更新模块-->
|
||||
<record id="base.open_module_tree" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_is_local_updatable':1}</field>
|
||||
</record>
|
||||
<!--<record id="base.open_module_tree" model="ir.actions.act_window">-->
|
||||
<!--<field name="context">{'search_default_is_local_updatable':1}</field>-->
|
||||
<!--</record>-->
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user