Reviewers: ,


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

Affected files:
  M CHANGELOG
  M trytond/model/model.py


Index: CHANGELOG
===================================================================

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,4 @@
+* Add group call to on_change_with
 * Add support of fields.Time
 * Replace nested view by reference id
 * Remove underscore to ir.translation methods

Index: trytond/model/model.py
===================================================================

--- a/trytond/model/model.py
+++ b/trytond/model/model.py
@@ -71,6 +71,7 @@
         self._rpc = {
             'default_get': False,
             'fields_get': False,
+            'on_change_with': False,
         }
         self._inherit_fields = []
         self._error_messages = {}
@@ -616,3 +617,10 @@
                 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



--
[email protected] mailing list

Reply via email to