Add grouped calls to on_change_with
review251001
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add group call to on_change_with
|
||||
* Allow to get fuzzy translation
|
||||
* Allow to customize server timezone
|
||||
* Add richtext widget for WYSIWYG editor
|
||||
|
||||
@@ -71,6 +71,7 @@ class Model(WarningErrorMixin, URLMixin):
|
||||
self._rpc = {
|
||||
'default_get': False,
|
||||
'fields_get': False,
|
||||
'on_change_with': False,
|
||||
}
|
||||
self._inherit_fields = []
|
||||
self._error_messages = {}
|
||||
@@ -616,3 +617,10 @@ class Model(WarningErrorMixin, URLMixin):
|
||||
if i not in fields_names:
|
||||
del res[i]
|
||||
return res
|
||||
|
||||
def on_change_with(self, fieldnames, values):
|
||||
changes = {}
|
||||
for fieldname in fieldnames:
|
||||
changes[fieldname] = getattr(self,
|
||||
'on_change_with_%s' % fieldname)(values)
|
||||
return changes
|
||||
|
||||
Reference in New Issue
Block a user