Skip to content

[fork-CI] [19.0][MIG] module_analysis: Migration to 19.0 - #5

Draft
dnplkndll wants to merge 39 commits into
19.0from
19.0-mig-module_analysis
Draft

dnplkndll wants to merge 39 commits into
19.0from
19.0-mig-module_analysis

Conversation

@dnplkndll

Copy link
Copy Markdown

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

Non-mechanical adaptations worth flagging

  • _sql_constraints → models.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.

@dnplkndll
dnplkndll force-pushed the 19.0-mig-module_analysis branch from 0360d04 to 754ecca Compare May 29, 2026 17:18
@dnplkndll
dnplkndll force-pushed the 19.0-mig-module_analysis branch from 754ecca to 139ebce Compare June 22, 2026 18:46
@dnplkndll
dnplkndll force-pushed the 19.0-mig-module_analysis branch 2 times, most recently from 7e09658 to 8e4ccca Compare September 29, 2026 12:30
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
@dnplkndll
dnplkndll force-pushed the 19.0-mig-module_analysis branch from 8e4ccca to 758fea5 Compare September 29, 2026 13:04
liweijie0812 and others added 24 commits October 10, 2026 10:19
[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
Currently translated at 97.2% (35 of 36 strings)

Translation: server-tools-15.0/server-tools-15.0-module_analysis
Translate-URL: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-module_analysis/it/
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
florian-dacosta and others added 14 commits October 10, 2026 10:19
Currently translated at 94.2% (33 of 35 strings)

Translation: server-tools-16.0/server-tools-16.0-module_analysis
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_analysis/it/
Currently translated at 91.6% (33 of 36 strings)

Translation: server-tools-16.0/server-tools-16.0-module_analysis
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-module_analysis/it/
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.
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
(cherry picked from commit 45c75fb)
Assisted-by: Claude Code
- _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>
(cherry picked from commit 139ebce)
Assisted-by: Claude Code
The rules live in an editable list, so the editor opens in a dialog
(`in_dialog`) rather than inline; the cell itself shows the condition in
words plus a live match count.

Assisted-by: Claude Fable 5
@dnplkndll
dnplkndll force-pushed the 19.0-mig-module_analysis branch from 758fea5 to 1bca6b8 Compare October 10, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.