Skip to content

[19.0][MIG] module_analysis: Migration to 19.0#3631

Open
dnplkndll wants to merge 33 commits into
OCA:19.0from
ledoent:19.0-mig-module_analysis
Open

[19.0][MIG] module_analysis: Migration to 19.0#3631
dnplkndll wants to merge 33 commits into
OCA:19.0from
ledoent:19.0-mig-module_analysis

Conversation

@dnplkndll
Copy link
Copy Markdown
Contributor

Port of module_analysis from 18.0 to 19.0 (migration guide).

Non-mechanical adaptations worth flagging

  • _sql_constraintsmodels.Constraint (19.0 API); kept the name_uniq constraint name so the DB identity is stable.
  • pygount (the LoC counter this module needs) added to repo-root requirements.txt — it was absent on the 19.0 branch, so CI needs it to install the module.

legalsylvain and others added 30 commits May 29, 2026 13:10
fixup! [ADD] new module module_analysis

fixup! fixup! [ADD] new module module_analysis

fixup! fixup! fixup! [ADD] new module module_analysis

fixup! fixup! fixup! fixup! [ADD] new module module_analysis

IMP exception message

fixup! fixup! fixup! fixup! fixup! [ADD] new module module_analysis

[REF] remove use of cloc. use pygount librairy instead

fixup! [REF] remove use of cloc. use pygount librairy instead

fixup! fixup! [REF] remove use of cloc. use pygount librairy instead

Apply suggestions from code review

Co-Authored-By: David Beal <david.beal@akretion.com>

Update module_analysis/views/menu.xml

Co-Authored-By: David Beal <david.beal@akretion.com>

Update module_analysis/tests/test_module.py

Co-Authored-By: David Beal <david.beal@akretion.com>

Update module_analysis/readme/CONFIGURE.rst

Co-Authored-By: David Beal <david.beal@akretion.com>

[IMP] handle encoding

[UPD] Update module_analysis.pot

[UPD] README.rst

[UPD] README.rst
[MIG] module_analysis: Migration to 15.0
…cause the analysis is partial (it also make the update slower) ; Add instead a cron task that is executed nightly to update analysis automatically
Analyse can take some time and a cron task can do it every day if needed, no need to recompute it in real time
… cron.

Usefull if we want to analyse the code for uninstalled modules for instance
Pin the pygount dependency to 1.4.0 to avoid chardet version clash

Fixes OCA#2966
pygount 1.4.0 is now very old and current code does not work on recent versions.
It is however easy to improve compatibility accross pygount versions using the
code_count property instead of the code one, which was removed in 2.0.0.
That way, pygount 1.4.0 stays supported but also modern version up to at least
 3.1.0.
Adasat Torres de Leon and others added 3 commits May 29, 2026 13:10
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
- _sql_constraints → models.Constraint (19.0 API); kept the name_uniq constraint name.
- pygount added to repo-root requirements.txt (module's external_dependencies; absent on 19.0, needed for CI install).
- _analyse_code: justified `# pylint: disable=no-search-all` on the ir.module.type.rule load (small config table; new 19.0 pylint-odoo check).

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants