Don't set default value for on_change and set id

issue3487
review2501002
This commit is contained in:
Cédric Krier committed 2014-01-26 14:30:12 +01:00
1 parent 6663c2ef29
commit 2cd0da0d57
2 files changed
+6 -3

No files matched your search

+3 -1
View File
@@ -45,7 +45,9 @@ class SelectionMixin(object):
if 'relation' not in self.attrs:
change_with = self.attrs.get('selection_change_with') or []
key = record._get_on_change_args(change_with).items()
args = record._get_on_change_args(change_with)
del args['id']
key = args.items()
key.sort()
self.init_selection(tuple(key))
else:
+3 -2
View File
@@ -516,10 +516,11 @@ class Record(SignalEvent):
scope = values
for i in arg.split('.'):
if i not in scope:
scope = None
break
scope = scope[i]
res[arg] = scope
else:
res[arg] = scope
res['id'] = self.id
return res
def on_change(self, fieldname, attr):