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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 445
    Comment on it

    If you display content to your users, you should also be able to erase it. This is done via the destroy() method.

    greeting.destroy();

    First thing you see on destruction of a widget is calling destroy() on all its children. Then comes removal of itself from the DOM. In order to override destroy(), you need to set up permanent structures in init() or start(), however always remember to clean up since the garbage collector does not look after them.

    Note- when overriding destroy(), _super() must always be called otherwise the widget and its children are not correctly cleaned up leaving possible memory.

 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: