Use same modified value as on_change for pre_validate
The value sent for pre_validation will be used to instanciate a record in the same way as on_change. It is also better to get the id also for pre_validate. review3211002
This commit is contained in:
1 parent
f05a13b742
commit
490d4df18d
1 file changed
+3
-1
@@ -281,7 +281,9 @@ class Record(SignalEvent):
|
||||
return result
|
||||
|
||||
def pre_validate(self):
|
||||
values = self.get()
|
||||
if not self.modified_fields:
|
||||
return True
|
||||
values = self._get_on_change_args(self.modified_fields)
|
||||
try:
|
||||
RPCExecute('model', self.model_name, 'pre_validate', values,
|
||||
main_iteration=False, context=self.context_get())
|
||||
|
||||
Reference in new issue
Block a user