21 lines
735 B
Python
21 lines
735 B
Python
from odoo import http
|
|
from odoo.addons.base import controllers
|
|
from odoo.tools import config
|
|
from werkzeug.exceptions import NotFound
|
|
from odoo.http import request
|
|
import os
|
|
class Documentation(http.Controller):
|
|
|
|
@http.route('/documentation', auth='public', cache=3600)
|
|
def serve_static_html(self):
|
|
# Get absolute path to your HTML file
|
|
module = '/root/dev/NextERP/dev/odoo18/Odoo18/exercise/documentation'
|
|
resource_path = 'static/html/18.0/index.html'
|
|
file_path = os.path.join(module, resource_path)
|
|
|
|
with open(file_path, 'r') as f:
|
|
content = f.read()
|
|
|
|
return request.make_response(content, [
|
|
('Content-Type', 'text/html'),
|
|
]) |