'Determine field parameter attributes.'

def _setup_attrs(self, model, name):

    attrs = {}
    if (not (self.args.get('automatic') or self.args.get('manual'))):
        for field in reversed(resolve_mro(model, name, self._can_setup_from)):
            attrs.update(field.args)
    attrs.update(self.args)
    attrs['args'] = self.args
    attrs['model_name'] = model._name
    attrs['name'] = name
    if attrs.get('compute'):
        attrs['store'] = attrs.get('store', False)
        attrs['copy'] = attrs.get('copy', False)
        attrs['readonly'] = attrs.get('readonly', (not attrs.get('inverse')))
    if attrs.get('related'):
        attrs['store'] = attrs.get('store', False)
        attrs['copy'] = attrs.get('copy', False)
    if attrs.get('company_dependent'):
        attrs['store'] = False
        attrs['copy'] = attrs.get('copy', False)
        attrs['default'] = self._default_company_dependent
        attrs['compute'] = self._compute_company_dependent
        if (not attrs.get('readonly')):
            attrs['inverse'] = self._inverse_company_dependent
        attrs['search'] = self._search_company_dependent
    if attrs.get('sparse'):
        attrs['store'] = False
        attrs['copy'] = attrs.get('copy', False)
        attrs['compute'] = self._compute_sparse
        if (not attrs.get('readonly')):
            attrs['inverse'] = self._inverse_sparse
    self.set_all_attrs(attrs)
    for (key1, key2) in RENAMED_ATTRS:
        if (key1 in attrs):
            _logger.warning('Field    %s:    parameter    %r    is    no    longer    supported;    use    %r    instead.', self, key1, key2)
    if ((not (self.store and self.column_type)) or self.manual or self.deprecated):
        self.prefetch = False
    if ((not self.string) and (not self.related)):
        self.string = name.replace('_', '    ').capitalize()
    if (self.default is not None):
        value = self.default
        self.default = (value if callable(value) else (lambda model: value))
