Skip to content

[MIG] project_sequence: Migrate to 19.0#1582

Merged
OCA-git-bot merged 31 commits intoOCA:19.0from
acsone:19.0-mig-project-sequence-dro
Mar 31, 2026
Merged

[MIG] project_sequence: Migrate to 19.0#1582
OCA-git-bot merged 31 commits intoOCA:19.0from
acsone:19.0-mig-project-sequence-dro

Conversation

@rousseldenis
Copy link
Copy Markdown

No description provided.

OCA-git-bot and others added 30 commits October 11, 2025 15:28
When a project has a name, still the sequence is a very important field to be displayed. I move it below the project name.

@moduon MT-1506
`hr_timesheet` creates an analytic account by default. The method it uses to create it expects a preexisting name. But since we're making name not required, we're breaking other module's expectations.

To fix this problem, now the name sync is done before writing or creating records, and not after.

To make sure the problem doesn't happen anymore, we keep the `NOT NULL` requirement on project names. We just do it with a manual SQL constraint. This extra protection ensures compatibility with any other modules that expect always a value on the name.

Any possibly misconfigured sequence could produce sequence duplicates. I also add protection against that.

In tests, the project sequence was wrongly reset to 11 only once. Turns out that it survives the test savepoint, so I now reset it before each test instead. Tests are more reliable now. Besides, I added some more.

@moduon MT-1506

wip

wip
These projects shouldn't display "False - Project name" in their display names.

@moduon MT-1506

[UPD] Update project_sequence.pot

[UPD] README.rst

project_sequence 14.0.0.1.1
To change the project display name pattern, follow these steps:

1. Go to *Project > Configuration > Settings*.
2. Edit the *Project display name pattern* field.

   The default format is ``%(sequence_code)s - %(name)s``. You can use those
   same placeholders to customize the pattern.

@moduon MT-1506

[UPD] Update project_sequence.pot

[UPD] README.rst

project_sequence 14.0.0.2.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-14.0/project-14.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_sequence/
@moduon MT-2822

[UPD] Update project_sequence.pot

[UPD] README.rst

project_sequence 15.0.0.2.1
Translated using Weblate (Italian)

Currently translated at 100.0% (9 of 9 strings)

Translation: project-15.0/project-15.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_sequence/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/
Currently translated at 100.0% (10 of 10 strings)

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/it/
Currently translated at 100.0% (10 of 10 strings)

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/de/
Currently translated at 100.0% (10 of 10 strings)

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/es/
Currently translated at 90.0% (9 of 10 strings)

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/nl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-16.0/project-16.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_sequence/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-17.0/project-17.0-project_sequence
Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_sequence/
@rousseldenis
Copy link
Copy Markdown
Author

/ocabot migration project_sequence

Copy link
Copy Markdown
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

Also in 18.0 but can you add a space between the label and the value:

image

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 15, 2026
Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Migration looks clean. The _sql_constraints to models.Constraint conversion follows 19.0 conventions correctly. The name_search signature update (args to domain) matches the 19.0 API. The fix removing the sequence_name typo in write() is a good catch. CI is green. The spacing issue flagged by tarteo is pre-existing from 18.0, not a regression -- could be addressed in a follow-up.

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 1, 2026
Copy link
Copy Markdown

@Reyes4711-S73 Reyes4711-S73 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

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

LGTM!

@rvalyi
Copy link
Copy Markdown
Member

rvalyi commented Mar 31, 2026

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 19.0-ocabot-merge-pr-1582-by-rvalyi-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit aad75f2 into OCA:19.0 Mar 31, 2026
6 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at d748305. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.