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

[15.0][MIG] analytic_tag_dimension: Migration to 15.0 #467

Merged
merged 21 commits into from
Aug 15, 2022

Conversation

cesar-tecnativa
Copy link

@Tecnativa TT37712

@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-analytic_tag_dimension branch 4 times, most recently from ec08934 to 8aacc3c Compare June 29, 2022 09:14
@cesar-tecnativa
Copy link
Author

@pedrobaeza could you please review this?

@cesar-tecnativa
Copy link
Author

@chienandalu could you review this?

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Maybe I'm not the most indicated to review this module. Anyway, just a little comment:

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Ok, as for the module review @carlosdauden could be more suitable than me

@rafaelbn rafaelbn added this to the 15.0 milestone Jul 1, 2022
@cesar-tecnativa
Copy link
Author

@carlosdauden you you please review it?

@cesar-tecnativa cesar-tecnativa changed the title [15.0][MIG] mig analytic tag dimension: Migration to 15.0 [15.0][MIG] analytic_tag_dimension: Migration to 15.0 Jul 4, 2022
@cesar-tecnativa
Copy link
Author

@CarlosRoca13 could you please review this?

@cesar-tecnativa
Copy link
Author

@LudLaf Please review

@LudLaf
Copy link

LudLaf commented Jul 13, 2022

@LudLaf Please review

Issue with a couple of empty lines (one to be added, another to be removed) is now sorted.

There's another change still pending in analytic_tag_dimension/tests/test_analytic_dimension.py related to "specific and controlled data".

@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-analytic_tag_dimension branch from 225a529 to 0c2b57c Compare July 26, 2022 07:53
Copy link

@carlosdauden carlosdauden left a comment

Choose a reason for hiding this comment

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

Attend @pedrobaeza tests comments

Saran440 and others added 12 commits August 12, 2022 11:44
Creating dimensions, you can face this error:

psycopg2.ProgrammingError: column ail.x_dimension_xxx does not exist
LINE 48:         , ail.x_dimension_xxx as x_dimension_xxx, ai.team_..

This is because the column is not yet populated in the moment when
the model initialization is triggered.

In this commit, we inhibit the population of that field in the report
on that case, and launching manual initialization later when done.
- More simplicity
- Don't use demo data
- Test all conditions on each model
Previous code was doing a deferred write after the creation/first write for easing the
code, but it's very bad for performance in such used objects.

This commits changes the way this is handled for covering the cases in advance, and thus
not requiring a second write. The only drawback is that writing on multiple records
means to perform a write on each record separately. This case was also happening
previously, and we have gained one write (the initial one), but it's not the ideal one
in terms of performance. A possible improvement can be to group the records with the
same final values to be performed at once.
When you remove tags, dimensions fields were not updated accordingly before this commit.
…nstallation

If not, there is remaining garbage in ir.model.fields and SQL columns in tables, avoiding
a second install of the module or to reuse the same dimension code.
After all the previous works, it's fair to do it.
@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-analytic_tag_dimension branch from 06016a0 to 18bfcee Compare August 12, 2022 09:44
@cesar-tecnativa
Copy link
Author

All changes are done. I removed unused new tests and keep compatibility with the previous version.

@pedrobaeza
Copy link
Member

/ocabot merge nobump
/ocabot migration analyic_tag_dimension

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-467-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Aug 15, 2022
21 tasks
@OCA-git-bot OCA-git-bot merged commit a098c69 into OCA:15.0 Aug 15, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at d1b8a96. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.