[MIG] module_analysis: Migration to 15.0
[MIG] module_analysis: Migration to 15.0pull/2608/head
parent
34264f8466
commit
acdd3c2773
|
@ -8,8 +8,8 @@
|
|||
" to know which installed modules comes from Odoo Core, OCA, or are"
|
||||
" custom modules",
|
||||
"author": "GRAP, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/server-tools/",
|
||||
"version": "13.0.1.1.0",
|
||||
"website": "https://github.com/OCA/server-tools",
|
||||
"version": "15.0.1.1.0",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["base"],
|
||||
"data": [
|
||||
|
|
|
@ -8,9 +8,7 @@ from odoo import fields, models
|
|||
class BaseModuleUpdate(models.TransientModel):
|
||||
_inherit = "base.module.update"
|
||||
|
||||
analyse_installed_modules = fields.Boolean(
|
||||
string="Analyse Installed Modules", default=True
|
||||
)
|
||||
analyse_installed_modules = fields.Boolean(default=True)
|
||||
|
||||
def update_module(self):
|
||||
return super(
|
||||
|
|
|
@ -9,7 +9,7 @@ class IrModuleAuthor(models.Model):
|
|||
_name = "ir.module.author"
|
||||
_description = "Modules Authors"
|
||||
|
||||
name = fields.Char(string="Name", required=True)
|
||||
name = fields.Char(required=True)
|
||||
|
||||
installed_module_ids = fields.Many2many(
|
||||
string="Modules",
|
||||
|
|
|
@ -10,9 +10,9 @@ class IrModuleType(models.Model):
|
|||
_description = "Modules Types"
|
||||
_order = "sequence"
|
||||
|
||||
name = fields.Char(string="Name", required=True)
|
||||
name = fields.Char(required=True)
|
||||
|
||||
sequence = fields.Integer(string="Sequence")
|
||||
sequence = fields.Integer()
|
||||
|
||||
installed_module_ids = fields.One2many(
|
||||
string="Installed Modules",
|
||||
|
|
|
@ -11,9 +11,9 @@ class IrModuleType(models.Model):
|
|||
_description = "Modules Types Rules"
|
||||
_order = "sequence"
|
||||
|
||||
sequence = fields.Integer(string="Sequence")
|
||||
sequence = fields.Integer()
|
||||
|
||||
module_domain = fields.Char(string="Module Domain", required=True, default="[]")
|
||||
module_domain = fields.Char(required=True, default="[]")
|
||||
|
||||
module_type_id = fields.Many2one(
|
||||
string="Module type", comodel_name="ir.module.type", required=True
|
||||
|
|
|
@ -6,9 +6,6 @@ from odoo import SUPERUSER_ID, api
|
|||
|
||||
|
||||
def analyse_installed_modules(cr, registry):
|
||||
with api.Environment.manage():
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
installed_modules = env["ir.module.module"].search(
|
||||
[("state", "=", "installed")]
|
||||
)
|
||||
installed_modules.button_analyse_code()
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
installed_modules = env["ir.module.module"].search([("state", "=", "installed")])
|
||||
installed_modules.button_analyse_code()
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests.common import TransactionCase, post_install
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
@post_install(True)
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestModule(TransactionCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
|
Loading…
Reference in New Issue