@ -65,6 +65,3 @@ class MyBaseModelForm(forms.ModelForm, _MySuperForm):
f = self.fields
if 'units' in f:
f['units'].widget = autocomplete_light.TextWidget('ACMeasure')
# if 'currency' in f:
# f['currency'].widget = autocomplete_light.TextWidget('ACCurrency')
@ -36,11 +36,6 @@ class AutocompleteCurrency(autocomplete_light.AutocompleteModelBase):
search_fields = ('name', '^abc_code')
# def choices_for_request(self):
# if not self.request.GET.get('q', '').strip():
# return self.choices.none()
# return super(AutocompleteCurrency, self).choices_for_request()
autocomplete_light.register(Country, AutocompleteWithEmptyWidget, name='ACCountry')
autocomplete_light.register(Currency, AutocompleteCurrency, name='ACCurrency')
@ -31,6 +31,7 @@ class FakturaForm(BaseModelForm):
_textarea = forms.Textarea(attrs={'cols': 80, 'rows': 3})
widgets = {
'doc_text': _textarea,
'currency': autocomplete_light.ChoiceWidget('ACCurrency'),
}