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
8.0 backporting fatturazione elettronica da v10 #615
Conversation
inv.preventive_checks() | ||
self.with_context(context_partner).setFatturaElettronicaBody( | ||
inv, invoice_body) | ||
fatturapa.FatturaElettronicaBody.append(invoice_body) | ||
# TODO DatiVeicoli | ||
|
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.
in caso la sequenza sia pluriennale, a me risulta serva passare il fiscalyear_id nel context, con una cosa simile:
invoices = invoice_obj.browse(invoice_ids) fy_id = invoices.mapped('period_id.fiscalyear_id.id') if len(fy_id) > 1: raise UserError(_('More than 1 fy included in the file!')) number = self.with_context( fiscalyear_id=fy_id[0] ).setProgressivoInvio(fatturapa)
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.
chiudo questa segnalazione, come sulle altre versioni la sequenza non è prevista per essere pluriennale
@@ -31,7 +31,7 @@ install: | |||
- pip install unicodecsv | |||
- pip install codicefiscale | |||
- pip install unidecode==0.04.17 | |||
- pip install PyXB==1.2.4 | |||
- pip install PyXB==1.2.5 |
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.
@eLBati per caso sai come mai il travis non prende la versione aggiornata di PyXB?
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.
con il nuovo commit l'ha preso, ok
<field name="ipa_code" placeholder="IPA123" attrs="{'invisible': [('is_company','=', False)]}"/> | ||
<field name="ipa_code" placeholder="IPA123" attrs="{'invisible': [('is_pa','=', False)]}"/> | ||
</field> | ||
<!--<field name="company_type" position="after">--> |
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.
Puoi cancellare questa riga?
@jado95 programmi di fare il backport anche di l10n_it_fatturapa_in? |
Hey @jado95, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
'fatturapa.attachment.out', 'FatturaPA Export File', | ||
readonly=True, copy=False) | ||
|
||
def preventive_checks(self): |
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.
questa parte è stata bypassata
DatiAnagrafici.Anagrafica = AnagraficaType( | ||
IdPaese=partner.vat[0:2], IdCodice=partner.vat[2:]) | ||
# if partner.company_type == 'company': | ||
if partner.is_company == True: |
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.
if partner.is_company:
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.
ricordati di correggere qui
Denominazione=partner.name) | ||
# elif partner.company_type == 'person': | ||
elif partner.is_company == False: |
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.
else:
aliquota = line.invoice_line_tax_id[0].amount | ||
AliquotaIVA = '%.2f' % (aliquota * 100) | ||
line.ftpa_line_number = line_no | ||
prezzo_unitario = self._get_prezzo_unitario(line) | ||
DettaglioLinea = DettaglioLineeType( | ||
NumeroLinea=str(line_no), | ||
Descrizione=line.name, |
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.
# can't insert newline with pyxb # see https://tinyurl.com/ycem923t # and ' ' would not be correctly visualized anyway # (for example firefox replaces ' ' with space Descrizione=line.name.replace('\n', ' '),
è stato poi aggiunto sempre nell'esportazione la possibiiità di esportare più fatture da tree view |
l10n_it_fatturapa_pec/__openerp__.py
Outdated
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
'name': 'Italian Localization - FatturaPA - Emission - PEC Support', | ||
'version': '10.0.1.0.0', |
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.
correggere la versione
@sergiocorato Ho allineato la v8 con la v8 (tranne le traduzioni per ora) |
@jado95 certo |
return True | ||
raise UserError( | ||
_('FatturaPA sequence not configured.')) | ||
number = fatturapa_sequence.next_by_id(fatturapa_sequence.id) |
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.
fatturapa_sequence.id
non serve (è già il record stesso)
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.
In v8 serve passargli fatturapa_sequence altrimenti la funzione va in errore
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.
hai ragione
@sergiocorato per quanto il riguardo modulo l10n_it_fatturapa_pec non l'ho seguito io e non ho fatto il backporting io. Per quanto riguarda i moduli fattura_pa e fatturapa_out secondo te sono ok? |
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.
@jado95 manca questa modifica del metodo compute con _
poi da qui in avanti è stato modificato il send e i campi relativi@sergiocorato per quanto il riguardo modulo l10n_it_fatturapa_pec non l'ho seguito io e non ho fatto il backporting io.
@jado95 ok
Per quanto riguarda i moduli fattura_pa e fatturapa_out secondo te sono ok?
@jado95 si, che dici di fare delle PR divise per gli altri? così magari mergiamo questa
DatiAnagrafici.Anagrafica = AnagraficaType( | ||
IdPaese=partner.vat[0:2], IdCodice=partner.vat[2:]) | ||
# if partner.company_type == 'company': | ||
if partner.is_company == True: |
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.
ricordati di correggere qui
@jado95 puoi sistemare il paio di note in sospeso sulla fatturapa out? |
Hey @jado95, Appreciation of efforts, |
Sistemato le ultime due cose da sistemare. |
@jado95 ho aggiornato il backport del modulo pec, lo trovi in una PR nel tuo repo |
@jado95 ho fatto la PR 5 sul tuo repo per correzioni minori |
@jado95 @eLBati per l'invio della pec, vedo che l'smtp dà errore se l'header non è quello della pec, sul mio sistema funziona perchè ho il modulo mail_outbound_static che era stato proposto ma non accettato v. OCA/social#195 , forse c'è una soluzione migliore? |
@sergiocorato io ho testato senza |
Ci sarebbe anche questa eventualmente da includere #677, penso basti un cherry-picking quando verrà fatto il merge. |
@eLBati sì solo su 8.0, ma magari è qualcosa di specifico, provo con un'installazione basica |
@sergiocorato @eLBati |
👍 |
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.
Red travis
@jado95 potresti fare squash dei commit secondo la loro logica? O li volevi introdurre tutti? |
@jado95 come segnala @eLBati ci sono alcune cose da correggere: |
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2015 | ||
# Serge <serge@preply.com>, 2013,2015 | ||
# Александра Маломуж <omalomug@gmail.com>, 2016 | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
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.
Non bisognerebbe modificare i file .po direttamente, in quanto si potrebbero creare conflitti con weblate
Mancherebbero alcuni commit presenti su 10.0 https://github.com/OCA/l10n-italy/commits/10.0 Ad esempio aeceda7 |
Aggiunto il commit come aeceda7 Per quanto riguarda lo squash non so, tu dici di non includere i vari commit? |
@jado95 Non dicevo di eliminare dei commit, ma di farne lo squash. Vedi anche https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#git |
[ADD] Aggiunto modulo l10n_it_causali_pagamento [ADD] Aggiunto modulo da v10 [ADD] Aggiunto modulo da v10 backportig da v10 a v8 moduli per fatturazione elettronica Update company.py Sistemazione delle proprietà in configurazione Fix refuso, c'era RF18 invece di RF19 Check mandatory customer fields before exporting XML Prevent to use sequence already used by journals Reformat code and change message in UserError in export fatturapa
ADD backport from 10.0 of l10n_it_fatturapa_pec
- 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 [ADD] Generate a report for invoice and include in generated XML [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 [ADD] tracking attachment changes IMP attachments views IMP l10n_it_fatturapa_out export: allow multiple export , group by partner ALLOW to use newline char in invoice line description IMP l10n_it_fatturapa codice destinatario default 0000000
[8.0] fix sequence and is_company check [IMP] clean and update terms [FIX] parameter value [FIX] version
[8.0] Add base64.decodestring to attachment fatturapa [FIX] change FatturaPA into E-invoice FIX l10n_it_fatturapa: partner checks must be done for customers onlyas only needed for XML generation [FIX] fix error travis
@eLBati tutti i check ok, merge? |
@eLBati mi dà l'impressione che i test in questa PR siano stati saltati di sana pianta vedi https://travis-ci.org/OCA/l10n-italy/jobs/464292977#L1574 |
Ah, sì, anche nella build del branch 8.0 https://travis-ci.org/OCA/l10n-italy/jobs/475716999 |
Backporting dei moduli: l10n_it_ipa, l10n_it_causali_pagamento; l10n_it_fiscal_payment_termn; l10n_it_withholding_tax_causali; l10n_it_fatturapa; l10n_it_fatturapa_out