Skip to content

Commit

Permalink
[FIX] fields: inherited fields get their attribute 'state' from their…
Browse files Browse the repository at this point in the history
… base field
  • Loading branch information
rco-odoo committed Dec 2, 2014
1 parent 085e8e4 commit 591e329
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openerp/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ def _setup_related(self, env):
self._free_attrs.append(attr)
setattr(self, attr, getattr(field, attr))

# special case for states: copy it only for inherited fields
if not self.states and self.inherited:
self.states = field.states

# special case for required: check if all fields are required
if not self.store and not self.required:
self.required = all(field.required for field in fields)
Expand Down

0 comments on commit 591e329

Please sign in to comment.