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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 533
    Comment on it

    If you want to widget parents and Children in OpenERP(Odoo) follow the below mentioned code and paste it in your wizard .js file:

    1. local.HomePage = instance.Widget.extend({
    2. start: function() {
    3. var greeting = new local.GreetingsWidget(this);
    4. greeting.appendTo(this.$el);
    5. console.log(this.getChildren()[0].$el);
    6. // will print "div.oe_petstore_greetings" in the console
    7. },
    8. });

    Note- The first argument is this, which in that case was a Home-Page instance. This tells the widget being created which other widget is its parent.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: