def __init__(self, user, *args, **kwargs):
        super(SubscriptionForm, self).__init__(*args, **kwargs)

        del self.fields['cycle_end']

        self.fields['product'].queryset = Object.filter_permitted(
            user, Product.objects)
        self.fields['product'].label = _("Product")

        self.fields['client'].queryset = Object.filter_permitted(
            user, Contact.objects)
        self.fields['client'].widget.attrs.update({'class': 'autocomplete',
                                                   'callback': reverse('identities_ajax_contact_lookup')})
        self.fields['client'].widget.attrs.update(
            {'popuplink': reverse('identities_contact_add')})
        self.fields['client'].label = _("Client")

        self.fields['start'].widget.attrs.update({'class': 'datepicker'})
        self.fields['start'].label = _("Start")
        self.fields['expiry'].widget.attrs.update({'class': 'datepicker'})
        self.fields['expiry'].label = _("Expiry")

        if 'instance' in kwargs:
            self.instance = kwargs['instance']
            self.fields['start'].widget.attrs['readonly'] = True
            del kwargs['instance']

        self.fields['active'].initial = True
        self.fields['active'].label = _("Active")
        self.fields['cycle_period'].label = _("Cycle period")
        self.fields['details'].label = _("Details")
dataset/ETHPy150Open treeio/treeio/treeio/sales/forms.py/SubscriptionForm.__init__/original