[IMP] fields: infer required=True on related fields
authorRaphael Collet <rco@openerp.com>
Thu, 23 Oct 2014 07:46:04 +0000 (09:46 +0200)
committerRaphael Collet <rco@openerp.com>
Thu, 23 Oct 2014 08:28:13 +0000 (10:28 +0200)
commitba1369fbef17cee5e61cf37fe00e8fefd22f4256
tree5f72a8fc299ba70936323686adf837678e7704ff
parent0873613767747454b97ce0edc9cb0ce7c7067185
[IMP] fields: infer required=True on related fields

One can infer related=True on a non-stored related field if all fields on the
path are related.  This cannot be done if the related field is stored: when you
create a record, the database row is created first, and the related field is
computed and stored afterwards.  Making the field required in that case would
trigger a non-null constraint violation.
openerp/fields.py