From daab30b9d82504c2e30d693e16c8f2459af33df0 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Tue, 12 Dec 2023 09:01:46 +0100 Subject: [PATCH] [FIX] rest_log: log result in case success --- rest_log/README.rst | 23 +++++---- rest_log/components/service.py | 2 +- rest_log/static/description/index.html | 66 +++++++++++++------------- rest_log/views/rest_log_views.xml | 2 +- 4 files changed, 49 insertions(+), 44 deletions(-) diff --git a/rest_log/README.rst b/rest_log/README.rst index 72a6377f..9be31c09 100644 --- a/rest_log/README.rst +++ b/rest_log/README.rst @@ -2,10 +2,13 @@ REST Log ======== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c4d8f6d63c3748741d5306c2b4327785eaec0a0c9770397ef4610266c515d0f2 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ REST Log :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github - :target: https://github.com/OCA/rest-framework/tree/15.0/rest_log + :target: https://github.com/OCA/rest-framework/tree/16.0/rest_log :alt: OCA/rest-framework .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-0-rest_log + :target: https://translation.odoo-community.org/projects/rest-framework-16-0/rest-framework-16-0-rest_log :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/271/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| When exposing REST services is often useful to see what's happening especially in case of errors. @@ -90,8 +93,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -140,6 +143,6 @@ Current `maintainer `__: |maintainer-simahawk| -This module is part of the `OCA/rest-framework `_ project on GitHub. +This module is part of the `OCA/rest-framework `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/rest_log/components/service.py b/rest_log/components/service.py index 3c1751c9..354bfe17 100644 --- a/rest_log/components/service.py +++ b/rest_log/components/service.py @@ -74,7 +74,7 @@ def _log_dispatch_success(self, method_name, result, *args, params=None): try: with self.env.cr.savepoint(): log_entry = self._log_call_in_db( - self.env, request, method_name, *args, params + self.env, request, method_name, *args, params, result=result ) if log_entry and not isinstance(result, Response): log_entry_url = self._get_log_entry_url(log_entry) diff --git a/rest_log/static/description/index.html b/rest_log/static/description/index.html index 9fce1a72..8cd6a83e 100644 --- a/rest_log/static/description/index.html +++ b/rest_log/static/description/index.html @@ -1,20 +1,20 @@ - + - + REST Log