import ocupacoes
import declaracoes
-class ContribuinteForm(form.StringForm):
- def __init__(self, name, attr, contribuinte):
- self.contribuinte = contribuinte
- self.attr = attr
- form.StringForm.__init__(self, name, self.contribuinte.get_campo_contribuinte(self.attr))
- def set_value(self, value):
- form.StringForm.set_value(self, value)
- self.contribuinte.set_campo_contribuinte(self.attr, value)
-
class Contribuinte:
def __init__(self, cpf):
irpf_dir = dirs.get_default_irpf_dir()
self.set_campo_contribuinte(attr, val)
def form(self):
- form = []
- form.append(ContribuinteForm("Nome", "nome", self))
- form.append(ocupacoes.OcupacaoForm(self))
+ f = []
+ f.append(form.AttrForm("Nome", "nome", self))
+ f.append(ocupacoes.OcupacaoForm(self))
for i in self.attributes:
- form.append(ContribuinteForm(i, i, self))
- return form
+ f.append(form.AttrForm(i, i, self))
+ return f
attributes = [
"nome",