diff --git a/module_analysis/README.rst b/module_analysis/README.rst index f6cf26478..0d1236fdb 100644 --- a/module_analysis/README.rst +++ b/module_analysis/README.rst @@ -14,16 +14,16 @@ Module Analysis :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/12.0/module_analysis + :target: https://github.com/OCA/server-tools/tree/13.0/module_analysis :alt: OCA/server-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-module_analysis :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/12.0 + :target: https://runbot.odoo-community.org/runbot/149/13.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows you to know 'how much code' is running on your Odoo instance, group by 'Type' (Odoo Core, OCA, other...) @@ -35,22 +35,22 @@ This module can be usefull in the following cases : * To evaluate the amount to pay to odoo to upgrade your custom code, or the induced workload -.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/installed_modules_by_types.png +.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/installed_modules_by_types.png For that purpose, it adds new concepts * ``ir.module.author``, based on the value ``author`` present in the manifest file. -.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_authors.png +.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_authors.png * ``ir.module.type``, populated by default with Odoo and OCA values. -.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_types.png +.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_types.png Each installed modules have extra data in the 'Technical Data' tab : -.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_form.png +.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_form.png **Table of contents** @@ -74,13 +74,13 @@ it information. This module comes with default rules. - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/default_module_type_rules.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/default_module_type_rules.png You can add your custom rules to identify the modules your team have developped for exemple, - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/add_module_type_rules.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/add_module_type_rules.png to update the data, you have to : @@ -89,7 +89,7 @@ to update the data, you have to : * Check the box 'Analyse Installed modules' - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/base_module_update.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/base_module_update.png This will update analysis of your installed modules. @@ -124,7 +124,7 @@ Exclude files and directories Two parameters are availaible in 'Settings' / 'Technical' / 'Parameters' 'System Parameters' : - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/config_parameters.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/config_parameters.png The list of folders and filename will be exclude from the analysis. You can change the default settings. @@ -136,9 +136,9 @@ Usage Open the stats to analyse the detail of the code installed - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/analysis_pivot.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/analysis_pivot.png - .. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/analysis_pie.png + .. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/analysis_pie.png Bug Tracker @@ -177,6 +177,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-tools `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/module_analysis/__manifest__.py b/module_analysis/__manifest__.py index 5eaf3f85e..364883054 100644 --- a/module_analysis/__manifest__.py +++ b/module_analysis/__manifest__.py @@ -9,7 +9,7 @@ " custom modules", "author": "GRAP, Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-tools/", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", "depends": ["base",], "data": [ diff --git a/module_analysis/i18n/module_analysis.pot b/module_analysis/i18n/module_analysis.pot index 482ec06e4..3bff3c3db 100644 --- a/module_analysis/i18n/module_analysis.pot +++ b/module_analysis/i18n/module_analysis.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" diff --git a/module_analysis/i18n/zh_CN.po b/module_analysis/i18n/zh_CN.po index 5579d2a3b..11ea26985 100644 --- a/module_analysis/i18n/zh_CN.po +++ b/module_analysis/i18n/zh_CN.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2019-08-31 06:51+0000\n" "Last-Translator: 黎伟杰 <674416404@qq.com>\n" diff --git a/module_analysis/models/base_module_update.py b/module_analysis/models/base_module_update.py index 5c6ebafa0..faefea0d7 100644 --- a/module_analysis/models/base_module_update.py +++ b/module_analysis/models/base_module_update.py @@ -2,7 +2,7 @@ # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import api, fields, models +from odoo import fields, models class BaseModuleUpdate(models.TransientModel): @@ -12,7 +12,6 @@ class BaseModuleUpdate(models.TransientModel): string="Analyse Installed Modules", default=True ) - @api.multi def update_module(self): return super( BaseModuleUpdate, diff --git a/module_analysis/models/ir_module_author.py b/module_analysis/models/ir_module_author.py index dbc788bcf..ba8369142 100644 --- a/module_analysis/models/ir_module_author.py +++ b/module_analysis/models/ir_module_author.py @@ -31,7 +31,6 @@ class IrModuleAuthor(models.Model): ), ] - @api.multi @api.depends("installed_module_ids") def _compute_installed_module_qty(self): for author in self: diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index 9bc9083fa..9ad843e9d 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -6,7 +6,7 @@ import logging import os from pathlib import Path -import pygount +from pygount import SourceAnalysis from odoo import api, fields, models from odoo.modules.module import get_module_path @@ -82,7 +82,6 @@ class IrModuleModule(models.Model): self.search([("state", "=", "installed")]).button_analyse_code() return res - @api.multi def write(self, vals): res = super().write(vals) if vals.get("state", False) == "installed": @@ -94,7 +93,6 @@ class IrModuleModule(models.Model): return res # Public Section - @api.multi def button_analyse_code(self): IrModuleAuthor = self.env["ir.module.author"] IrModuleTypeRule = self.env["ir.module.type.rule"] @@ -139,7 +137,7 @@ class IrModuleModule(models.Model): ) for file_path, file_ext in file_list: - file_res = pygount.source_analysis( + file_res = file_res = SourceAnalysis.from_file( file_path, "", encoding=self._get_module_encoding(file_ext) ) for k, v in analysed_datas.get(file_ext).items(): diff --git a/module_analysis/models/ir_module_type.py b/module_analysis/models/ir_module_type.py index 9bbecbacd..08d055cc9 100644 --- a/module_analysis/models/ir_module_type.py +++ b/module_analysis/models/ir_module_type.py @@ -24,7 +24,6 @@ class IrModuleType(models.Model): string="Modules Quantity", compute="_compute_installed_module_qty", store=True ) - @api.multi @api.depends("installed_module_ids.module_type_id") def _compute_installed_module_qty(self): for module_type in self: diff --git a/module_analysis/models/ir_module_type_rule.py b/module_analysis/models/ir_module_type_rule.py index cd8f93b64..a726c284b 100644 --- a/module_analysis/models/ir_module_type_rule.py +++ b/module_analysis/models/ir_module_type_rule.py @@ -19,7 +19,6 @@ class IrModuleType(models.Model): string="Module type", comodel_name="ir.module.type", required=True ) - @api.multi def _get_module_type_id_from_module(self, module): IrModuleModule = self.env["ir.module.module"] for rule in self: diff --git a/module_analysis/static/description/index.html b/module_analysis/static/description/index.html index 4e596fd28..3d9a78736 100644 --- a/module_analysis/static/description/index.html +++ b/module_analysis/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runbot

