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

8.0 backporting fatturazione elettronica da v10 #615

Merged
merged 6 commits into from Dec 6, 2018
Merged

8.0 backporting fatturazione elettronica da v10 #615

merged 6 commits into from Dec 6, 2018

Conversation

jado95
Copy link
Contributor

@jado95 jado95 commented Oct 20, 2018

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

inv.preventive_checks()
self.with_context(context_partner).setFatturaElettronicaBody(
inv, invoice_body)
fatturapa.FatturaElettronicaBody.append(invoice_body)
# TODO DatiVeicoli

Copy link
Contributor

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)

Copy link
Contributor

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

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?

Copy link
Contributor

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">-->
Copy link
Contributor

Choose a reason for hiding this comment

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

Puoi cancellare questa riga?

@sergiocorato
Copy link
Contributor

@jado95 programmi di fare il backport anche di l10n_it_fatturapa_in?

@oca-clabot
Copy link

Hey @jado95, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

'fatturapa.attachment.out', 'FatturaPA Export File',
readonly=True, copy=False)

def preventive_checks(self):
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

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

if partner.is_company:

Copy link
Contributor

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:
Copy link
Contributor

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,
Copy link
Contributor

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 '&#10;' would not be correctly visualized anyway # (for example firefox replaces '&#10;' with space Descrizione=line.name.replace('\n', ' '),

@sergiocorato
Copy link
Contributor

è stato poi aggiunto sempre nell'esportazione la possibiiità di esportare più fatture da tree view

# 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',
Copy link
Contributor

Choose a reason for hiding this comment

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

correggere la versione

@jado95
Copy link
Contributor Author

jado95 commented Nov 22, 2018

@sergiocorato Ho allineato la v8 con la v8 (tranne le traduzioni per ora)
Daresti un'occhiata adesso?

@sergiocorato
Copy link
Contributor

@sergiocorato Ho allineato la v8 con la v8 (tranne le traduzioni per ora)
Daresti un'occhiata adesso?

@jado95 certo

return True
raise UserError(
_('FatturaPA sequence not configured.'))
number = fatturapa_sequence.next_by_id(fatturapa_sequence.id)
Copy link
Contributor

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)

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

hai ragione

@sergiocorato
Copy link
Contributor

@jado95 manca questa modifica del metodo compute con _
poi da qui in avanti è stato modificato il send e i campi relativi

@jado95
Copy link
Contributor Author

jado95 commented Nov 26, 2018

@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. Per quanto riguarda i moduli fattura_pa e fatturapa_out secondo te sono ok?

Copy link
Contributor

@sergiocorato sergiocorato left a 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:
Copy link
Contributor

Choose a reason for hiding this comment

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

ricordati di correggere qui

@sergiocorato
Copy link
Contributor

@jado95 puoi sistemare il paio di note in sospeso sulla fatturapa out?

@oca-clabot
Copy link

Hey @jado95,
We acknowledge that the following users have signed our Contributor License Agreement:

Appreciation of efforts,
OCA CLAbot

@jado95
Copy link
Contributor Author

jado95 commented Nov 26, 2018

@jado95 puoi sistemare il paio di note in sospeso sulla fatturapa out?

Sistemato le ultime due cose da sistemare.
Per quanto riguarda gli altri moduli (pec) li ho mergiati già in questo branch.

@sergiocorato
Copy link
Contributor

@jado95 ho aggiornato il backport del modulo pec, lo trovi in una PR nel tuo repo

@sergiocorato
Copy link
Contributor

@jado95 ho fatto la PR 5 sul tuo repo per correzioni minori

@sergiocorato
Copy link
Contributor

@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 sergiocorato mentioned this pull request Nov 28, 2018
@eLBati
Copy link
Member

eLBati commented Nov 29, 2018

@sergiocorato io ho testato senza mail_outbound_static.
Quali sono i passi per riprodurre l'errore? Capita solo su 8.0?

@primes2h
Copy link
Contributor

primes2h commented Nov 29, 2018

Ci sarebbe anche questa eventualmente da includere #677, penso basti un cherry-picking quando verrà fatto il merge.

@sergiocorato
Copy link
Contributor

@sergiocorato io ho testato senza mail_outbound_static.
Quali sono i passi per riprodurre l'errore? Capita solo su 8.0?

@eLBati sì solo su 8.0, ma magari è qualcosa di specifico, provo con un'installazione basica

@jado95
Copy link
Contributor Author

jado95 commented Dec 3, 2018

@sergiocorato io ho testato senza mail_outbound_static.
Quali sono i passi per riprodurre l'errore? Capita solo su 8.0?

@eLBati sì solo su 8.0, ma magari è qualcosa di specifico, provo con un'installazione basica

@sergiocorato @eLBati
Ho aggiunto in un commit base64.decodestring che era stato aggiunto per le altre versioni

@scigghia
Copy link
Contributor

scigghia commented Dec 3, 2018

👍

Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

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

Red travis

@eLBati
Copy link
Member

eLBati commented Dec 3, 2018

@jado95 potresti fare squash dei commit secondo la loro logica? O li volevi introdurre tutti?

@sergiocorato
Copy link
Contributor

@jado95 come segnala @eLBati ci sono alcune cose da correggere:
l10n_it_ipa/__openerp__.py:1: [C8201(no-utf8-coding-comment), ] No UTF-8 coding comment found: Use # coding: utf-8or# -- coding: utf-8 -- l10n_it_ipa/__openerp__.py:27: [C8103(manifest-deprecated-key), ] Deprecated key "active" in manifest file ************* Module l10n_it_fiscal_payment_term.__openerp__ l10n_it_fiscal_payment_term/__openerp__.py:7: [C8106(manifest-version-format), ] Wrong Version Format "8.0..0.0" in manifest file. Regex to match: "(8\.0)\.\d+\.\d+\.\d+$"

# 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
Copy link
Member

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

@eLBati
Copy link
Member

eLBati commented Dec 3, 2018

Mancherebbero alcuni commit presenti su 10.0 https://github.com/OCA/l10n-italy/commits/10.0

Ad esempio aeceda7

@jado95
Copy link
Contributor Author

jado95 commented Dec 4, 2018

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?

@eLBati
Copy link
Member

eLBati commented Dec 6, 2018

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.
Ad esempio il commit 202174e ha senso tenerlo separato?

Vedi anche https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#git

@eLBati
Copy link
Member

eLBati commented Dec 6, 2018

@jado95 controlla #697 per favore

jado95 and others added 6 commits December 6, 2018 12:35
[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
@jado95
Copy link
Contributor Author

jado95 commented Dec 6, 2018

@eLBati tutti i check ok, merge?

@eLBati eLBati merged commit d1b0f5a into OCA:8.0 Dec 6, 2018
@sergiocorato
Copy link
Contributor

sergiocorato commented Jan 8, 2019

@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

@eLBati
Copy link
Member

eLBati commented Jan 8, 2019

Ah, sì, anche nella build del branch 8.0 https://travis-ci.org/OCA/l10n-italy/jobs/475716999
Male

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants