-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
[15.0][MIG] analytic_tag_dimension: Migration to 15.0 #467
Conversation
ec08934
to
8aacc3c
Compare
@pedrobaeza could you please review this? |
@chienandalu could you review this? |
There was a problem hiding this 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:
There was a problem hiding this 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
@carlosdauden you you please review it? |
@CarlosRoca13 could you please review this? |
@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 |
225a529
to
0c2b57c
Compare
There was a problem hiding this 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
* [REF] analytic_tag_dimension: Improve additional fields creation * [UX] analytic_tag_dimension: Warn user about spaces in codes * [FIX] analytic_tag_dimension: fix tests * [IMP] analytic_tag_dimension: make tests SavepointCase
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.
06016a0
to
18bfcee
Compare
All changes are done. I removed unused new tests and keep compatibility with the previous version. |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at d1b8a96. Thanks a lot for contributing to OCA. ❤️ |
@Tecnativa TT37712