Files
Odoo-Tutorial/weather_forecast/controllers/controllers.py
T
2025-04-16 10:07:51 +07:00

23 lines
835 B
Python

# -*- coding: utf-8 -*-
# from odoo import http
# class WeatherForecast(http.Controller):
# @http.route('/weather_forecast/weather_forecast', auth='public')
# def index(self, **kw):
# return "Hello, world"
# @http.route('/weather_forecast/weather_forecast/objects', auth='public')
# def list(self, **kw):
# return http.request.render('weather_forecast.listing', {
# 'root': '/weather_forecast/weather_forecast',
# 'objects': http.request.env['weather_forecast.weather_forecast'].search([]),
# })
# @http.route('/weather_forecast/weather_forecast/objects/<model("weather_forecast.weather_forecast"):obj>', auth='public')
# def object(self, obj, **kw):
# return http.request.render('weather_forecast.object', {
# 'object': obj
# })