From b6438d75cc50fc7e9184289d356240ea3aa97848 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 18 Mar 2016 13:33:01 +0100 Subject: [PATCH] [FIX] pass current context to create popup --- .../static/src/js/web_widget_one2many_tags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js b/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js index 7540ee3e..bdb3e5ae 100755 --- a/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js +++ b/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js @@ -22,10 +22,10 @@ openerp.web_widget_one2many_tags = function(instance) result.ext.arrow = { onArrowClick: function(e) { - var context = {}, + var context = self.build_context(), key = _.str.sprintf( 'default_%s', self.field.relation_field) - context[key] = self.field_manager.datarecord.id; + context.add({[key]: self.field_manager.datarecord.id}); self._search_create_popup('form', undefined, context); }, }