Beispiel #1
0
    def _check_cnpj_cpf(self, cr, uid, ids):

        for inv_related in self.browse(cr, uid, ids):
            if not inv_related.cnpj_cpf:
                continue

            if inv_related.cpfcpnj_type == 'cnpj':
                if not fiscal.validate_cnpj(inv_related.cnpj_cpf):
                    return False
            elif not fiscal.validate_cpf(inv_related.cnpj_cpf):
                return False

        return True
Beispiel #2
0
    def _check_cnpj_cpf(self, cr, uid, ids):

        for partner in self.browse(cr, uid, ids):
            if not partner.cnpj_cpf:
                continue

            if partner.partner_name:
                if not fiscal.validate_cnpj(partner.cnpj_cpf):
                    return False
            elif not fiscal.validate_cpf(partner.cnpj_cpf):
                    return False

        return True
Beispiel #3
0
    def _check_cnpj_cpf(self, cr, uid, ids):

        for partner in self.browse(cr, uid, ids):
            if not partner.cnpj_cpf:
                continue

            if partner.partner_name:
                if not fiscal.validate_cnpj(partner.cnpj_cpf):
                    return False
            elif not fiscal.validate_cpf(partner.cnpj_cpf):
                return False

        return True
    def _check_cnpj_cpf(self, cr, uid, ids):

        for inv_related in self.browse(cr, uid, ids):
            if not inv_related.cnpj_cpf:
                continue

            if inv_related.cpfcpnj_type == 'cnpj':
                if not fiscal.validate_cnpj(inv_related.cnpj_cpf):
                    return False
            elif not fiscal.validate_cpf(inv_related.cnpj_cpf):
                    return False

        return True