Trust-Code / l10n-brazil

módulos básicos a baixar para uso do OpenERP no Brasil, serve de base para NFe, SPED etc...
http://www.openerpbrasil.org
13 stars 5 forks source link

erro ao selecionar o campo 'Estado' no cadastro de prospectos (l10n_br_crm) #60

Open JoaoPauloSouza opened 8 years ago

JoaoPauloSouza commented 8 years ago

estou recebendo os seguintes erros quando preencho o campo Estado, deixando o campo da inscrição estadual vazio:

quando seleciono um estado diferente (por ex Paraná) do da empresa cadastrada (São Paulo):

Traceback (most recent call last):
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 544, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 581, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 317, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 314, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 810, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 410, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/crm/crm_lead.py", line 943, in create
    return super(crm_lead, self).create(cr, uid, vals, context=create_context)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/mail/mail_thread.py", line 381, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 4122, in create
    record = self.browse(self._create(old_vals))
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 508, in new_api
    result = method(self._model, cr, uid, *args, **old_kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 4319, in _create
    recs._validate_fields(vals)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 1277, in _validate_fields
    check(self)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 443, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/home/odoo/public_html/odoo/custom/addons/l10n-brazil-trustcode/l10n_br_crm/models/crm_lead.py", line 90, in _check_ie
    raise ValidationError(u"Inscrição Estadual Invalida!")
ValidationError: ('ValidateError', u'Inscri\xe7\xe3o Estadual Invalida!')

quando seleciono o mesmo estado (São Paulo):

Traceback (most recent call last):
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 544, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 581, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 317, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 314, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 810, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/http.py", line 410, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/public_html/odoo/odoo-server/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/crm/crm_lead.py", line 943, in create
    return super(crm_lead, self).create(cr, uid, vals, context=create_context)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/addons/mail/mail_thread.py", line 381, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 4122, in create
    record = self.browse(self._create(old_vals))
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 508, in new_api
    result = method(self._model, cr, uid, *args, **old_kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 4319, in _create
    recs._validate_fields(vals)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/public_html/odoo/odoo-server/openerp/models.py", line 1281, in _validate_fields
    raise ValidationError("Error while validating constraint\n\n%s" % tools.ustr(e))
ValidationError: ('ValidateError', u"Error while validating constraint\n\n'bool' object has no attribute '__getitem__'")

módulos instalados: l10n_br_zip, l10n_br_crm_zip, l10n_br_crm, l10n_br_base

branch odoo : OCB

danimaribeiro commented 8 years ago

Não consegui reproduzir nenhum caso destes.