[FIX][REF] Fix and refactoring IE validation.
[FIX][REF] Fix and refactoring IE validation.

OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil