Skip to content

Commit

Permalink
[FIX] fields: related fields should not be copied by default
Browse files Browse the repository at this point in the history
  • Loading branch information
rco-odoo committed Jan 29, 2015
1 parent c49d20c commit f650522
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openerp/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ def set_class_name(self, cls, name):
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)):
Expand Down

0 comments on commit f650522

Please sign in to comment.