diff --git a/tryton/common/selection.py b/tryton/common/selection.py index e7b79472bf..63811380e8 100644 --- a/tryton/common/selection.py +++ b/tryton/common/selection.py @@ -45,7 +45,9 @@ class SelectionMixin(object): if 'relation' not in self.attrs: change_with = self.attrs.get('selection_change_with') or [] - key = record._get_on_change_args(change_with).items() + args = record._get_on_change_args(change_with) + del args['id'] + key = args.items() key.sort() self.init_selection(tuple(key)) else: diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 312d0219d8..4c5012b7b0 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -516,10 +516,11 @@ class Record(SignalEvent): scope = values for i in arg.split('.'): if i not in scope: - scope = None break scope = scope[i] - res[arg] = scope + else: + res[arg] = scope + res['id'] = self.id return res def on_change(self, fieldname, attr):