The rule may depend on indirect field written latter so it must be checked after the storage of those fields. On write, the rule must be checked before the modification but also after to ensure users do not generate records that they can not modify after. issue7403 review53301002
17 lines
420 B
Python
17 lines
420 B
Python
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
# this repository contains the full copyright notices and license terms.
|
|
from trytond.model import ModelSQL, fields
|
|
from trytond.pool import Pool
|
|
|
|
|
|
class TestRule(ModelSQL):
|
|
"Test Rule"
|
|
__name__ = 'test.rule'
|
|
field = fields.Char("Field")
|
|
|
|
|
|
def register(module):
|
|
Pool.register(
|
|
TestRule,
|
|
module=module, type_='model')
|