Reviewers: ,
Please review this at http://codereview.tryton.org/686002/
Affected files:
M tryton/gui/window/view_form/model/group.py
M tryton/gui/window/view_form/model/record.py
Index: tryton/gui/window/view_form/model/group.py
===================================================================
--- a/tryton/gui/window/view_form/model/group.py
+++ b/tryton/gui/window/view_form/model/group.py
@@ -206,7 +206,7 @@
for fnct in self.on_write:
try:
res += RPCExecute('model', self.model_name, fnct, ids,
- context=self.context)
+ main_iteration=False, context=self.context)
except RPCException:
return []
return list({}.fromkeys(res))
@@ -395,7 +395,7 @@
if len(new) and len(to_add):
try:
values = RPCExecute('model',
self.model_name, 'default_get',
- to_add.keys(), context=self.context)
+ to_add.keys(), main_iteration=False,
context=self.context)
except RPCException:
return False
for name in to_add:
Index: tryton/gui/window/view_form/model/record.py
===================================================================
--- a/tryton/gui/window/view_form/model/record.py
+++ b/tryton/gui/window/view_form/model/record.py
@@ -257,7 +257,7 @@
values = self.get()
try:
RPCExecute('model', self.model_name, 'pre_validate', values,
- context=self.context_get())
+ main_iteration=False, context=self.context_get())
except RPCException:
return False
return True
@@ -268,7 +268,8 @@
value = self.get()
try:
res, = RPCExecute('model', self.model_name, 'create',
- [value], context=self.context_get())
+ [value], main_iteration=False,
+ context=self.context_get())
except RPCException:
return False
old_id = self.id
@@ -282,7 +283,8 @@
context['_timestamp'] = self.get_timestamp()
try:
RPCExecute('model', self.model_name, 'write',
- [self.id], value, context=context)
+ [self.id], value, main_iteration=False,
+ context=context)
except RPCException:
return False
self._loaded.clear()
@@ -316,7 +318,7 @@
reload_ids = list(reload_ids)
try:
RPCExecute('model', record.model_name, 'delete',
list(record_ids),
- context=ctx)
+ main_iteration=False, context=ctx)
except RPCException:
return False
if reload_ids:
@@ -327,7 +329,8 @@
if len(self.group.fields):
try:
vals = RPCExecute('model', self.model_name, 'default_get',
- self.group.fields.keys(), context=self.context_get())
+ self.group.fields.keys(), main_iteration=False,
+ context=self.context_get())
except RPCException:
return
if (self.parent
@@ -348,7 +351,8 @@
def rec_name(self):
try:
return RPCExecute('model', self.model_name, 'read', [self.id],
- ['rec_name'], context=self.context_get())[0]['rec_name']
+ ['rec_name'], main_iteration=False,
+ context=self.context_get())[0]['rec_name']
except RPCException:
return ''
@@ -495,8 +499,9 @@
attr = PYSONDecoder().decode(attr)
args = self._get_on_change_args(attr)
try:
- res = RPCExecute('model', self.model_name,
- 'on_change_' + fieldname, args, context=self.context_get())
+ res = RPCExecute('model', self.model_name, 'on_change_' +
+ fieldname, args, main_iteration=False,
+ context=self.context_get())
except RPCException:
return
self.set_on_change(res)
@@ -527,7 +532,8 @@
if fieldnames:
try:
result = RPCExecute('model',
self.model_name, 'on_change_with',
- values, list(fieldnames), context=self.context_get())
+ values, list(fieldnames), main_iteration=False,
+ context=self.context_get())
except RPCException:
return
self.set_on_change(result)
@@ -538,7 +544,7 @@
try:
result = RPCExecute('model', self.model_name,
'on_change_with_' + fieldname, values,
- context=self.context_get())
+ main_iteration=False, context=self.context_get())
except RPCException:
return
self.group.fields[fieldname].set_on_change(self, result)
@@ -556,7 +562,8 @@
args = self._get_on_change_args(autocomplete)
try:
res = RPCExecute('model', self.model_name, 'autocomplete_' +
- fieldname, args, context=self.context_get())
+ fieldname, args, main_iteration=False,
+ context=self.context_get())
except RPCException:
# ensure res is a list
res = []
@@ -571,7 +578,7 @@
'search_count', [
('resource', '=',
'%s,%s' % (self.model_name, self.id)),
- ])
+ ], main_iteration=False)
except RPCException:
return 0
return self.attachment_count
--
--
[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.