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

[FIX][l10n_it_fatturapa_in] fix import with type minimo, and add che… #4229

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

matteoopenf
Copy link
Contributor

Risolve #4228

@francesco-ooops
Copy link
Contributor

@matteoopenf puoi sistemare il nome del commit secondo le guidelines? grazie!

@matteoopenf
Copy link
Contributor Author

@matteoopenf puoi sistemare il nome del commit secondo le guidelines? grazie!

Il problema è solo il nome del modulo tra parentesi esatto?
Fammi sapere così provo ad arrivarci entro fine giornata

Copy link

@MaurizioPellegrinet MaurizioPellegrinet left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@matteoopenf matteoopenf force-pushed the 14.0-import_minimo_without_line branch from f5f8152 to 6b112f7 Compare July 8, 2024 15:13
@matteoopenf
Copy link
Contributor Author

@francesco-ooops fatto merge?

@francesco-ooops
Copy link
Contributor

@matteoopenf so che è una pipponata e non so darti indicazioni pratiche perchè non uso github, ma metterei nel nome commit:

[FIX]l10n_it_fatturapa_in: fix import with type minimo

E nella descrizione commit:

Added check if invoice_line_ids is valorize to check the price_unit, if is not valorize stop the method because is not possibile assume the line is negative

@matteoopenf
Copy link
Contributor Author

@matteoopenf so che è una pipponata e non so darti indicazioni pratiche perchè non uso github, ma metterei nel nome commit:

[FIX]l10n_it_fatturapa_in: fix import with type minimo

E nella descrizione commit:

Added check if invoice_line_ids is valorize to check the price_unit, if is not valorize stop the method because is not possibile assume the line is negative

arrivo

@matteoopenf matteoopenf force-pushed the 14.0-import_minimo_without_line branch from 6b112f7 to 9ecd104 Compare July 8, 2024 15:23
@francesco-ooops
Copy link
Contributor

@OCA/local-italy-maintainers mergiamo?

Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

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

Grazie della PR!
Ho provato in runboat e confermo che il problema si verifica in 14.0 con il file https://github.com/OCA/l10n-italy/blob/1c0e8323ec675550e84129bdf9292ccd5962fb6d/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml:
image
(da http://oca-l10n-italy-14-0-d2bffbf6a8d1.runboat.odoo-community.org/web#id=15&active_id=1&model=account.move&view_type=form&cids=&menu_id=134).
Il problema viene corretto da questa PR (importando lo stesso file):
image
(da http://oca-l10n-italy-14-0-pr4229-9ecd104a85f3.runboat.odoo-community.org/web#id=15&active_id=1&model=account.move&view_type=form&cids=&menu_id=134)

Puoi aggiungere o modificare un test esistente in modo che fallisca senza questa correzione? Basterebbe anche solo aggiungere un controllo sul tipo di move nel test che usa il dettaglio minimo.

@matteoopenf
Copy link
Contributor Author

Grazie della PR!

Ho provato in runboat e confermo che il problema si verifica in 14.0 con il file https://github.com/OCA/l10n-italy/blob/1c0e8323ec675550e84129bdf9292ccd5962fb6d/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml:

image

(da http://oca-l10n-italy-14-0-d2bffbf6a8d1.runboat.odoo-community.org/web#id=15&active_id=1&model=account.move&view_type=form&cids=&menu_id=134).

Il problema viene corretto da questa PR (importando lo stesso file):

image

(da http://oca-l10n-italy-14-0-pr4229-9ecd104a85f3.runboat.odoo-community.org/web#id=15&active_id=1&model=account.move&view_type=form&cids=&menu_id=134)

Puoi aggiungere o modificare un test esistente in modo che fallisca senza questa correzione? Basterebbe anche solo aggiungere un controllo sul tipo di move nel test che usa il dettaglio minimo.

Provo a guardare come torno sul problema per fare la pr anche per 16.0

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.

LGTM

@matteoopenf
Copy link
Contributor Author

@SirAionTech scusami sto tentando di fare il test "opposto" al 54, ma non capisco come dire di importare al minimo la fattura anziche' al massimo.
Per caso sai dirmi come fare?

@matteoopenf
Copy link
Contributor Author

ho provato a creare il test vediamo come va

@matteoopenf matteoopenf force-pushed the 14.0-import_minimo_without_line branch from 6a2bc39 to 6b7936b Compare July 12, 2024 17:11
@matteoopenf
Copy link
Contributor Author

@SirAionTech sto ottenendo questo errore tentando di forzare l'import al minimo
image

Per caso sai darmi un aiuto cosi da concludere la cosa?

@matteoopenf
Copy link
Contributor Author

oppure come in altri test, prima devo creare il partner e settare il livello di import e poi fare girare il wizard?

@SirAionTech
Copy link
Contributor

Il test test_16_xml_import importa con dettaglio minimo:

# change Livello di dettaglio Fatture elettroniche to Minimo
partner.e_invoice_detail_level = "0"

lo imposta sul partner prima di importare la fattura, puoi fare allo stesso modo.
Oppure, forse sarebbe più semplice

aggiungere un controllo sul tipo di move nel test che usa il dettaglio minimo.

(da #4229 (review))

@matteoopenf
Copy link
Contributor Author

Il test test_16_xml_import importa con dettaglio minimo:

# change Livello di dettaglio Fatture elettroniche to Minimo
partner.e_invoice_detail_level = "0"

lo imposta sul partner prima di importare la fattura, puoi fare allo stesso modo.
Oppure, forse sarebbe più semplice

aggiungere un controllo sul tipo di move nel test che usa il dettaglio minimo.

(da #4229 (review))

ok provo ad aggiustare li, grazie mille

@matteoopenf matteoopenf force-pushed the 14.0-import_minimo_without_line branch from 9a92d35 to e92c1eb Compare July 15, 2024 07:48
@matteoopenf
Copy link
Contributor Author

@SirAionTech ho aggiunto il test e ci dovremmo essere ora, ho anche fatto il porting sulla pr 16.0

@SirAionTech
Copy link
Contributor

@SirAionTech ho aggiunto il test e ci dovremmo essere ora, ho anche fatto il porting sulla pr 16.0

Grazie, potresti includere il test nello stesso commit della sua correzione?
Così è chiaro che le due parti di codice sono collegate, senza dover risalire fino a questa PR.

@matteoopenf
Copy link
Contributor Author

@SirAionTech ho aggiunto il test e ci dovremmo essere ora, ho anche fatto il porting sulla pr 16.0

Grazie, potresti includere il test nello stesso commit della sua correzione? Così è chiaro che le due parti di codice sono collegate, senza dover risalire fino a questa PR.

ok due minuti e li unisco

Added check if invoice_line_ids is valorize to check the price_unit, if is not valorize stop the method because is not possibile assume the line is negative
Added test to veryfy when I imported a invoice with Minimo is not converted to credit, because have not lines to check
@matteoopenf matteoopenf force-pushed the 14.0-import_minimo_without_line branch from e92c1eb to c12e401 Compare July 15, 2024 08:14
@matteoopenf
Copy link
Contributor Author

@SirAionTech fatto

Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-4229-by-SirAionTech-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ecebae4 into OCA:14.0 Jul 15, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 06235d7. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment