Skip to content

Comments

[18.0][REF] analytic_brand: make use of account analytic distribution models:#286

Open
marielejeune wants to merge 4 commits intoOCA:18.0from
acsone:18.0-analytic_brand-analytic_distribution_model-mle
Open

[18.0][REF] analytic_brand: make use of account analytic distribution models:#286
marielejeune wants to merge 4 commits intoOCA:18.0from
acsone:18.0-analytic_brand-analytic_distribution_model-mle

Conversation

@marielejeune
Copy link
Contributor

@marielejeune marielejeune commented Dec 18, 2025

Add brands as a dimension in account analytic distribution models, instead of defining the analytic distribution directly on the brand. This makes the code more standard, allowing to use the standard flow of analytic distribution models everywhere where they will be used.

This PR contains several commits:

  • Refactor analytic_brand to include brands as a dimension in analytic distribution models. Include a migration script for existing analytic distributions defined on brands.
  • Refactor contract_brand to make use of the standard analytic distribution models on contracts.
  • Add account_analytic_brand to make use of the standard analytic distribution models on account moves.
  • Add sale_analytic_brand to make use of the standard analytic distribution models on sale orders.

@OCA-git-bot
Copy link
Contributor

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

@marielejeune marielejeune force-pushed the 18.0-analytic_brand-analytic_distribution_model-mle branch 3 times, most recently from 2e8bdd6 to 140dfb9 Compare December 19, 2025 15:18
@marielejeune marielejeune marked this pull request as ready for review December 19, 2025 15:24
Add brands as a dimension in account analytic distribution models,
instead of defining the analytic distribution directly on the brand.
This makes the code more standard, allowing to use the standard flow
of analytic distribution models everywhere where they will be used.
…tion models:

As brands are a dimension in account analytic distribution models,
extend the methods of account.analytic.mixin to make it work for contracts
@marielejeune marielejeune force-pushed the 18.0-analytic_brand-analytic_distribution_model-mle branch from 140dfb9 to cfd61d2 Compare December 19, 2025 16:05
@pcastelovigo
Copy link

pcastelovigo commented Dec 26, 2025

Works well, unfortunately backporting this to 16.0 implies doing almost completely different modules (-- I have it working! https://github.com/flinq-ingenieria/brand/tree/16.0-analytic_brand-analytic_distribution_model-mle) as base methods differs too much

Copy link

@pcastelovigo pcastelovigo left a comment

Choose a reason for hiding this comment

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

LGTM

@pcastelovigo
Copy link

This PR significantly improves the integration of brand with analytic accounting.

In my humble opinion, the proposed approach is much closer to the functionality users actually expect.

For version 16.0, I proposed a conservative migration that followed the previous behavior adapted to analytic distributions.

What to do for version 17 is now up to the community to decide.

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