Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2947 Lượt xem

Hi, I need to know how to make any page of my site show the value of a variable that I am modifying from my controller, something like a persistent variable. Here I put what I have done.
in this case, although I put the path in '/', it never enters the method.

@http.route(['/servicios', '/'], type='http', auth='public', website=True)
def services(self, **kwargs):
    var1 = 'lolo'
    return request.render('modulo1.services', {'variable_persistente': var})

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

1- Odoo get web form or template value in controller: http://learnopenerp.blogspot.com/2018/06/odoo-get-web-form-template-value-in-controller.html

2- Odoo Web Controller: http://learnopenerp.blogspot.com/2018/08/odoo-web-controller.html
Hope this will helps you.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 19
3147
0
thg 6 16
4008
0
thg 3 15
3427
0
thg 3 15
4503
1
thg 4 22
5262