Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
2931 Visualizzazioni

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})

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 19
3139
0
giu 16
4002
0
mar 15
3414
0
mar 15
4494
1
apr 22
5255