[FIX] form.destroy() doesn't clean up buttons area
authorHolger Brunn <hbrunn@therp.nl>
Mon, 21 Jul 2014 08:04:46 +0000 (10:04 +0200)
committerHolger Brunn <hbrunn@therp.nl>
Mon, 21 Jul 2014 08:04:46 +0000 (10:04 +0200)
addons/web/static/src/js/view_form.js

index 6237fe3..3897b4e 100644 (file)
@@ -147,6 +147,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
             this.$el.off('.formBlur');
         }
         this._super();
+        if (this.$buttons) {
+            this.$buttons.remove();
+        }
     },
     load_form: function(data) {
         var self = this;