Skip to content
Xavier Brochard edited this page Oct 29, 2021 · 1 revision

Conflict:

diff --cc addons/web/static/src/js/view_form.js
index a926ad1,52ad15f..0000000
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@@ -4391,12 -4391,12 +4391,19 @@@ instance.web.form.One2ManyViewManager 
  });
  
  instance.web.form.One2ManyDataSet = instance.web.BufferedDataSet.extend({
-     get_context: function() {
+     get_context: function(extra_context) {
          this.context = this.o2m.build_context();
++<<<<<<< HEAD
 +        var self = this;
 +        _.each(arguments, function(context) {
 +            self.context.add(context);
 +        });
++=======
+         if(extra_context)
+         {
+             this.context.add(extra_context);
+         }
++>>>>>>> odoo/8.0
          return this.context;
      }
  });

Resolved as:

diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index a926ad1..a66ed59 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4391,12 +4391,12 @@ instance.web.form.One2ManyViewManager = instance.web.ViewManager.extend({
 });
 
 instance.web.form.One2ManyDataSet = instance.web.BufferedDataSet.extend({
-    get_context: function() {
+    get_context: function(extra_context) {
         this.context = this.o2m.build_context();
-        var self = this;
-        _.each(arguments, function(context) {
-            self.context.add(context);
-        });
+        if(extra_context)
+        {
+            this.context.add(extra_context);
+        }
         return this.context;
     }
 });

Which is simply taking over @mart-e's suggestion from https://github.com/odoo/odoo/pull/4899

Committed as https://github.com/OCA/OCB/commit/a1f2b2b9b010cd71b97290ddf276894db18a328b by @hbrunn