Reviewers: udono, timitos3000, ced,
Please review this at http://codereview.tryton.org/674002/
Affected files:
M tryton/gui/window/view_form/view/list_gtk/parser.py
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
@@ -518,8 +518,8 @@
def value_from_text(self, record, text, callback=None):
field = record.group.fields[self.field_name]
- if not text and not field.get_state_attrs(
- record)['required']:
+ if not text:
+ field.set_client(record, (False, ''))
if callback:
callback()
return False
@@ -527,11 +527,7 @@
relation = record[self.field_name].attrs['relation']
domain = record[self.field_name].domain_get(record)
context = record[self.field_name].context_get(record)
- if text:
- dom = [('rec_name', 'ilike', '%' + text + '%'),
- domain]
- else:
- dom = domain
+ dom = [('rec_name', 'ilike', '%' + text + '%'), domain]
args = ('model', relation, 'search', dom, 0, None, None,
context)
try:
@@ -539,7 +535,7 @@
except TrytonServerError, exception:
ids = common.process_exception(exception, *args)
if not ids:
- field.set_client(record, '???')
+ field.set_client(record, (False, ''))
if callback:
callback()
return
--
--
[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.