[MERGE] forward port of branch 7.0 up to 98c6e7c
[odoo/odoo.git] / addons / web / static / src / js / view_form.js
index d0951b6..96c821a 100644 (file)
@@ -2262,7 +2262,10 @@ instance.web.form.ReinitializeWidgetMixin =  {
 instance.web.form.ReinitializeFieldMixin =  _.extend({}, instance.web.form.ReinitializeWidgetMixin, {
     reinitialize: function() {
         instance.web.form.ReinitializeWidgetMixin.reinitialize.call(this);
-        this.view.render_value_defs.push(this.render_value());
+        var res = this.render_value();
+        if (this.view && this.view.render_value_defs){
+            this.view.render_value_defs.push(res);
+        }
     },
 });