-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
base: 16.0
Are you sure you want to change the base?
[IMP] l10n_it_fiscalcode: update library to check fiscalcode #4511
Conversation
@francesco-ooops grazie stavo correggendo anche i dati di test di fatturapa_in e import_zip che hanno un codicefiscale errato per l'intermediario |
aab964f
to
9b9e594
Compare
@SirAionTech issue aperta e linkata |
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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Già 😅
Il campo "f.birth_date" come potrebbe contenere una stringa se è definito come fields.Date()?
A che serve "if isinstance(f.birth_date, datetime.date):"?
Trasformalo in stringa direttamente.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Può contenere una stringa perché nei test viene passato come tale, mentre da UI viene caricato come fields.Date(). Quindi invece che modificare i test ho preferito fare un controllo e una conversione. I test, per quanto possibile non andrebbero modificati, perché se sono corretti sono la garanzia che il nuovo codice non introduce regressioni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergiocorato aggiornato i test e rimosso il check nel wizard
9b9e594
to
ceb0add
Compare
@sergiocorato per caso si potrebbe mergiare? |
ceb0add
to
418fb36
Compare
418fb36
to
335fd9f
Compare
Hi @MarcoCalcagni, @Borruso, |
56b7f09
to
20b273c
Compare
Si può mergiare ? ci sono spesso casi di omocode e l'altra libreria riesce a riconoscerli senza problemi |
@francesco-ooops puoi fare rebase che ora sicuramente passerebbe i test? |
/ocabot rebase |
Congratulations, PR rebased to 16.0. |
20b273c
to
ca0eb47
Compare
l10n_it_fiscalcode/__manifest__.py
Outdated
@@ -7,7 +7,7 @@ | |||
|
|||
{ | |||
"name": "ITA - Codice fiscale", | |||
"version": "16.0.1.0.3", | |||
"version": "16.0.1.0.3+PR4511", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Da rimuovere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@micheledic rimosso il numero della PR nel manifest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ho visto il commit, sarebbe da modificare proprio il primo commit su l10n_it_fiscalcode evitando proprio il cambio del version nel primo commit .
Essendo il primo commit, dovrai fare col rebase
prova a seguire questo
https://www.geeksforgeeks.org/how-to-modify-a-specific-commit/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@micheledic ci siamo?
ca0eb47
to
e691b99
Compare
@patrickt-oforce puoi modificare il commit che introduce "+PR45111" anzicche modificarlo con l'ultimo commit? |
e691b99
to
6def155
Compare
6def155
to
56783c5
Compare
Dovrei averlo fatto; quando puoi ricontrolla se ok |
Bisogna fixare anche il codice fiscale nel file Verificando quel CF effettivamente è errato, quindi è da cambiare il test |
In file IT05979361218_004.xml fix value of intermiedary fiscal code
…al code in invoices of archive file
56783c5
to
e9ccfd5
Compare
SI era rimasto quello vecchio, corretto |
Per me è OK! |
This PR has the |
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
el10n_it_fatturapa_import_zip
, because try to validate the FC in xml, result to an error on check digit, make automated tests failing