Browse Source

Merge pull request #330 from hbrunn/8.0-web_widget_one2many-fix_create_defaults

[FIX] pass current context to create popup
pull/332/head
Pedro M. Baeza 9 years ago
parent
commit
8c167a5535
  1. 4
      web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js

4
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 = { result.ext.arrow = {
onArrowClick: function(e) onArrowClick: function(e)
{ {
var context = {},
var context = self.build_context(),
key = _.str.sprintf( key = _.str.sprintf(
'default_%s', self.field.relation_field) '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); self._search_create_popup('form', undefined, context);
}, },
} }

Loading…
Cancel
Save