mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 03:32:00 +02:00
18.0 vanilla
This commit is contained in:
parent
d72e748793
commit
0a7ae8db93
337 changed files with 399651 additions and 232598 deletions
|
|
@ -238,6 +238,8 @@ def get_expression_field_names(expression):
|
|||
ignore 'parent.truc' and 'parent.truc.id')
|
||||
:return: set(str)
|
||||
"""
|
||||
if not expression:
|
||||
return set()
|
||||
item_ast = ast.parse(expression.strip(), mode='eval').body
|
||||
contextual_values = _get_expression_contextual_values(item_ast)
|
||||
|
||||
|
|
@ -304,14 +306,12 @@ def relaxng(view_type):
|
|||
return _relaxng_cache[view_type]
|
||||
|
||||
|
||||
@validate('calendar', 'graph', 'pivot', 'search', 'tree', 'activity')
|
||||
@validate('calendar', 'graph', 'pivot', 'search', 'list', 'activity')
|
||||
def schema_valid(arch, **kwargs):
|
||||
""" Get RNG validator and validate RNG file."""
|
||||
validator = relaxng(arch.tag)
|
||||
if validator and not validator.validate(arch):
|
||||
result = True
|
||||
for error in validator.error_log:
|
||||
_logger.warning(tools.ustr(error))
|
||||
result = False
|
||||
return result
|
||||
_logger.warning("%s", error)
|
||||
return False
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue