How to call a website widget in ode

  • This is my file which contains the template 'website_fb.fb_shared_post'


  • Below code create website widget

    , so now if you call this widget

    then how to do it.
  • I am referring to the documentation Odoo

    but I don't understand anything for me, so please help me.

    var RenderTemplate = Widget.extend({
         template: 'website_fb.fb_shared_post',
         events: {
         // DO some code
        init: function (el) {
         // DO some code
        start: function () {
        // DO some code


source to share

1 answer

First, when you create the widget, it automatically renders above the XML file you specify in the first line, so below the line render another template xml of the template file

  $(Qweb.render("fb_shared_post", {'res':'Hello'})).prependTo('<TemplateDivID or Class>');




All Articles