diff options
| author | Joren Van Onder <jov@odoo.com> | 2019-08-26 12:02:10 -0700 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2019-08-26 12:02:10 -0700 |
| commit | 8bfeedb6711a19b6d96fd7ce7d39ba64a95511b2 (patch) | |
| tree | 5e4d98c15892b4003df4548f898eed728be29cde | |
| parent | ee61c993cb4ee22c5c66ee096973ce4e3b0deb05 (diff) | |
[IMP] pos_adyen: reduce logging noise
Adyen notifies us every time the screen on a terminal changes
etc. Let's only log the requests we will process.
| -rw-r--r-- | addons/pos_adyen/controllers/main.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/pos_adyen/controllers/main.py b/addons/pos_adyen/controllers/main.py index ae74c58fba2..ec988da38d6 100644 --- a/addons/pos_adyen/controllers/main.py +++ b/addons/pos_adyen/controllers/main.py @@ -12,13 +12,12 @@ class PosAdyenController(http.Controller): @http.route('/pos_adyen/notification', type='json', methods=['POST'], auth='none', csrf=False) def notification(self): data = json.loads(request.httprequest.data) - _logger.info('notification received from adyen:\n%s', pprint.pformat(data)) # ignore if it's not a response to a sales request if not data.get('SaleToPOIResponse'): - _logger.info('ignoring notification because it\'s not a SaleToPOIResponse') return + _logger.info('notification received from adyen:\n%s', pprint.pformat(data)) terminal_identifier = data['SaleToPOIResponse']['MessageHeader']['POIID'] payment_method = request.env['pos.payment.method'].sudo().search([('adyen_terminal_identifier', '=', terminal_identifier)], limit=1) |
