-
-
Notifications
You must be signed in to change notification settings - Fork 695
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
[16.0][OU-ADD] analytic: Migration done #4052
Conversation
f43015b
to
f606910
Compare
b223310
to
2209155
Compare
---Models in module 'analytic'--- | ||
obsolete model account.analytic.distribution | ||
obsolete model account.analytic.tag | ||
new model account.analytic.applicability | ||
new model account.analytic.distribution.model | ||
new model analytic.mixin [abstract] | ||
# NOTHING TO DO |
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.
This analysis work file is base on newly generation at PR : #4042. I did not edit the original upgrade_analysis
only ugrade_analysis_work
""" | ||
We would like to fill for group_id column before start renaming it into plan_id | ||
""" | ||
openupgrade.logged_query( |
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.
I think in production database it is quite rare to have analytic_account
with empty analytic_group
right? but still IMO, it need to be filled before changing it into plan
Pre fill value for column root_plan_id using the logic in its compute method to avoid computed by ORM | ||
""" | ||
openupgrade.logged_query( |
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.
To avoid computing using ORM for performance
analytic / account.analytic.applicability / analytic_plan_id (many2one) : NEW relation: account.analytic.plan | ||
analytic / account.analytic.applicability / applicability (selection) : NEW required, selection_keys: ['mandatory', 'optional', 'unavailable'] | ||
analytic / account.analytic.applicability / business_domain (selection) : NEW required, selection_keys: ['general'] |
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.
I think this one and the one i comment below should be handled in account
module
analytic / account.analytic.distribution.model / analytic_distribution (json) : NEW hasdefault: compute | ||
analytic / account.analytic.distribution.model / analytic_distribution_search (json): NEW | ||
analytic / account.analytic.distribution.model / analytic_precision (integer) : NEW hasdefault: default | ||
analytic / account.analytic.distribution.model / company_id (many2one) : NEW relation: res.company, hasdefault: default | ||
analytic / account.analytic.distribution.model / partner_category_id (many2one): NEW relation: res.partner.category | ||
analytic / account.analytic.distribution.model / partner_id (many2one) : NEW relation: res.partner |
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.
Same above should handle in account module
2209155
to
57be80b
Compare
Anybody help me review pls :(( |
@remytms, could you take a look over there ? thanks |
/ocabot migration analytic |
\ocabot rebase |
/ocabot rebase |
Sorry @duong77476 you are not allowed to rebase. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
53864fe
to
f42e59c
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.
It seems that some chanes not related to OCA were added to this PR.
f42e59c
to
c8a52da
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.
Thanks @duong77476, tested OK on our database (where typically we did not use analytic groups :))
This PR has the |
Thanks for the migration scripts, Nguyễn. Unfortunately, you haven't allowed to push changes on your branch for the maintainers, so I have superseded this PR at #4188, respecting your attribution, rebasing on top of current branch, and adding the following changes:
|
Need test with account also