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

[MIG] l10n_it_fatturapa_out_triple_discount #3720

Open
wants to merge 15 commits into
base: 16.0
Choose a base branch
from

Conversation

SirAionTech
Copy link
Contributor

@SirAionTech SirAionTech commented Nov 15, 2023

@SirAionTech SirAionTech force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from 49f7e3d to a0e4c8d Compare November 15, 2023 15:15
@SirAionTech

This comment was marked as resolved.

@SirAionTech SirAionTech marked this pull request as ready for review November 15, 2023 15:44
@SirAionTech SirAionTech force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from a0e4c8d to c79be06 Compare November 15, 2023 17:03
@SirAionTech SirAionTech marked this pull request as draft November 15, 2023 17:05
@SirAionTech SirAionTech marked this pull request as ready for review November 15, 2023 17:14
@francesco-ooops
Copy link
Contributor

@SirAionTech capisco la necessità di fare la migrazione alla versione che interessa, ma dato che stiamo lavorando proprio ora sulla migrazione per la 14 (#3681) potrebbe essere utile unire le forze per mergiare una delle due versioni e successivamente fare il backporting o fw-porting dell'altra in modo da essere allineati, che ne dici?

soprattutto perchè queste migrazioni hanno fatto uscire fuori magagne su account_triple_discount (e al momento sulla 14 hanno rotto i test di sale_triple_discount, cfr OCA/account-invoicing#1605 ), per cui non proprio una passeggiata di salute 😅

@SirAionTech
Copy link
Contributor Author

@SirAionTech capisco la necessità di fare la migrazione alla versione che interessa, ma dato che stiamo lavorando proprio ora sulla migrazione per la 14 (#3681) potrebbe essere utile unire le forze per mergiare una delle due versioni e successivamente fare il backporting o fw-porting dell'altra in modo da essere allineati, che ne dici?

soprattutto perchè queste migrazioni hanno fatto uscire fuori magagne su account_triple_discount (e al momento sulla 14 hanno rotto i test di sale_triple_discount, cfr OCA/account-invoicing#1605 ), per cui non proprio una passeggiata di salute 😅

Certo, ho fatto #3681 (review) per evidenziare cosa secondo me non va bene in quella migrazione.

@francesco-ooops
Copy link
Contributor

@SirAionTech molto apprezzato <3

Se la tua PR è in stato più avanzato e sono presenti i test possiamo anche concentrarci su questa e fare il backporting, basta che il tutto sia celere ecco 😅

self.env.company.partner_id.country_id = self.env.ref("base.it").id
self.env.company.fatturapa_fiscal_position_id = self.env.ref(
"l10n_it_fatturapa.fatturapa_RF01"
).id
Copy link
Member

Choose a reason for hiding this comment

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

@SirAionTech queste modifiche a cosa servono?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Servono ad avere un'azienda che produca lo stesso file presente nei test.
Ad esempio viene impostato il regime fiscale a RF01 perché deve essere lo stesso di https://github.com/OCA/l10n-italy/pull/3720/files#diff-b4442d0a23dcdee7b95d10e0baed8c8266eaac33d66499c6cd97f11266027b04R29.

Copy link
Member

Choose a reason for hiding this comment

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

Per modificare il meno possibile il file di test esistente?
L'importante penso sia avere un XML valido per la parte rilevante per le funzionalità di questo modulo, poi se il resto del file XML contiene i dati che contengono tutti gli altri XML di test , non vedo problemi a modificarlo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

O modifico il setup dei test (come ho fatto), o modifico il file XML: ho preferito modificare il setup dei test per ottenere la stessa fattura elettronica perché penso che il test debba verificare che il modulo possa produrre esattamente quella fattura elettronica.

se il resto del file XML contiene i dati che contengono tutti gli altri XML di test , non vedo problemi a modificarlo

Tutti gli altri XML di test contengono proprio questi dati: le modifiche fatte qui sono le stesse che furono necessarie per la migrazione a 14.0 di l10n_it_fatturapa_out:

# XXX - a company named "YourCompany" alread exists
# we move it out of the way but we should do better here
self.env.company.sudo().search([("name", "=", "YourCompany")]).write(
{"name": "YourCompany_"}
)
self.env.company.name = "YourCompany"
self.env.company.vat = "IT06363391001"
self.env.company.fatturapa_art73 = True
self.env.company.partner_id.street = "Via Milano, 1"
self.env.company.partner_id.city = "Roma"
self.env.company.partner_id.state_id = self.env.ref("base.state_us_2").id
self.env.company.partner_id.zip = "00100"
self.env.company.partner_id.phone = "06543534343"
self.env.company.email = "[email protected]"
self.env.company.partner_id.country_id = self.env.ref("base.it").id
self.env.company.fatturapa_fiscal_position_id = self.env.ref(
"l10n_it_fatturapa.fatturapa_RF01"
).id

in modo che le fatture elettroniche non fossero da cambiare nella migrazione.
Esiste già la issue #2507 per evitare di ripetere questo setup ma deve ancora essere risolta.

Quindi pensi sia meglio che modifichi il file della fattura elettronica generato dai test?
Così facendo conterrà dati diversi da tutti gli altri XML di test.

@matteoopenf
Copy link
Contributor

matteoopenf commented Nov 27, 2023 via email

@SirAionTech
Copy link
Contributor Author

SirAionTech commented Nov 27, 2023 via email

-->
<odoo>
<template
id="account_invoice_it_dati_bollo"
Copy link
Member

Choose a reason for hiding this comment

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

Qua meglio un id tipo account_invoice_it_triple_discount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah questo mi era scappato grazie, l'ho chiamato come il template da cui eredita come suggerito in https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#253inherited-xml.

@SirAionTech SirAionTech force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from 476cd6a to 143696e Compare November 28, 2023 14:53
@SirAionTech SirAionTech force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from 143696e to 89aafa0 Compare December 1, 2023 09:26
@SirAionTech
Copy link
Contributor Author

Aggiornamento: la PR analoga per 14.0 #3743 è stata mergiata

@francesco-ooops
Copy link
Contributor

@OCA/local-italy-maintainers aggiungere a #2967

Copy link

@OvertakeMattia OvertakeMattia left a comment

Choose a reason for hiding this comment

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

Testato il modulo e controllato emissione di una decina di documenti con sconto 1, 2, 3 anche in varie combinazioni di presenza /assenza e funziona correttamente

@SirAionTech
Copy link
Contributor Author

/ocabot migration l10n_it_fatturapa_out_triple_discount

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 14, 2024
SimoRubi and others added 15 commits August 6, 2024 17:11
it fixes:
 - removes xs:dateTime if bogus and not mandatory
   i.e. 0001-01-01T00:00:00.000+02:00 where python raises
   OverflowError
 - removes timezone from xs:date to make pyxb able to compare with
   1-1-1970, it also removes the need of patching pyxb
 - removes space only strings if not mandatory, else replace with
   a dash

breaking change:
  modules needs to import binding.fatturapa instead of
  bindings.fatturapa_v_1_2, this would be asl useful for
  new specs
…e now rounded to the nearest even result instead of away from zero".

See https://docs.python.org/3/whatsnew/3.0.html#builtins

Examples:

>>> '%.2f' % 75.845
'75.84'
>>> '%.2f' % 75.855
'75.86'
>>> round(2.5)
2
>>> round(3.5)
4
…scount: modifica del type di Importo in ScontoMaggiorazioneType (OCA#1875)

* [IMP] l10n_it_fatturapa_out: change precision_rounding of ScontoMaggiorazioneType according to e-invoicing specs 1.6

* [IMP] l10n_it_fatturapa_out_triple_discount: change precision_rounding of ScontoMaggiorazioneType according to e-invoicing specs 1.6
@SirAionTech SirAionTech force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from a622fec to 444e4e9 Compare August 6, 2024 15:12
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.