Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
5057 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

Thank you...

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Mai 21
8776
2
Aug. 25
6413
1
Juni 22
8390
1
Sept. 21
3260
0
Aug. 21
95