-
Notifications
You must be signed in to change notification settings - Fork 3
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
[3929][4742][ADD] restful #117
Conversation
06e7f31
to
07ac8b5
Compare
a134d65
to
3d5a270
Compare
@@ -154,7 +154,7 @@ def post(self, model=None, id=None, **payload): | |||
request.env.cr.rollback() | |||
return invalid_response("params", e) | |||
else: | |||
data = resource.read(fields=fields) | |||
data = {"id": resource.id} |
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.
For this particular case, I do not feel very comfortable with simply overriding the code. Can we instead comment out the original line, and state the reason of the change, marking it as our local fix.
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.
@AungKoKoLin1997 Please organize the commits, with the first commit untouched from the original code, assigning proper commit messages.
This commit improves the code for handling the x-www-form-urlencoded content-type and passing parameters in the correct format. Before this commit, when calling an API with x-www-form-urlencoded and passing parameters, the fields could not adapt well if there were relational fields with record-related fields (e.g., many2one) because the parameters were passed as strings.
c1060a9
to
463ecdc
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.
Functional review.
3929
4742