[FIX] fields: related fields should not be copied by default

This commit is contained in:
Raphael Collet
2015-01-29 14:43:50 +01:00
parent c49d20c61a
commit f650522bbf
+2 -1
View File
@@ -317,8 +317,9 @@ class Field(object):
attrs['copy'] = attrs.get('copy', False)
attrs['readonly'] = attrs.get('readonly', not attrs.get('inverse'))
if attrs.get('related'):
# by default, related fields are not stored
# by default, related fields are not stored and not copied
attrs['store'] = attrs.get('store', False)
attrs['copy'] = attrs.get('copy', False)
# fix for function fields overridden by regular columns
if not isinstance(attrs.get('column'), (NoneType, fields.function)):