-
-
Notifications
You must be signed in to change notification settings - Fork 354
[13.0][ADD] model_serializer: module to facilitate the (de)serialization of Odoo Models into DataModels #177
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
Merged
Conversation
This file contains hidden or 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
Closed
bcdc8e7 to
6d19777
Compare
…efinition "class_or_instancemethod"
6d19777 to
0917c36
Compare
fdegrave
pushed a commit
to fdegrave/rest-framework
that referenced
this pull request
Sep 2, 2021
…ion of Odoo Models into DataModels Forward port of PR OCA#177
Contributor
|
same as in #193 |
Contributor
|
/ocabot merge nobump |
Contributor
|
On my way to merge this fine PR! |
Contributor
|
Congratulations, your PR was merged at 269746e. Thanks a lot for contributing to OCA. ❤️ |
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.
This model adds functionalities similar to (a subset of) what offers Django Rest Framework through their Model Serializers (hence the name).
The
ModelSerializerclass inherits from theDatamodelclass and adds functionalities. Therefore any class inheriting fromModelSerializercan be used the exact same way as any otherDatamodel.Basic example:
This
ModelSerializeralso provides methods to easily transform a recordset into a corresponding datamodel, and vice-versa. Please read the (still very short) doc to have more info on how it works.I know there are no tests yet, but I will add them in case that the module is accepted.Test added! Not full yet, but quite complete