prepare #IB181K app_odoo_customize对18版本增加模块类型,Odoo中文应用。了解下我们需要优先升级的模块18

This commit is contained in:
Chill
2024-11-05 18:46:14 +08:00
parent 0544991f29
commit 911e49d52e
3 changed files with 12 additions and 2 deletions

View File

@@ -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',

View File

@@ -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

View File

@@ -36,6 +36,9 @@
<xpath expr="//search/group" position="inside">
<filter string="Addons Path" name="addons_path" domain="[]" context="{'group_by': 'addons_path_id'}" groups="base.group_no_one"/>
</xpath>
<xpath expr="//filter[@name='app']" position="before">
<filter name="odooapp" string="Odoo中文应用" domain="[('module_type', '=', 'odooapp.cn')]"/>
</xpath>
</field>
</record>