Skip to content

[18.0][ADD] project_prevent_analytic_rename - #1804

Open
Shide wants to merge 1 commit into
OCA:18.0from
moduon:18.0-project_prevent_analytic_rename
Open

Shide wants to merge 1 commit into
OCA:18.0from
moduon:18.0-project_prevent_analytic_rename

Conversation

@Shide

@Shide Shide commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Prevent renaming analytic account when chaning project's name

https://www.loom.com/share/43209d35a5a94b07aace50e35b500a34

MT-9379 @moduon @rafaelbn @fcvalgar @Gelojr @EmilioPascual @chienandalu please review if you want 😄

@OCA-git-bot OCA-git-bot added series:18.0 mod:project_prevent_analytic_rename Module project_prevent_analytic_rename labels Sep 10, 2026

@chienandalu chienandalu 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.

Code review 👍

@Shide
Shide force-pushed the 18.0-project_prevent_analytic_rename branch from 25d7d5a to 72cc7e0 Compare September 10, 2026 10:04

@EmilioPascual EmilioPascual left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rafaelbn rafaelbn added this to the 18.0 milestone Sep 13, 2026

@rafaelbn rafaelbn 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.

Hi Edu,

I personally reviewed and tested this in Runboat 👍

  • Standard Odoo renames the analytic account when its only linked project is renamed.
  • With this module installed, the analytic account keeps its name.
  • The analytic account can still be renamed directly and keeps its new name after renaming the project again.

Everything works as expected.

Please make these changes before merging:

  • Rename project_prevent_analytic_rename to project_analytic_account_name_no_sync.

The current name suggests that users cannot rename the analytic account, but they can. The module only stops the automatic name change caused by renaming the project.

The usual Odoo, OCA and Moduon naming convention goes from general to specific:

<functional area>_<object>_<behavior>

In this case: project → analytic_account → name → no_sync.

Examples: project_task_stage_lock, project_task_analytic_propagation and account_analytic_sequence.

  • Update the module name and summary:
"name": "Project Analytic Account Name: No Sync",
"summary": "Keep analytic account names unchanged when projects are renamed",
  • Update the PR title to [18.0][ADD] project_analytic_account_name_no_sync.

  • Replace readme/CONTEXT.md with:

By default, Odoo renames an analytic account when its only linked project is
renamed. It does not do this when the same account is shared by several
projects.

This can be inconvenient when project and accounting teams use different naming
conventions.
  • Replace readme/DESCRIPTION.md with:
This module keeps the analytic account name unchanged when its project is
renamed.

It applies to all projects, requires no configuration, and users can still
rename the analytic account directly.
  • Replace readme/USAGE.md with:
No configuration is required after installation.

1. Enable Analytic Accounting if it is not already enabled.
2. Open or create a project linked to an analytic account.
3. Rename the project and save it.
4. The analytic account keeps its existing name.
5. To change it, rename the analytic account directly.
  • Make sure the OCA icon is displayed correctly in the Apps view. It was not shown during my Runboat test.

Once this is done, it is OK for me.

Thanks!

@EmilioPascual
EmilioPascual force-pushed the 18.0-project_prevent_analytic_rename branch from 72cc7e0 to 5acec85 Compare November 11, 2026 07:12
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.

5 participants