diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index b6b90919ea..9fc81d3af6 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -91,11 +91,11 @@ class Form(SignalEvent, TabContent): return (self.model == model and self.res_id == attributes.get('res_id') and self.attributes.get('domain') == attributes.get('domain') - and (self.attributes.get('mode') or []) == ( - attributes.get('mode') or []) and self.attributes.get('view_ids') == attributes.get('view_ids') - and self.attributes.get('context') == attributes.get('context') - and self.attributes.get('limit') == attributes.get('limit') + and (attributes.get('view_ids') + or (self.attributes.get('mode') or ['tree', 'form']) == ( + attributes.get('mode') or ['tree', 'form'])) + and self.screen.local_context == attributes.get('context') and self.attributes.get('search_value') == ( attributes.get('search_value'))) diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py index 18ed43642c..0f26271b90 100644 --- a/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/gui/window/view_form/screen/screen.py @@ -257,7 +257,9 @@ class Screen(SignalEvent): self.context_screen.display(set_cursor=True) return False context = self.local_context - context.update(self.context_screen.get_on_change_value()) + screen_context = self.context_screen.get_on_change_value() + screen_context.pop('id') + context.update(screen_context) self.new_group(context) domain = self.search_domain(search_string, True)