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
Various server-side form view fixes #32047
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
xmo-odoo
commented
Mar 22, 2019
- backports fixes which were only done in 12.1 to 12.0 (Perform recursive setup of o2m edition views in the server-side form #28645 and Fix order of fields in onchange of SSF #31494)
- fixes inconsistency with client in sending readonly o2m fields when writing/updating sub-records ([BUG] test_testing_utilities: sends content of readonly o2m fields, should not #32019)
- fix infinite recursion on self-recursive models ( [BUG] test_testing_utilities: Recursive o2m/m2o fields #31458)
robodoo rebase-ff |
Merge method set to rebase and fast-forward |
PRs odoo#28645 and odoo#31494 were not applied to 12.0, but there's no reason not to, they should only fix things (make behaviours more in-line with the regular client), and since o2m is an area where more fixes are needed and it would be nice to have them in 12.0...
xmo-odoo
force-pushed
the
12.0-ssf-fixes-xmo
branch
from
April 1, 2019 13:52
a4cecf4
to
1ecdb4f
Compare
The extra setup probably affects any o2m whose edition view itself contains an o2m, but most likely to blow up entirely on models with some sort of tree structure (parent/child relationship): the SSF eagerly loads and setups the o2m's view, and the o2m's o2m's, ... ad infinitam. A better / cleaner fix would be to set up the subview on-demand (and possibly cache it), but the rest of the o2m stuff is unlikely to work correctly recursively so just don't recurse the o2m view setup at all for now. fixes odoo#31458
The SSF would correctly filter out readonly fields when saving a toplevel form, however it could not remove readonly values when saving o2m pseudo-records to the parent form (as these would be expected to remain available for reading upon the next edition and whatnot), so these values would get sent in 0/1 commands. Filter out these fields during the parent / toplevel save call. Complexity notes: * evaluating readonly modifiers requires the entire record, so unchanged fields still have to be written back to the parent form and be filtered out when *it* is set up for save, an alternative would be to store the `changed` and `readonly` flags alongside the record dict, and have the post-process only override the pre-computed readonly flag using force_save * had to fix a test to match the new behaviour, the post-edition states turns out to be in line with the client's behaviour (or how it looks anyway) Fixes odoo#32019
xmo-odoo
force-pushed
the
12.0-ssf-fixes-xmo
branch
from
April 3, 2019 08:49
bedcec9
to
1e3dc53
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Apr 3, 2019
Test was relying on qty_to_consume getting saved when the produce form is saved, a behaviour of the SSF which diverged from the actual client. After fixing the SSF to behave more in-line with the actual client (don't save o2m sub-fields unless they're flagged as force_save) the test is now visibly broken. Fix it so qty_done is properly updated during wizard configuration / edition instead of updating the in-database object directly.
xmo-odoo
force-pushed
the
12.0-ssf-fixes-xmo
branch
from
April 3, 2019 09:44
1e3dc53
to
826b45f
Compare
robodoo r+ |
Merged, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.