Skip to content

[MIG] l10n_it_fatturapa_out_triple_discount#3720

Closed
SirAionTech wants to merge 15 commits into
OCA:16.0from
SirAionTech:16.0-mig-l10n_it_fatturapa_out_triple_discount
Closed

[MIG] l10n_it_fatturapa_out_triple_discount#3720
SirAionTech wants to merge 15 commits into
OCA:16.0from
SirAionTech:16.0-mig-l10n_it_fatturapa_out_triple_discount

Conversation

@SirAionTech

@SirAionTech SirAionTech commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 = "info@yourcompany.example.com"
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.

@SirAionTech SirAionTech requested a review from eLBati November 27, 2023 15:39
@matteoopenf

matteoopenf commented Nov 27, 2023 via email

Copy link
Copy Markdown
Contributor

@SirAionTech

SirAionTech commented Nov 27, 2023 via email

Copy link
Copy Markdown
Contributor Author

-->
<odoo>
<template
id="account_invoice_it_dati_bollo"

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.

Qua meglio un id tipo account_invoice_it_triple_discount

Copy link
Copy Markdown
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 requested a review from eLBati November 28, 2023 14:54
@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
Copy Markdown
Contributor Author

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

@francesco-ooops

Copy link
Copy Markdown
Contributor

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

@OvertakeMattia OvertakeMattia left a comment

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

/ocabot rebase

SimoRubi and others added 15 commits November 12, 2024 09:30
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
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, PR rebased to 16.0.

@OCA-git-bot OCA-git-bot force-pushed the 16.0-mig-l10n_it_fatturapa_out_triple_discount branch from 444e4e9 to a6ea8d2 Compare November 12, 2024 09:30
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 16, 2025
@github-actions github-actions Bot closed this Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

16.0 migration stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.