Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Display Content in odoo9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 258
    Comment on it

    As in my previous blog display content in OpenERP/Odoo the same process will we followed for odoo9, and they are:-

    Widgets have a number of methods and features, but the basics are simple:
    1. set up a widget
    2. format the widget's data
    3. display the widget
    The HomePage widget already has a start() method. That method is part of the normal widget lifecycle and automatically called once the widget is inserted in the page. It is used to display some content.
    All widgets have a $el which represents the section of page they're in charge of (as a jQuery object). Widget content should be inserted there. By default, $el is an empty element.
    A element is usually invisible to the user if it has no content (or without specific styles giving it a size) which is why nothing is displayed on the page when HomePage is launched.
    For example code is below.

    local.HomePage = instance.Widget.extend({
        start: function() {
            this.$el.append("
    Hello dear Odoo user!
    "); }, });

    Note-Display content  refresh the javascript code loaded in Odoo Web, you will need to reload the page. There is no need to restart the Odoo server.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: