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

[11.0] mig l10n_it_fatturapa_out #641

Merged
merged 60 commits into from Jan 7, 2019
Merged

[11.0] mig l10n_it_fatturapa_out #641

merged 60 commits into from Jan 7, 2019

Conversation

francesca-bianchini
Copy link
Contributor

@eLBati eLBati added this to the 11.0 milestone Nov 6, 2018
@eLBati
Copy link
Member

eLBati commented Nov 6, 2018

Da revisionare ed eventualmente includere: #642

@labaggio
Copy link
Contributor

labaggio commented Nov 8, 2018

Da revisionare ed eventualmente includere: #642

Fatto

@@ -90,7 +90,7 @@
<DettaglioLinee>
<NumeroLinea>1</NumeroLinea>
<Descrizione>Mouse Optical</Descrizione>
<Quantita>1.00</Quantita>
<Quantita>1.000</Quantita>
Copy link
Member

Choose a reason for hiding this comment

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

@labaggio tutte queste modifiche a Quantita non dovrebbero essere nel commit di migrazione, in quanto sulla 10 questo elemento è già <Quantita>1.000</Quantita>

PrezzoUnitario='%.2f' % prezzo_unitario,
Quantita='%.2f' % line.quantity,
PrezzoUnitario=price_format_string % prezzo_unitario,
Quantita=uom_format_string % line.quantity,
Copy link
Member

Choose a reason for hiding this comment

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

@labaggio ora capisco perchè avevi già modificato i 3 decimali dei test.

Sulla 10 è così

                PrezzoUnitario=('%.' + str(
                    price_precision
                ) + 'f') % prezzo_unitario,
                Quantita=('%.' + str(
                    uom_precision
                ) + 'f') % line.quantity,

però la tua mi sembra più pulita, quindi la porto anche su 12.0

Copy link
Contributor

Choose a reason for hiding this comment

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

ho dimenticato di committare una soluzione ancora più pulita! sistemo anche il resto e committo questa
Quantita='{qta:.{precision}f}'.format(qta=line.quantity, precision=uom_precision)

@eLBati
Copy link
Member

eLBati commented Nov 16, 2018

@labaggio @francesca-bianchini se vi può tornare bene per ricostruire il branch di migrazione includendo le ultime modifiche fatte su 10.0, questo eLBati@e79d7ae è il vostro commit di migrazione alla 11, applicato sulle ultime modifiche presenti nel branch 10.0

<field name="name">fatturapa.attachment.out.tree</field>
<field name="model">fatturapa.attachment.out</field>
<field name="arch" type="xml">
<tree string="Export Fattura Elettronica" create="false">
Copy link
Contributor

Choose a reason for hiding this comment

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

Sarebbe meglio tenere le stringhe sorgente in inglese.
s/Fattura Elettronica/Electronic Invoice

<field name="name">fatturapa.attachment.out.form</field>
<field name="model">fatturapa.attachment.out</field>
<field name="arch" type="xml">
<form string="Export Fattura Elettronica" create="false">
Copy link
Contributor

Choose a reason for hiding this comment

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

Vedi sopra
s/Fattura Elettronica/Electronic Invoice

</field>
</group>
</page>
<page string="Fattura Elettronica"
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Fattura Elettronica/Electronic Invoice

</record>

<record id="action_fatturapa_attachment" model="ir.actions.act_window">
<field name="name">Fattura Elettronica Export Files</field>
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Fattura Elettronica/Electronic Invoice


<menuitem action="action_fatturapa_attachment"
parent="l10n_it_fatturapa.menu_fattura_pa_receivables"
name="Fattura Elettronica Export Files"
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Fattura Elettronica/Electronic Invoice

'Fiscal position for Fattura Elettronica not set '
'for company %s. '
'(Go to Accounting --> Configuration --> Settings --> '
'Fattura Elettronica)' % company.name
Copy link
Contributor

Choose a reason for hiding this comment

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

Qui risulta ancora la stringa con fatturaPA
https://translation.odoo-community.org/translate/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/?checksum=a6854acea5bb5ea3

