Reviewers: ,


Please review this at http://codereview.tryton.org/655003/

Affected files:
  M tryton/gui/window/view_form/view/form_gtk/selection.py
  M tryton/gui/window/view_form/view/list_gtk/parser.py


Index: tryton/gui/window/view_form/view/form_gtk/selection.py
===================================================================

--- a/tryton/gui/window/view_form/view/form_gtk/selection.py
+++ b/tryton/gui/window/view_form/view/form_gtk/selection.py
@@ -53,12 +53,13 @@
             return

         domain = self.field.domain_get(record)
+        context = record[self.field_name].context_get(record)
         if domain == self._last_domain:
             return

         try:
result = RPCExecute('model', self.attrs['relation'], 'search_read',
-                domain, 0, None, None, ['rec_name'])
+                domain, 0, None, None, ['rec_name'], context=context)
         except RPCException:
             result = False
         if isinstance(result, list):

Index: tryton/gui/window/view_form/view/list_gtk/parser.py
===================================================================

--- a/tryton/gui/window/view_form/view/list_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/list_gtk/parser.py
@@ -782,13 +782,15 @@
             return
         field = record[self.field_name]
         domain = field.domain_get(record)
+        context = record[self.field_name].context_get(record)
         if str(domain) in self._domain_cache:
             self.selection = self._domain_cache[str(domain)]
             self._last_domain = domain
         if domain != self._last_domain:
             try:
                 result = RPCExecute('model', self.attrs['relation'],
-                    'search_read', domain, 0, None, None, ['rec_name'])
+                    'search_read', domain, 0, None, None, ['rec_name'],
+                    context=context)
             except RPCException:
                 result = None




--
--
[email protected] mailing list

--- You received this message because you are subscribed to the Google Groups "tryton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to