[IMP] hw_drivers: Add action data in IoT events
Add all the request data in events triggered by IoT actions. closes odoo/odoo#61798 Taskid: 2320958 X-original-commit: a8c56602ba8301b6e901be7ffeaa219d77401f79 Related: odoo/enterprise#14763 Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import json
|
||||
from threading import Event
|
||||
import time
|
||||
|
||||
from odoo.http import request
|
||||
|
||||
class EventManager(object):
|
||||
def __init__(self):
|
||||
@@ -42,6 +44,7 @@ class EventManager(object):
|
||||
**device.data,
|
||||
'device_identifier': device.device_identifier,
|
||||
'time': time.time(),
|
||||
'request_data': json.loads(request.params['data']) if request else None,
|
||||
}
|
||||
self.events.append(event)
|
||||
for session in self.sessions:
|
||||
|
||||
Reference in New Issue
Block a user