add documentation

This commit is contained in:
2025-02-24 16:51:43 +07:00
parent 04c547c90f
commit 8d11a4ec6f
15037 changed files with 5902106 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
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'),
])