Search 1.9 billion lines of Odoo code on GitHub

module_analysis

Author: GRAP, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0
Repository: brain-tec/server-tools
Dependencies: base
Languages: HTML (435, 33.9%), PO File (170, 13.2%), Python (279, 21.7%), XML (276, 21.5%), and reStructuredText (125, 9.7%)
Other branches: 12.0, 12.0-ocabot-merge-pr-1625-by-gurneyalex-bump-major, 12.0-ocabot-merge-pr-1891-by-dreispt-bump-minor, 12.0-ocabot-merge-pr-2101-by-dreispt-bump-patch, 13.0, 13.0-ocabot-merge-pr-1887-by-dreispt-bump-nobump, and 13.0-ocabot-merge-pr-2200-by-LoisRForgeFlow-bump-nobump
Other repositories: 001101/server-tools, 0yik/server-tools, 2FM/server-tools, 50611/server-tools, AITIC/server-tools, AMhadhbi/server-tools, Alfa-90/server-tools, Artielkami/server-tools, CB-Gran-Canaria/server-tools, Callino/server-tools, ChanFeei/server-tools, Change2improve/server-tools, ChinaShrimp/server-tools, ComitorDevTeam/server-tools, Comunitea/server-tools, ContrerasTorrez/server-tools, DITIntl/server-tools, Danielzhulin/server-tools, Digital5-Odoo/server-tools, Dobtor-OCA/server-tools, DucTruongKomit/server-tools, DulingLai/server-tools, ERPLibre/server-tools, FernandoRomera/server-tools, ForgeFlow/server-tools, GSLabIt/server-tools, Gabinete-Digital/server-tools, Gebesa-Dev/server-tools, GleydsonHudson/server-tools, HomerDeoDatu/server-tools, Ingeos/server-tools, Intesco2-0/server-tools, IvanShirokikh/server-tools, Jarsa/server-tools, Jeisonpernia/server-tools, JuaniFreedoo/server-tools, JuniorKRnd/server-tools, KonaERP/server-tools, KottmannM/server-tools, LevelPrime/server-tools, LourenzoH/server-tools, MathBenTech/server-tools, MediaJockey/server-tools, NGTS-AUS/server-tools, NL66278/server-tools, Numigi/server-tools, OCA-MUK/server-tools, OCA/server-tools, OdooIndonesia/server-tools, Othniel1796/server-tools, PieterPaulussen/server-tools, PlanetaTIC/server-tools, QubiQ/server-tools, Rad0van/server-tools, SanteLibre/server-tools, ScopeaFrance/server-tools, SequarSrl/server-tools, SilvioGregorini/server-tools, SimoneVagile/server-tools, SokreamPhanqrl/server-tools, StefanRijnhart/server-tools, Syci-Consulting/server-tools, Tecnativa/server-tools, Thorncrag/server-tools, TimLai125/server-tools, Tonow-c2c/server-tools, UnknownInfo/server-tools, VanMoof/server-tools, Vauxoo/server-tools, Yaman-als/server-tools, YannickB/server-tools, YogeshMahera-SerpentCS/server-tools, aadarsh977/server-tools, aaltinisik/server-tools, abdulhalim-cu/server-tools, acsone/server-tools, adhoc-dev/server-tools, ajayjaviya/server-tools, ajinvn2019/server-tools, akretion/server-tools, albertvimlet/server-tools, alfadil/server-tools, andriisem/server-tools, anhvu-sg/server-tools, anodino-dev/server-tools, ansinaesmejor/server-tools, antilhue/server-tools, area-scm/server-tools, aurestic/server-tools, avoinsystems/server-tools, azmeuk/server-tools, bacgdev/server-tools, bala07123/server-tools, bangil0/server-tools, bealdav/server-tools, blooparksystems/server-tools, bmya/server-tools, boky1993/server-tools, boutitinizar/server-tools, camptocamp/server-tools, captivea-dcr/server-tools, cheikhousy/server-tools, claro5/server-tools, connect-to-ak/server-tools, coopiteasy/server-tools, crnd-inc/server-tools, dalal-intellisoft/server-tools, dani-xtendoo/server-tools, daramousk/server-tools, davidwah/server-tools, dennybiasiolli/server-tools, diggy128/server-tools, dipakthapaofficial/server-tools, dmsergio/server-tools, dndoanh/server-tools, druidoo-dev/server-tools, eLBati/server-tools, ebirbe/server-tools, ecosoft-odoo/rjc, ecosoft-odoo/server-tools, eezee-it/server-tools, emagdalenaC2i/server-tools, enocare/server-tools, erfanjahanshahlo/server-tools, ermannognan/server-tools, etobella/server-tools, eversatis/server-tools, ewac-nl/server-tools, exosoftware/oca-server-tools, ferdiansahgg/server-tools, fmdl/server-tools, focusate/oca-server-tools, gab-net/server-tools, gitguohao/server-tools, goanzaloo/server-tools, grindtildeath/server-tools, guewen/server-tools, gurneyalex/server-tools, hbrunn/server-tools, hdb1234/server-tools, henrryyanez/server-tools, hibou-io/oca-server-tools, hiisoc/server-tools, hinfo506/server-tools, ideaspositivas-group/server-tools, igallart/server-tools, initOS/server-tools, insscn/server-tools, invitu/server-tools, ip-candres/server-tools, jaballate/server-tools, jacky82669513/server-tools, janverb/server-tools, jcarlosmontoya/server-tools, jeanpaul-mupagasi/server-tools, josueBulle/server-tools, josuf567/server-tools, jphatig/server-tools, julianram/server-tools, kait-avalah/server-tools, kmee/server-tools, kos94ok-3D/server-tools, legalsylvain/server-tools, lembregtse/server-tools, lideritjnma/server-tools, lilotter45/server-tools, lincersolucoes/oca-server-tools, liweijie0812/server-tools, loftwah/server-tools, lonelyleaves/server-tools, maherjaballi/server-tools, marcelomora/server-tools, merchise-autrement/server-tools, mikolodz/server-tools, modoolar/server-tools, mulaudzicalvin/server-tools, multidadosti-erp/server-tools, nabima/server-tools, nehaksolves/server-tools, nicolasjelincic/server-tools, nilshamerlinck/server-tools, niulinlnc/server-tools, njeudy/server-tools, ntsirintanis/server-tools, odoo247/server-tools, odooerpdevelopers/server-tools, omalbastin/server-tools, onesteinbv/server-tools, p-tombez/server-tools, percypalomino/server-tools, phillipstack/server-tools, piensom/server-tools, praxigento/oca-server-tools, presenceverte/server-tools, programadorzurita/server-tools, pythoner-3k/server-tools, raizs/server-tools, rdeheele/server-tools, rm-jamotion/server-tools, robertsvx27/server-tools, romendil/server-tools, royalline1/server-tools, rsullivan2704/server-tools, rudisulistyo/server-tools, sanube/server-tools, schout-it/server-tools, sebalix/server-tools, sergiocorato/server-tools, shepilov-vladislav/server-tools, solvosci/server-tools, ssaid/server-tools, steingabelgaard/server-tools, sunflowerit/server-tools, sunshineLhj/server-tools, suprielfath/server-tools, swbs-co/server-tools, sysprocesarcastro/server-tools, takinobori/oca-server-tools, tegin/server-tools, tirma-sa/server-tools, tmasson/server-tools, tongjiou/server-tools, trevi-software/server-tools, unitek-solusi/OCA-server-tools, ursais/server-tools, valmarnet/server-tools, ventor-tech/server-tools, versada/server-tools, victoralmau/server-tools, vmelnych/server-tools, willmakenoise/server-tools, xAlphaOmega/server-tools, xcgd/server-tools, xtjie/server-tools, xuanmu/server-tools, xwh123807/server-tools, xwh1238070/server-tools, yalabsio/server-tools, ygdmxy/server-tools, ypapouin/server-tools, yuzhengxing/server-tools, zarumaru/server-tools, zhaohengzeng/server-tools, and zhaohuaw/server-tools

