-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[18.0][FIX] upgrade_analysis: avoid caring about non stored fields #3290
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
[18.0][FIX] upgrade_analysis: avoid caring about non stored fields #3290
Conversation
Hi @legalsylvain, @StefanRijnhart, |
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.
Makes sense !
Thanks !
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 don't know. For me as a developer, reading about these fields do add to my understanding of the way that Odoo develops. Would it be an option to update the analysis to add unstored
for NEW or DEL entries of unstored fields?
Do you mean an option in the form view (a new field) to enable |
No, I mean that it says in the analysis something like
Instead of
That way the new field still shows up in the analysis, but it is immediately clear to the developer of the scripts that nothing needs to be done. |
At a first sight, i'm not agree to add such extra change. I understand your need as a développer, but there are other interesting changes (like changes in functions names / args) that are not listed for the same reason : no action required. If we décide to add this line, we could add an extra line juste after : |
acb9794
to
f989a15
Compare
@pedrobaeza opinions? |
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.
Approving this version, as it implements my suggestion. Thanks!
The code doesn't highlight the results in the file. Can you please show an example? |
Example:
will be changed to
|
f989a15
to
afa5370
Compare
afa5370
to
cd01a7b
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.
I suppose this will require an adaptation when migrated to 19.
/ocabot merge patch
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at de0e3b5. Thanks a lot for contributing to OCA. ❤️ |
Long time ago, I added OCA/OpenUpgrade@b724b4f in v12. I did it because Odoo started to add computed/related stored fields in v13. But Odoo in last versions has been adding non stored fields that are not compute nor related, like https://github.com/odoo/odoo/blob/18.0/addons/account/models/account_account.py#L142 and https://github.com/odoo/odoo/blob/18.0/addons/account/models/account_move.py#L186. This kind of field adds noise in the analysis file, so let's remove them.
NOTE: Usual
company_dependent
fields and usualtranslate
fields are marked as stored, so no problem with these cases.