-
-
Notifications
You must be signed in to change notification settings - Fork 821
[MIG][10.0] rating: nothing to do #1352
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ---Fields in module 'rating'--- | ||
| rating / rating.rating / consumed (boolean) : NEW | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cubells you have to set this to True if
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EDIT: Sorry, the correct comparison value is
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pedrobaeza |
||
| # Done: update value depending on rating | ||
|
|
||
| ---XML records in module 'rating'--- | ||
| NEW ir.ui.view: rating.rating_external_page_submit | ||
| # Nothing to do | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Copyright 2018 Tecnativa - Vicent Cubells | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
|
||
| from openupgradelib import openupgrade | ||
|
|
||
|
|
||
| def update_consumed(env): | ||
| openupgrade.logged_query( | ||
| env.cr, """ | ||
| UPDATE rating_rating rr | ||
| SET consumed = True | ||
| WHERE rating != -1 | ||
| """) | ||
| openupgrade.logged_query( | ||
| env.cr, """ | ||
| UPDATE rating_rating rr | ||
| SET rating = 0 | ||
| WHERE rating = -1 | ||
| """) | ||
|
|
||
|
|
||
| @openupgrade.migrate() | ||
| def migrate(env, version): | ||
| update_consumed(env) |
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 file is not correct... this field exists also in v10, but other new fields like
rating_imageorrating_textare not reported. @StefanRijnhart do you have idea why?Uh oh!
There was an error while loading. Please reload this page.
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.
Ah @pedrobaeza you are looking at the analysis of 10.0 so this field should be here. As for rating_image and rating_text in 11.0, these are computed fields and have been traditionally left out of the analysis as they presumably do not need any work.
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.
Agh, I have mixed v10 and v11 as we have both. Sorry for the noise.