Skip to content

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

Works well, unfortunately backporting this to 16.0 implies doing almost completely different modules (-- I have it working!) 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

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