Skip to content
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

Merged
merged 3 commits into from
Aug 6, 2024
Merged

[3929][4742][ADD] restful #117

merged 3 commits into from
Aug 6, 2024

Conversation

AungKoKoLin1997
Copy link
Contributor

@AungKoKoLin1997 AungKoKoLin1997 commented Feb 7, 2024

@@ -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}
Copy link
Member

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.

@yostashiro yostashiro changed the title [3929][ADD] restful [3929][4742][ADD] restful Jul 25, 2024
Copy link
Member

@yostashiro yostashiro left a 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.
Copy link
Contributor

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review.

@kanda999 kanda999 merged commit b54e67e into 15.0 Aug 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants