Disable record rule when validating records
issue9796 review329451002
This commit is contained in:
@@ -81,6 +81,14 @@ def without_check_access(func):
|
||||
return wrapper
|
||||
|
||||
|
||||
def without_rule(func):
|
||||
@wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
with Transaction().set_user(0):
|
||||
return func(*args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
|
||||
def cache_size():
|
||||
return Transaction().context.get('_record_cache_size', _cache_record)
|
||||
|
||||
@@ -1038,6 +1046,7 @@ class ModelStorage(Model):
|
||||
|
||||
@classmethod
|
||||
@without_check_access
|
||||
@without_rule
|
||||
def _validate(cls, records, field_names=None):
|
||||
pool = Pool()
|
||||
# Ensure that records are readable
|
||||
|
||||
Reference in New Issue
Block a user