This module allows you to know ‘how much code’ is running on your Odoo instance, group by ‘Type’ (Odoo Core, OCA, other…)

This module can be usefull in the following cases :

@@ -377,19 +377,19 @@ instance, group by ‘Type’ (Odoo Core, OCA, other…)

  • To evaluate the amount to pay to odoo to upgrade your custom code, or the induced workload
  • -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/installed_modules_by_types.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/installed_modules_by_types.png

    For that purpose, it adds new concepts

    -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_authors.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_authors.png -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_types.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_types.png

    Each installed modules have extra data in the ‘Technical Data’ tab :

    -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/module_form.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/module_form.png

    Table of contents

      @@ -423,12 +423,12 @@ file. it information.

      This module comes with default rules.

      -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/default_module_type_rules.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/default_module_type_rules.png

      You can add your custom rules to identify the modules your team have developped for exemple,

      -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/add_module_type_rules.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/add_module_type_rules.png

      to update the data, you have to :

        @@ -436,7 +436,7 @@ developped for exemple,

      • Check the box ‘Analyse Installed modules’

        -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/base_module_update.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/base_module_update.png
      @@ -468,7 +468,7 @@ files), create a custom modules and overload the module model :

      Two parameters are availaible in ‘Settings’ / ‘Technical’ / ‘Parameters’ ‘System Parameters’ :

      -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/config_parameters.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/config_parameters.png

      The list of folders and filename will be exclude from the analysis. You can change the default settings.

      @@ -481,8 +481,8 @@ You can change the default settings.

    Open the stats to analyse the detail of the code installed

    -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/analysis_pivot.png -https://raw.githubusercontent.com/OCA/server-tools/12.0/module_analysis/static/description/analysis_pie.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/analysis_pivot.png +https://raw.githubusercontent.com/OCA/server-tools/13.0/module_analysis/static/description/analysis_pie.png
    @@ -514,7 +514,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/server-tools project on GitHub.

    +

    This module is part of the OCA/server-tools project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/module_analysis/views/view_ir_module_author.xml b/module_analysis/views/view_ir_module_author.xml index 95f970372..1322c9f7c 100644 --- a/module_analysis/views/view_ir_module_author.xml +++ b/module_analysis/views/view_ir_module_author.xml @@ -38,7 +38,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). Modules Authors ir.actions.act_window ir.module.author - form tree,form ir.actions.act_window ir.module.module [('state', '=', 'installed')] - form pivot,graph Modules Types ir.actions.act_window ir.module.type - form tree,form Modules Types Rules ir.actions.act_window ir.module.type.rule - form tree