Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5091 Näkymät

How it is using when we  super a function?

With .qcontext how we can pass values to templates

What is the use of context and .qcontext in controller of odoo12?

Avatar
Hylkää
Paras vastaus

If any route is passing a value to the template and you want to update the value before passing it to the template, you can just override the route.

Now, question is how would you update the value since super returns the rendered template? Answer is, using qcontext you can update the value.

Context is something that stores the user related details like company, timezone, etc. Normally context is useful to pass any value in the ORM / user define methods.

Avatar
Hylkää
Tekijä

Thank you...

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
toukok. 21
8816
2
elok. 25
6436
1
kesäk. 22
8405
1
syysk. 21
3267
0
elok. 21
95