Pensa sia dovuto al bug indicato nei commenti in #621

invoice_id)
if inv.fatturapa_attachment_out_id:
raise UserError(
_("Invoice %s has FatturaPA Export File yet") % (
Copy link
Contributor

Choose a reason for hiding this comment

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

Anche questa l'ho trovata tradotta con "fattura elettronica"
https://translation.odoo-community.org/translate/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/?checksum=88dbbbcccc31e3d0

In caso
s/FatturaPA/Electronic Invoice

elif partner.company_type == 'person':
if not partner.lastname or not partner.firstname:
raise UserError(
_("Partner %s deve avere nome e cognome") % partner.name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sarebbe da mettere in inglese.

fatturapa_sequence = company.fatturapa_sequence_id
if not fatturapa_sequence:
raise UserError(
_('FatturaPA sequence not configured.'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Questa stringa è specifica della fatturaPA?

'payment term') % invoice.payment_term_id.name)
if not invoice.payment_term_id.fatturapa_pm_id:
raise UserError(
_('Payment term %s does not have a linked fatturaPA '
Copy link
Contributor

Choose a reason for hiding this comment

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

Le due stringhe sono entrambe specifiche della fatturaPA?

@labaggio
Copy link
Contributor

@labaggio @francesca-bianchini se vi può tornare bene per ricostruire il branch di migrazione includendo le ultime modifiche fatte su 10.0, questo eLBati@e79d7ae è il vostro commit di migrazione alla 11, applicato sulle ultime modifiche presenti nel branch 10.0

@eLBati: ok, nel caso ti chiederò una mano :)
Per quanto riguarda tutte le segnalazioni di @primes2h credo debbano essere fatte sulla 10.0.
Questa PR dovrebbe ereditarle e basta.
Se sulla 10 sono già state fatte, mi basterà integrarle.

@primes2h
Copy link
Contributor

primes2h commented Nov 25, 2018

Per quanto riguarda tutte le segnalazioni di @primes2h credo debbano essere fatte sulla 10.0.
Questa PR dovrebbe ereditarle e basta.
Se sulla 10 sono già state fatte, mi basterà integrarle.

Non ho problemi a fare un PR per la 10.0 ma per alcune stringhe è necessario capire se nella stringa originale il termine fatturaPA va sostituito con fattura elettronica/e-fattura. (vedi commenti qui sotto)
Qualcuno sa darmi qualche indicazione?

#641 (comment)
#641 (comment)
#641 (comment)
#641 (comment)

@eLBati
Copy link
Member

eLBati commented Nov 25, 2018

@primes2h non mi pare ci siano punti dove fatturaPA si riferisca specificamente alla fattura verso PA e non in generale alla fattura elettronica. Quindi le stringhe originali fatturaPA possono diventare E-invoice

@primes2h
Copy link
Contributor

Ottimo!
Allora più tardi procedo con la PR.
Grazie.

@primes2h
Copy link
Contributor

primes2h commented Nov 25, 2018

Aperta la PR #674 da includere.

@labaggio
Copy link
Contributor

Aperta la PR #674 da includere.
fatto

@primes2h
Copy link
Contributor

Riguardo ai commenti che avevo riportato in trello

https://trello.com/c/ET8WFor5/27-porting-to-11-fatturazione-elettronica-b2b-elaborazione-xml

per semplicità riporto qui i commit specifici da aggiungere a questa PR per iniziare l'allineamento alle versioni 10.0 e 12.0.

926f1e6
4aca5f6

@labaggio
Copy link
Contributor

Ricreato il branch, fatto cherry-pick ed eseguito lo squash .
@eLBati puoi dare un'occhiata all'errore di runbot e dirmi cosa e se devo fare?

@eLBati
Copy link
Member

eLBati commented Dec 18, 2018

@labaggio prova a modificare il file

- pip install PyXB==1.2.4
mettendo la versione corretta di pyxb (1.2.5)

@labaggio
Copy link
Contributor

@eLBati travis mi da un errore per la mancanza del TipoDocumentoType nella fattura.
Per poter funzionare sulla 11.0 bisogna implementare nel modulo fiscal_document_type aggiungendo la valorizzazione del campo in fase di creazione della fattura come da questa PR
https://github.com/OCA/l10n-italy/pull/723/files, ti torna?

@eLBati
Copy link
Member

eLBati commented Dec 19, 2018

@labaggio sì.

Vedi anche

l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:888:12: E121 continuation line under-indented for hanging indent

@labaggio
Copy link
Contributor

l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:888:12: E121 continuation line under-indented for hanging indent

Mannaggia, l'ho visto, ma il mio editor non me lo segna e non capisco cosa diavolo vuole.. cmq ora trovo un modo.. chiedo @taifu

@labaggio
Copy link
Contributor

labaggio commented Dec 19, 2018

DEPEND #751
I test andranno a buon fine (spero :) ) una volta mergiata e integrata la PR citata

@eLBati
Copy link
Member

eLBati commented Dec 24, 2018

@labaggio pylint dice anche

l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:64: [W0105(pointless-string-statement), WizardExportFatturapa._domain_ir_values] String statement has no effect
l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:76: [W0105(pointless-string-statement), WizardExportFatturapa._domain_ir_values] String statement has no effect

@infoitservit
Copy link

E' possibile scaricarla e testare almeno l'elaborazione dell'xml su una versione 11?

@jado95
Copy link
Contributor

jado95 commented Jan 4, 2019

Da Includere anche una fix che si trova qui #763

@elvise
Copy link

elvise commented Jan 5, 2019

Hi, any eta for this one?

@eLBati
Copy link
Member

eLBati commented Jan 5, 2019

Chiunque volesse portare avanti questa PR, può prendere il branch linkitspa:11.0-mig-l10n_it_fatturapa_out, creare il proprio branch, sistemare le cose mancanti e creare una nuova PR

@elvise
Copy link

elvise commented Jan 6, 2019

@eLBati per me può andare anche bene, quali sono i punti rimasti in sospeso...?
Aggiungo che se ci fosse interesse, posso sponsorizzare il lavoro rimasto da fare.

eLBati and others added 26 commits January 7, 2019 16:41
ADD PECDestinatario, CodiceDestinatario , FormatoTrasmissione handling
ADD Lotto di fatture verso soggetto privato
ADD gestione prodotti nelle fatture passive
ADD l10n_it_fatturapa_in_purchase
ADD einvoice.line model
IMP form fatture
ADD Livello di dettaglio Fatture elettroniche
ADD PDF preview dell'XML
ADD Link to existing supplier invoice
and handle "registered" XML
ADD rappresentante fiscale e stabile organizzazione in emissione
gestione prodotti DatiBollo , DatiCassaPrevidenziale e ScontoMaggiorazione
CodiceArticolo, ftpa_line_number

IMP "show preview" as link
FIX invoice duplication

ADD constraints and Nome Cognome

Avoid to cancel invoice with XML

Mostra i dati fattura elettronica solo se il cliente è soggetto
IMP READMEs

Gestione IVA inclusa nel prezzo

ADD l10n_it_fatturapa_out_ddt

IMP PEP8

IMP decimal precision
ADD Export E-invoice button
IMP README
[ADD] l10n_it_fatturapa_out: generate a report for invoice and include in generated XML

[FIX] l10n_it_fatturapa_out: attachments must be encoded only once
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
Currently translated at 88.9% (80 of 90 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
…e a PDF attached in the Fattura Elettronica XML (#643)

* [IMP] l10n_it_fatturapa_out: Add flag to recognize which invoices have a PDF attached in the Fattura Elettronica XML

* [FIX] l10n_it_fatturapa_out: Remove confirm label

* fixup! [FIX] l10n_it_fatturapa_out: Remove confirm label
FIX
Mail delivery failed via SMTP server 'smtps.pec.aruba.it'.
SMTPRecipientsRefused: {'agilebg@pec.it': (553, '5.7.1 <elbaddy+1-fatturapa.attachment.out-6@gmail.com>: Sender address rejected: not owned by user l.battistini@pec.it')}
Traceback (most recent call last):
  File "/home/elbati/workspace/odoo/instances/demo10-community/parts/odoo/addons/mail/models/mail_mail.py", line 278, in send
    res = IrMailServer.send_email(msg, mail_server_id=mail.mail_server_id.id)
  File "/home/elbati/workspace/odoo/instances/demo10-community/parts/odoo/odoo/addons/base/ir/ir_mail_server.py", line 467, in send_email
    raise MailDeliveryException(_("Mail Delivery Failed"), msg)
MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtps.pec.aruba.it'.\nSMTPRecipientsRefused: {'agilebg@pec.it': (553, '5.7.1 <elbaddy+1-fatturapa.attachment.out-6@gmail.com>: Sender address rejected: not owned by user l.battistini@pec.it')}")

ADD l10n_it_fatturapa_out: tracking attachment changes

IMP mail send: raise exception in case

Translated using Weblate (Italian)

Currently translated at 94.4% (85 of 90 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/

IMP README
exceptions sending email
Avoid to delete sent files
Check duplicated files
Send several files
Reset to ready button
Sending and delivery date
Handling ACCETTAZIONE and CONSEGNA
IMP 'link to existing invoice' wizard
FIX invoice views within attachment view
IMP attachments views
IMP l10n_it_fatturapa_out export: allow multiple export , group by partner
ALLOW to use newline char in invoice line description
check sequence without date ranges
Extract correcttle messages from NS

[FIX] compute method start with _

[FIX] flake

Translated using Weblate (Italian)

Currently translated at 88.1% (89 of 101 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
[IMP] revamp README and manifest
Some strings depend on l10n_it_fatturapa/demo/account_invoice_fatturapa.xml fields
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Currently translated at 91.0% (91 of 100 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
Translated using Weblate (Italian)

Currently translated at 98.0% (98 of 100 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Currently translated at 68.0% (68 of 100 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/

Translated using Weblate (Italian)

Currently translated at 99.0% (99 of 100 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
[FIX] l10n_it_fatturapa_in typos in source translation strings
Currently translated at 100.0% (99 of 99 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
* [10.0][FIX] l10n_it_fatturapa_out: Error sting encoding
Currently translated at 100.0% (99 of 99 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_out
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out/it/
IMP l10n_it_fiscal_document_type to be sure that doc type is always set
FIX l10n_it_fatturapa_out to use the fiscal doc type
@eLBati
Copy link
Member

eLBati commented Jan 7, 2019

Ho fatto squash di alcuni commit raggruppandoli per autore.

Mancherebbero le fix che sono state fatte su 10.0 e 12.0, e forse portare alle altre versioni alcune correzioni presenti solo in questa PR.

Riporto qui i diff, rimuovendo le parti non rilevanti

10.0..11.0-mig-l10n_it_fatturapa_out:
https://gist.github.com/eLBati/50882dbfed6367d73a9489caa4970a2d

12.0..11.0-mig-l10n_it_fatturapa_out:
https://gist.github.com/eLBati/f402700c12078542e463434d34f3abe1

Qui si possono notare alcune correzioni non presenti in 11.0-mig-l10n_it_fatturapa_out.
Altre sono modifiche necessarie per il passaggio di versione.
Altre sono forse correzioni fatte in 11.0-mig-l10n_it_fatturapa_out e non portate sulle altre versioni.

Ad ogni modo, come da richiesta di @andreampiovesana , non appena le build sono verdi, procedo comunque con il merge.
Poi le correzioni verranno eventualmente applicate successivamente.

Fix in caso di campo fax non esistente in res.partner

fix
@eLBati eLBati merged commit 41e851d into OCA:11.0 Jan 7, 2019
@Byloth Byloth deleted the 11.0-mig-l10n_it_fatturapa_out branch June 7, 2019 10:09
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.

None yet