diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py index 5abd389d04..90abf39dc3 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -477,8 +477,8 @@ class Many2One(WidgetInterface): return False screen = Screen(self.attrs['relation'], self._window) screen.load([obj_id]) - act['domain'] = screen.current_model.expr_eval(act.get('domain', []), - check_load=False) + act['domain'] = str(screen.current_model.expr_eval(act.get('domain', []), + check_load=False)) act['context'] = str(screen.current_model.expr_eval( act.get('context', {}), check_load=False)) data['model'] = self.model_type diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index b25241361c..2a2fdb4e2b 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -446,10 +446,13 @@ class ViewList(ParserView): screen = Screen(self.screen.fields[path[1].name]['relation'], self.window) screen.load([value]) - act['domain'] = screen.current_model.expr_eval(act['domain'], - check_load=False) - act['context'] = str(screen.current_model.expr_eval(act['context'], + act['domain'] = str(screen.current_model.expr_eval(act.get('domain', []), + check_load=False)) + act['context'] = str(screen.current_model.expr_eval(act.get('context', {}), check_load=False)) + data['model'] = self.screen.name + data['id'] = value + data['ids'] = [value] return Action._exec_action(act, self.window, data, context) def click_and_action(self, atype, value, path):