def __init__(self, user, skip=None, *args, **kwargs):
        if skip is None:
            skip = []
        super(EquityFilterForm, self).__init__(*args, **kwargs)

        if 'purchase_date_from' in skip:
            del self.fields['purchase_date_from']
        else:
            self.fields['purchase_date_from'] = forms.DateField(label="Purchase Date From:",
                                                                required=False)
            self.fields['purchase_date_from'].widget.attrs.update(
                {'class': 'datepicker'})
            self.fields['purchase_date_from'].label = _("Purchase Date From")

        if 'purchase_date_to' in skip:
            del self.fields['purchase_date_to']
        else:
            self.fields['purchase_date_to'] = forms.DateField(
                label="Purchase Date To:", required=False)
            self.fields['purchase_date_to'].widget.attrs.update(
                {'class': 'datepicker'})
            self.fields['purchase_date_to'].label = _("Purchase Date To")

        if 'equity_type' in skip:
            del self.fields['equity_type']
        else:
            self.fields['equity_type'].label = _("Equity Type")
            self.fields['equity_type'].help_text = ""
            self.fields['equity_type'].required = False

        if 'issuer' in skip:
            del self.fields['issuer']
        else:
            self.fields['issuer'].queryset = Object.filter_permitted(
                user, Contact.objects)
            self.fields['issuer'].label = _("Issuer")
            self.fields['issuer'].help_text = ""
            self.fields['issuer'].required = False
            self.fields['issuer'].widget.attrs.update({'class': 'autocomplete',
                                                       'callback': reverse('identities_ajax_contact_lookup')})

        if 'owner' in skip:
            del self.fields['owner']
        else:
            self.fields['owner'].queryset = Object.filter_permitted(
                user, Contact.objects)
            self.fields['owner'].required = False
            self.fields['owner'].label = _("Owner")
            self.fields['owner'].help_text = ""
            self.fields['owner'].widget.attrs.update({'class': 'autocomplete',
                                                      'callback': reverse('identities_ajax_contact_lookup')})
dataset/ETHPy150Open treeio/treeio/treeio/finance/forms.py/EquityFilterForm.__init__/original