oca-ocb-accounting/odoo-bringout-oca-ocb-account/account/controllers/tests_shared_js_python.py
Ernad Husremovic 768b70e05e 19.0 vanilla
2026-03-09 09:30:07 +01:00

16 lines
721 B
Python

import json
from odoo import http
from odoo.http import request
class TestsSharedJsPython(http.Controller):
@http.route('/account/init_tests_shared_js_python', type='http', auth='user', website=True)
def route_init_tests_shared_js_python(self):
tests = json.loads(request.env['ir.config_parameter'].get_param('account.tests_shared_js_python', '[]'))
return request.render('account.tests_shared_js_python', {'props': {'tests': tests}})
@http.route('/account/post_tests_shared_js_python', type='jsonrpc', auth='user')
def route_post_tests_shared_js_python(self, results):
request.env['ir.config_parameter'].set_param('account.tests_shared_js_python', json.dumps(results or []))