All the scripts that should validate the workflow transitions should be well defined.
It is very important to do checks during the validation step to ensure
that all data is consistent and that everything is well defined. Checking the
consistency of the data in ERP5 is done on user action workflow transitions
and not when entering data.
"Permanent" checks have to be implemented in constraints. Permanent checks are
checks that should apply at any time, for example that an order has a source
and a destination. The workflow script only have to call sci['object'].Base_checkConsistency()
to perform constraint based checks.
"Temporary" checks have to be implemented in the workflow script. Temporary
checks are checks that should only apply when we try to do the action,
for example that client information is valid at the time we send an invoice.