Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] openupgrade_160: fill_analytic_distribution #350

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

pedrobaeza
Copy link
Member

Convert v15 analytic tags with distributions to v16 analytic distributions.

Extracted and adapted from Viindoo original queries in their migration scripts.

@Tecnativa

Convert v15 analytic tags with distributions to v16 analytic
distributions.

Extracted and adapted from Viindoo original queries in their migration
scripts.
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

my knowledge of analytical accounting is far too limited for me to give an opinion.
But thank you for your contribution!

@pedrobaeza
Copy link
Member Author

It's already used successfully in account, which I already generalize a bit:

https://github.com/OCA/OpenUpgrade/blob/95a57861be937e9dc0bef2d56761a6c4e9e1b08a/openupgrade_scripts/scripts/account/16.0.1.2/pre-migration.py#L329

Being needed also in sale, purchase, and so on, I'm extracting it and generalizing for not repeating code. If any patch is needed, then we only need to touch in one place.

Merging then and next step is to test it replacing in account the code by the call to this.

@pedrobaeza pedrobaeza merged commit 2c43939 into OCA:master Oct 31, 2023
@pedrobaeza pedrobaeza deleted the v16-fill_analytic_distribution branch October 31, 2023 16:07
@marielejeune
Copy link
Contributor

Hi @pedrobaeza, thanks for extracting this method.
It is sadly not working for sale order lines because sale_order_line has no line analytic_account_id. This column is on the related sale.order. Any idea on how to integrate this in the sale module migration?
See my comment here: OCA/OpenUpgrade#4240 (comment)

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