Since odoo/odoo@04e972660b The session `modified` flag has been renamed `is_dirty`. However, it has not been renamed correctly in these three different places. The goal to set `modified` at this three places is to force the session to be saved, for instance because a mutable (a list or a dict) contained in the session was modified, but not the dict of the session itself, therefore `modified` is not flagged automatically. As the flag `modified` has not been renamed to `is_dirty`, a key/value `modified: True` was actually assigned to the session dict, and saved in file. The behavior to save the session in these three places was kept, as one key/value of the session has been changed, but by the way to assign a new value in the session file, which is not ideal. It's better to assign the correct flag to avoid setting a new key/value in the session for no reason. closes odoo/odoo#118719 X-original-commit: b6f4a27f2d95d5bc5510f4da50132ab66d8c86aa Signed-off-by: Julien Castiaux (juc) <juc@odoo.com> Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
13 lines
348 B
Python
13 lines
348 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import http
|
|
from odoo.http import request
|
|
|
|
|
|
class HrAttendance(http.Controller):
|
|
@http.route('/hr_attendance/kiosk_keepalive', auth='user', type='json')
|
|
def kiosk_keepalive(self):
|
|
request.session.touch()
|
|
return {}
|