Skip to content

Conversation

@arnaudlayec
Copy link

Before, the project's display_name was synched in the project's analytic account (aac) name. This way, the "code" field of aac was empty, and the name had both the project's code and the name in the default format "[code] - [name]" Proposal : synch the 2 fields ("sequence_code" and "name") of the project respectively in the 2 fields ("code" and "name") of the aac

This allow:

  • standard display of aac (see aac's display_name method)
  • ability to target aac with according project's code. Can be useful when importing account move and needing to set an analytic_distribution using the aac's code

This PR also update tests.
I needed to fix some:

  • default_plan_id must be computed once to exist
  • the 2 following tests cannot coexist. I aligned the code & tests like in v18.0 : test_project_without_sequence and test_project_with_empty_sequence. Doing that required to change project's create method

Note: if OK, I can port to upper version.

@OCA-git-bot
Copy link
Contributor

Hi @anddago78, @yajo,
some modules you are maintaining are being modified, check this out!

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Please could you share screenshots or screencast to see how it was before and how it is now? I think that will make it easier to review.

Code looks OK. Just one doubt.

@arnaudlayec
Copy link
Author

Please could you share screenshots or screencast to see how it was before and how it is now? I think that will make it easier to review.

Code looks OK. Just one doubt.

Thank you for your review!
Yes indeed, a quick Screencast here (00:32), with hr_timesheet installed so project's analytic account is created right at project creation.

Screencast.from.2026-01-20.14-08-38.mp4

Se how Analytic Account's field "code" is filled in, as per project's sequence code:
image

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.

3 participants