Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use display content in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 251
    Comment on it

    We have two methods and features to display content.
    1-format the widget's data
    2-display the widget
    The HomePage widget already has a start() method. This method is part of the normal widget lifecycle and it is automatically called once the widget is inserted in the page. We can use this method to display some content.
    All widgets have a sel which represents the section of page they're in charge of (as a jQuery object). Widget content should be inserted there. By default, sel is an empty element.
    An 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.
    And add some content to the widget's root element, using jQuery,code is below.

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

    Note- This message will now appear when you open Pet Store Pet Store Home Page.

 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: