Skip to content

[11.0] mig l10n_it_fatturapa_out#641

Merged
eLBati merged 60 commits into
OCA:11.0from
linkiteurope:11.0-mig-l10n_it_fatturapa_out
Jan 7, 2019
Merged

[11.0] mig l10n_it_fatturapa_out#641
eLBati merged 60 commits into
OCA:11.0from
linkiteurope:11.0-mig-l10n_it_fatturapa_out

Conversation

@francesca-bianchini

Copy link
Copy Markdown

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

eLBati commented Nov 6, 2018

Copy link
Copy Markdown
Member

Da revisionare ed eventualmente includere: #642

@labaggio

labaggio commented Nov 8, 2018

Copy link
Copy Markdown

Da revisionare ed eventualmente includere: #642

Fatto

<NumeroLinea>1</NumeroLinea>
<Descrizione>Mouse Optical</Descrizione>
<Quantita>1.00</Quantita>
<Quantita>1.000</Quantita>

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

eLBati commented Nov 16, 2018

Copy link
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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

primes2h commented Nov 25, 2018

Copy link
Copy Markdown
Contributor

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

eLBati commented Nov 25, 2018

Copy link
Copy Markdown
Member

@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
Copy Markdown
Contributor

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

@primes2h

primes2h commented Nov 25, 2018

Copy link
Copy Markdown
Contributor

Aperta la PR #674 da includere.

@labaggio

Copy link
Copy Markdown

Aperta la PR #674 da includere.
fatto

@primes2h

Copy link
Copy Markdown
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
Copy Markdown

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

eLBati commented Dec 18, 2018

Copy link
Copy Markdown
Member

@labaggio prova a modificare il file

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

@labaggio

Copy link
Copy Markdown

@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

eLBati commented Dec 19, 2018

Copy link
Copy Markdown
Member

@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
Copy Markdown

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

labaggio commented Dec 19, 2018

Copy link
Copy Markdown

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

@eLBati

eLBati commented Dec 24, 2018

Copy link
Copy Markdown
Member

@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
Copy Markdown

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

@jado95

jado95 commented Jan 4, 2019

Copy link
Copy Markdown
Contributor

Da Includere anche una fix che si trova qui #763

@elvise

elvise commented Jan 5, 2019

Copy link
Copy Markdown

Hi, any eta for this one?

@eLBati

eLBati commented Jan 5, 2019

Copy link
Copy Markdown
Member

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

elvise commented Jan 6, 2019

Copy link
Copy Markdown

@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

eLBati commented Jan 7, 2019

Copy link
Copy Markdown
Member

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.