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

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?

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

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you...

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 21
8794
2
thg 8 25
6420
1
thg 6 22
8391
1
thg 9 21
3264
0
thg 8 21
95