Files

23 lines
691 B
Python
Raw Permalink Normal View History

2026-07-01 14:41:49 +07:00
# from odoo import http
# from odoo.http import request
#
#
# class SurveyController(http.Controller):
#
# @http.route()
# def fill(self, survey, *args, **kwargs):
# response = super().fill(survey, *args, **kwargs)
#
# # Inject JavaScript
# js_code = """
# <script>
# document.addEventListener('DOMContentLoaded', function() {
# console.log('Survey validation loaded');
# // ... your validation code here ...
# });
# </script>
# """
#
# # Inject before </body>
# response.set_data(response.get_data(as_text=True).replace('</body>', js_code + '</body>'))
# return response