Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5063 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Autor

Thank you...

Powiązane posty Odpowiedzi Widoki Czynność
3
maj 21
8786
2
sie 25
6417
1
cze 22
8390
1
wrz 21
3264
0
sie 21
95