'Form processor'

def save(self):

    try:
        ModuleSetting.set_for_module('my_company', self.cleaned_data['my_company'].id, 'treeio.finance')
        ModuleSetting.set_for_module('default_account', self.cleaned_data['default_account'].id, 'treeio.finance')
        currency = Currency.objects.get(pk=self.cleaned_data['default_currency'])
        currency.is_default = True
        currency.save()
        return True
    except Exception:
        return False
