'Form processor'

def save(self):

    fields = self.fields
    try:
        for field in fields:
            if self.cleaned_data[field]:
                if (field == 'default_currency'):
                    ModuleSetting.set_for_module('default_currency', self.cleaned_data['default_currency'], 'treeio.sales')
                    currency = Currency.objects.get(pk=self.cleaned_data['default_currency'])
                    currency.is_default = True
                    currency.save()
                else:
                    ModuleSetting.set_for_module(field, self.cleaned_data[field].id, 'treeio.sales')
        return True
    except:
        return False