<h1 class="title">Module Analysis</h1> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/15.0/module_analysis"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-module_analysis"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/149/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module allows you to know 'how much code' is running on your Odoo instance, group by 'Type' (Odoo Core, OCA, other...)</p> <p>This module can be usefull in the following cases :</p> <ul class="simple"> <li>To analyse the size of your technical debt, regarding your Custom modules</li> <li>To know the ratio between Odoo / OCA and Custom modules</li> <li>To evaluate the amount to pay to odoo to upgrade your custom code, or the induced workload</li> </ul> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/installed_modules_by_types.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/installed_modules_by_types.png" /> <p>For that purpose, it adds new concepts</p> <ul class="simple"> <li><code>ir.module.author</code>, based on the value <code>author</code> present in the manifest file.</li> </ul> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_authors.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_authors.png" /> <ul class="simple"> <li><code>ir.module.type</code>, populated by default with Odoo and OCA values.</li> </ul> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_types.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_types.png" /> <p>Each installed modules have extra data in the 'Technical Data' tab :</p> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_form.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/module_form.png" /> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#configuration" id="id2">Configuration</a><ul> <li><a class="reference internal" href="#adding-extra-data" id="id3">Adding Extra data</a></li> <li><a class="reference internal" href="#exclude-files-and-directories" id="id4">Exclude files and directories</a></li> </ul> </li> <li><a class="reference internal" href="#usage" id="id5">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id6">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id7">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id8">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id9">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id10">Maintainers</a></li> </ul> </li> </ul> </div> <a name="installation"></a> <h2><a class="toc-backref" href="#id1">Installation</a></h2> <p>To use this module, you have to install the <code>pygount</code> python librairy.</p> <p><code>pip install pygount</code></p> <a name="configuration"></a> <h2><a class="toc-backref" href="#id2">Configuration</a></h2> <ul class="simple"> <li>Go to Apps / Module Analysis / Modules Types Rules</li> </ul> <p>The Module types Rules are usefull to get the Type of a module, based on it information.</p> <p>This module comes with default rules.</p> <blockquote> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/default_module_type_rules.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/default_module_type_rules.png" /> </blockquote> <p>You can add your custom rules to identify the modules your team have developped for exemple,</p> <blockquote> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/add_module_type_rules.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/add_module_type_rules.png" /> </blockquote> <p>to update the data manually, you have to :</p> <ul> <li><p class="first">Go to 'Apps' / 'Update Apps List'</p> </li> <li><p class="first">Check the box 'Analyse Installed modules'</p> <blockquote> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/base_module_update.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/base_module_update.png" /> </blockquote> </li> </ul> <p>This will update analysis of your installed modules.</p> <p>to update the data automatically, you have to :</p> <ul class="simple"> <li>Go to 'Settings' / 'Technical' / 'Scheduled Actions'</li> <li>Configure the action 'Update Module Analysis'. (By default, the analysis will be done nightly)</li> </ul> <a name="adding-extra-data"></a> <h3><a class="toc-backref" href="#id3">Adding Extra data</a></h3> <p>If you want to analyse other data, (for exemple, having the number of HTML files), create a custom modules and overload the module model :</p> <pre> <code lang="python">from odoo import api, fields, models class IrModuleModule(models.Model): _inherit = 'ir.module.module' xml_documentation_qty = fields.Integer( string='Quantity of Comments in XML Files') &#64;api.model def _get_analyse_settings(self): res = super()._get_analyse_settings() if not '.html' in res: res['.html'] = {} res['.html']['documentation'] 'xml_documentation_qty' return res</code> </pre> <a name="exclude-files-and-directories"></a> <h3><a class="toc-backref" href="#id4">Exclude files and directories</a></h3> <p>Two parameters are availaible in 'Settings' / 'Technical' / 'Parameters' 'System Parameters' :</p> <blockquote> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/config_parameters.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/config_parameters.png" /> </blockquote> <p>The list of folders and filename will be exclude from the analysis. You can change the default settings.</p> <a name="usage"></a> <h2><a class="toc-backref" href="#id5">Usage</a></h2> <ul class="simple"> <li>Go to 'Apps' / 'Module Analysis' / 'Installed module by Types'</li> </ul> <p>Open the stats to analyse the detail of the code installed</p> <blockquote> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/analysis_pivot.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/analysis_pivot.png" /> <img alt="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/analysis_pie.png" src="https://raw.githubusercontent.com/OCA/server-tools/15.0/module_analysis/static/description/analysis_pie.png" /> </blockquote> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id6">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20module_analysis%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id7">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id8">Authors</a></h3> <ul class="simple"> <li>GRAP</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id9">Contributors</a></h3> <ul class="simple"> <li>Sylvain LE GAL (<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>)</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id10">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>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.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/15.0/module_analysis">OCA/server-tools</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>