Skip to content

[16.0][IMP] update crm repo template#744

Open
maisim wants to merge 2 commits into
OCA:16.0from
maisim:16.0-imp_update_repo_template
Open

[16.0][IMP] update crm repo template#744
maisim wants to merge 2 commits into
OCA:16.0from
maisim:16.0-imp_update_repo_template

Conversation

@maisim

@maisim maisim commented May 18, 2026

Copy link
Copy Markdown

Update the repo template using copier update

Development tooling and linting modernization:

  • Replaces .flake8 and .isort.cfg configuration files with a new .ruff.toml, configuring Ruff for linting, formatting, and import sorting, and specifying rules, exclusions, and per-file ignores. [1] [2] [3]
  • Updates .pre-commit-config.yaml to remove Flake8, isort, Black, pyupgrade, and autoflake hooks, and adds Ruff and Ruff-format hooks. Also updates and adds other hooks, such as whool-init, and improves OCA hooks usage. [1] [2] [3]
  • Updates .copier-answers.yml to enable Ruff and pyproject.toml usage, and enables conversion of README fragments to markdown. [1] [2]

Continuous Integration enhancements:

  • Updates Python version in pre-commit workflow to 3.10 (from 3.11) and adds pip caching for efficiency.
  • Updates PostgreSQL service image in test workflow to use the postgres:12 tag (instead of postgres:12.0), and adds a step to upload screenshots from failed JS tests. [1] [2]
  • Adds a union merge strategy for test-requirements.txt in .gitattributes.

Documentation and metadata improvements:

  • Updates README.md and crm_claim/README.rst with a project description, OCA support banner, and improved formatting and clarity for configuration and credits sections. [1] [2] [3] [4] [5] [6]
  • Updates the repository description in .copier-answers.yml to accurately reflect the CRM modules' purpose.

Pylint configuration updates:

  • Synchronizes and expands the set of enabled checks in .pylintrc and .pylintrc-mandatory, improving code quality enforcement and aligning with OCA standards. [1] [2] [3] [4]

Minor code improvements:

  • Refactors crm_claim/models/crm_claim.py to use Python 3 super() style for clarity and conciseness. [1] [2]

Changes applied by copier update:

- Bump template version v1.31 -> v1.42
- Switch from flake8/black/isort/pyupgrade to ruff (ruff + ruff-format)
  - Remove .flake8, .isort.cfg
  - Add .ruff.toml (target py3.10, isort, pyupgrade, mccabe, line-length)
  - Remove autoflake, pyupgrade, isort, black, flake8 pre-commit hooks
  - Add ruff and ruff-format pre-commit hooks
- Enable use_ruff=true, use_pyproject_toml=true in copier answers
- Add .gitattributes (test-requirements.txt merge=union)
- pre-commit-config.yaml:
  - maintainer-tools rev bump (f9b919b)
  - python default version: python3 -> python3.10
  - Add whool-init hook (sbidoul/whool v1.3)
  - Add obsolete dotfiles check hook
  - Add oca-gen-external-dependencies hook
  - Add --convert-fragments-to-markdown to oca-gen-addon-readme
  - Remove setuptools-odoo (replaced by whool)
- .github/workflows/pre-commit.yml:
  - python-version: 3.11 -> 3.10
  - Add pip cache for setup-python
- .github/workflows/test.yml:
  - postgres:12.0 -> postgres:12
  - Add 'Upload screenshots from JS tests' artifact step on failure
