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

[14.0][IMP] new module l10n_it_fatturapa_out_di #2451

Merged

Conversation

TheMule71
Copy link
Contributor

Modulo ponte tra l10n_it_declaration_of_intent e l10n_it_fatturapa_out

Il modulo aggiunge AltriDatiGestionali per le righe con lettera d'intento esplicita

Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@TheMule71 TheMule71 marked this pull request as ready for review October 21, 2021 17:59
Copy link
Contributor

@MarcoCalcagni MarcoCalcagni left a comment

Choose a reason for hiding this comment

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

Ok funzionale .

"l10n_it_fatturapa.fatturapa_RF01"
).id

self.env["decimal.precision"].search(
Copy link
Contributor

Choose a reason for hiding this comment

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

Questi valori dovrebbero avere un XML ID. Potresti usare quelli.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Se non ho capito male intendi qualcosa del genere?

index be0c8e787..90b8e7848 100644
--- a/l10n_it_fatturapa_out_di/tests/test_fatturapa_xml_validation.py
+++ b/l10n_it_fatturapa_out_di/tests/test_fatturapa_xml_validation.py
@@ -32,10 +32,8 @@ class TestFatturaPAXMLValidation(FatturaPACommon):
             "l10n_it_fatturapa.fatturapa_RF01"
         ).id
 
-        self.env["decimal.precision"].search(
-            [("name", "=", "Product Unit of Measure")]
-        ).digits = 3
-        self.env["uom.uom"].search([("name", "=", "Units")]).name = "Unit(s)"
+        self.env.ref("product.decimal_product_uom").digits = 3
+        self.env.ref("uom.product_uom_unit").name = "Unit(s)"
 
         tax_form = Form(self.env["account.tax"])
         tax_form.name = "10%"

Copy link
Contributor

Choose a reason for hiding this comment

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

Esattamente. Perfetto.

@TheMule71 TheMule71 force-pushed the 14.0-imp-new-l10n_it_fatturapa_out_di branch 2 times, most recently from d23279d to 111b1c5 Compare November 19, 2021 13:15
@marco-marchiori
Copy link

@TheMule71 ho provato a testarlo in runbot:

  • c'è un problema (ricorrente) nel richiamare le DI dalla fattura, vedo che poi nel doc vengono riportate
  • ma poi quando emetto la FE non vedo valorizzato un elemento e la rivedo nella causale
    sto sbagliando qualcosa?

@TheMule71
Copy link
Contributor Author

TheMule71 commented Nov 27, 2021

@TheMule71 ho provato a testarlo in runbot:

  • c'è un problema (ricorrente) nel richiamare le DI dalla fattura, vedo che poi nel doc vengono riportate
  • ma poi quando emetto la FE non vedo valorizzato un elemento e la rivedo nella causale
    sto sbagliando qualcosa?

Attualmente questo modulo riporta in <Causale> tutte le dichiarazioni presenti in testata fattura e genera <AltriDatiGestionali> per le righe che hanno una DI forzata.

Nel test io aggiungo la DI direttamente alla riga, e mi appare sia come <Causale>, sia come <AltriDataGestionali>

Vd. anche #2518 (comment)

@TheMule71 TheMule71 force-pushed the 14.0-imp-new-l10n_it_fatturapa_out_di branch from 111b1c5 to 972e31e Compare November 27, 2021 13:51
@TheMule71
Copy link
Contributor Author

TheMule71 commented Nov 27, 2021

Sto facendo anche una ricerca su come fanno altri gestionali.
Un'alternativa, in effetti, potrebbe essere quella di indicare, invece che riga per riga <AltriDatiGestionali>, aggiungere una riga note alla fine della fattura, avente N <AltriDatiGestionali> con le varie lettere d'intento.

@TheMule71
Copy link
Contributor Author

Prima in implementare anche in questo modulo la logica, vediamo come viene recepita in #2518
Una volta consolitati gli XML che vogliamo ottenere, vedremo di allineare anche questo modulo.

@TheMule71 TheMule71 force-pushed the 14.0-imp-new-l10n_it_fatturapa_out_di branch from 972e31e to 1bdd92c Compare December 17, 2021 13:06
@TheMule71
Copy link
Contributor Author

TheMule71 commented Dec 17, 2021

Ok, logica implementata, ora dovrebbe essere equivalente a ciò che fa la 12.

Ping @francescapenso

@francescapenso
Copy link

Testata e funzionante anche con due dichiarazioni intento differenti per riga fattura

Modulo ponte tra l10n_it_declaration_of_intent e l10n_it_fatturapa_out
@TheMule71 TheMule71 force-pushed the 14.0-imp-new-l10n_it_fatturapa_out_di branch from 1bdd92c to fc7a4b7 Compare January 14, 2022 09:39
@tafaRU
Copy link
Member

tafaRU commented Jan 14, 2022

@marco-marchiori ti soddisfa la risposta in #2451 (comment) ?
In caso affermativo procedo con il merge.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@tafaRU
Copy link
Member

tafaRU commented Jan 14, 2022

@marco-marchiori mergio in virtù del fatto che la nuova normativa che riguarda dichiarazioni d’intento e fattura elettronica è entrata in vigore il 1 gennaio. Nel caso avessi qualche ulteriore osservazione da fare apri pure una issue. Grazie.

@tafaRU
Copy link
Member

tafaRU commented Jan 14, 2022

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-2451-by-tafaRU-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d8712cd into OCA:14.0 Jan 14, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at eebb5a2. Thanks a lot for contributing to OCA. ❤️

@TheMule71 TheMule71 deleted the 14.0-imp-new-l10n_it_fatturapa_out_di branch February 3, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants