- Add blank lines at end of python files (pep8) - Easier uncomment (entire blocks, and no remaining whitespaces in empty lines) - Add `_description` to model to avoid the warning telling it's missing - Correct compute field, `self.value` raised an `ensure_one` issue - Change access so the user can add/edit/delete records in the web interface by default - Correct the server action, `self` is not in the server action context. closes odoo/odoo#40659 X-original-commit: 622615771d0a6f8544f6810f30df46aea0e0fb9c Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
26 lines
804 B
Plaintext
26 lines
804 B
Plaintext
{%- set mod = name|snake -%}
|
|
{%- set model = "%s.%s"|format(mod, mod) -%}
|
|
{%- set root = "/%s/%s"|format(mod, mod) -%}
|
|
# -*- coding: utf-8 -*-
|
|
# from odoo import http
|
|
|
|
|
|
# class {{ mod|pascal }}(http.Controller):
|
|
# @http.route('{{ root }}/', auth='public')
|
|
# def index(self, **kw):
|
|
# return "Hello, world"
|
|
|
|
# @http.route('{{ root }}/objects/', auth='public')
|
|
# def list(self, **kw):
|
|
# return http.request.render('{{ mod }}.listing', {
|
|
# 'root': '{{ root }}',
|
|
# 'objects': http.request.env['{{ model }}'].search([]),
|
|
# })
|
|
|
|
# @http.route('{{ root }}/objects/<model("{{ model }}"):obj>/', auth='public')
|
|
# def object(self, obj, **kw):
|
|
# return http.request.render('{{ mod }}.object', {
|
|
# 'object': obj
|
|
# })
|
|
|