- .pylintrc / .pylintrc-mandatory: reorder enable= list (alpha-sort by group)
- README.md: add OCA support banner, fill repo description
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @Shide, @victoralmau, @luisg123v, @bealdav, @rafaelbn, @edlopen, @carolinafernandez-tecnativa, @EmilioPascual,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added mod:crm_lead_product Module crm_lead_product mod:crm_date_deadline_required Module crm_date_deadline_required series:16.0 mod:crm_claim_code Module crm_claim_code mod:crm_project_task Module crm_project_task mod:crm_claim Module crm_claim mod:crm_lead_to_task Module crm_lead_to_task mod:crm_project_create Module crm_project_create mod:crm_location Module crm_location mod:crm_phonecall Module crm_phonecall mod:crm_security_group Module crm_security_group mod:crm_won_restrict_per_stage Module crm_won_restrict_per_stage mod:crm_salesperson_planner_sale Module crm_salesperson_planner_sale mod:crm_salesperson_planner Module crm_salesperson_planner mod:crm_claim_type Module crm_claim_type mod:crm_partner_assign Module crm_partner_assign mod:crm_lead_firstname Module crm_lead_firstname mod:crm_lead_currency Module crm_lead_currency mod:crm_stage_multi_team Module crm_stage_multi_team mod:crm_industry Module crm_industry mod:crm_location_nuts Module crm_location_nuts mod:crm_exception Module crm_exception mod:crm_partner_required Module crm_partner_required mod:crm_lead_search_archive Module crm_lead_search_archive mod:crm_stage_mail Module crm_stage_mail mod:crm_team_zip_assign Module crm_team_zip_assign mod:crm_stage_probability Module crm_stage_probability mod:crm_lead_code Module crm_lead_code labels May 18, 2026
@OCA-git-bot OCA-git-bot added mod:marketing_crm_partner Module marketing_crm_partner mod:crm_lead_vat Module crm_lead_vat labels May 18, 2026
- Added OCA banner to README files for better visibility.
- Corrected license badge text from \\"licence\\" to \\"license\\" in README files.
- Improved formatting and clarity in module descriptions and usage instructions.
- Created new markdown files for contributors and usage instructions to replace outdated formats.
- Updated HTML documentation to reflect changes in README structure and content.
- Added pyproject.toml files for build system configuration in both crm_won_restrict_per_stage and marketing_crm_partner modules.

@bealdav bealdav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

@petrus-v petrus-v left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks taking care of this almost there

I don't think we needs both setup.py and pyproject.toml

Comment thread .copier-answers.yml
repo_website: https://github.com/OCA/crm
use_pyproject_toml: false
use_ruff: false
use_pyproject_toml: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far you are moving to pyproject, I think only setup/_metapackage directory is needs in setup directiry so you can remove other directories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:crm_claim_code Module crm_claim_code mod:crm_claim_type Module crm_claim_type mod:crm_claim Module crm_claim mod:crm_date_deadline_required Module crm_date_deadline_required mod:crm_exception Module crm_exception mod:crm_industry Module crm_industry mod:crm_lead_code Module crm_lead_code mod:crm_lead_currency Module crm_lead_currency mod:crm_lead_firstname Module crm_lead_firstname mod:crm_lead_product Module crm_lead_product mod:crm_lead_search_archive Module crm_lead_search_archive mod:crm_lead_to_task Module crm_lead_to_task mod:crm_lead_vat Module crm_lead_vat mod:crm_location_nuts Module crm_location_nuts mod:crm_location Module crm_location mod:crm_partner_assign Module crm_partner_assign mod:crm_partner_required Module crm_partner_required mod:crm_phonecall Module crm_phonecall mod:crm_project_create Module crm_project_create mod:crm_project_task Module crm_project_task mod:crm_salesperson_planner_sale Module crm_salesperson_planner_sale mod:crm_salesperson_planner Module crm_salesperson_planner mod:crm_security_group Module crm_security_group mod:crm_stage_mail Module crm_stage_mail mod:crm_stage_multi_team Module crm_stage_multi_team mod:crm_stage_probability Module crm_stage_probability mod:crm_team_zip_assign Module crm_team_zip_assign mod:crm_won_restrict_per_stage Module crm_won_restrict_per_stage mod:marketing_crm_partner Module marketing_crm_partner series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants