Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] l10n_it_fiscalcode: update library to check fiscalcode #4511

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

patrickt-oforce
Copy link
Contributor

@patrickt-oforce patrickt-oforce commented Dec 16, 2024

Update library to check if a partner fiscal is formally valid, using python-codicefiscale library that can validate a fiscalcode even if this is omocode.

In this PR are included fix to test of l10n_it_fatturapa_in e l10n_it_fatturapa_import_zip, because try to validate the FC in xml, result to an error on check digit, make automated tests failing

@patrickt-oforce
Copy link
Contributor Author

@francesco-ooops grazie stavo correggendo anche i dati di test di fatturapa_in e import_zip che hanno un codicefiscale errato per l'intermediario

@patrickt-oforce patrickt-oforce force-pushed the 16.0-IMP-l10n_it_fiscalcode branch 2 times, most recently from aab964f to 9b9e594 Compare December 16, 2024 18:14
@patrickt-oforce
Copy link
Contributor Author

@SirAionTech issue aperta e linkata

@francesco-ooops francesco-ooops linked an issue Dec 23, 2024 that may be closed by this pull request
2 tasks
nat_code = self._get_national_code(
f.birth_city.name, f.birth_province.code, f.birth_date
)
if not nat_code:
raise UserError(_("National code is missing"))
c_f = build(

if isinstance(f.birth_date, datetime.date):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il campo birth_date può essere una stringa?

Copy link
Contributor Author

@patrickt-oforce patrickt-oforce Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La libreria proposta deve ricevere il valore di birth_date come stringa

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ma in che caso il campo birth_date = fields.Date("Date of birth", required=True) può contenere una stringa?

Copy link
Contributor Author

@patrickt-oforce patrickt-oforce Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scusami ma credo che non ci stiamo capendo; la libreria proposta vuole il valore del campo birth_date come stringa, il metodo per calcolare il CF richiede che il valore di birth_date sia datetime o str qui gli arriva come data e lo converto in str

@patrickt-oforce patrickt-oforce force-pushed the 16.0-IMP-l10n_it_fiscalcode branch from 9b9e594 to ceb0add Compare January 30, 2025 10:05
@matteoopenf
Copy link
Contributor

@sergiocorato per caso si potrebbe mergiare?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to validate omocode italian fiscal code
6 participants