تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5079 أدوات العرض

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?

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
الكاتب

Thank you...

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
مايو 21
8796
2
أغسطس 25
6422
1
يونيو 22
8391
1
سبتمبر 21
3264
0
أغسطس 21
95