Skip to content

[14.0][FIX] l10n_it_fatturapa_in - Errata importazione XML #4732

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

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

Chionne27
Copy link

@Chionne27 Chionne27 commented Apr 22, 2025

BWP #3808
Solves #3565

@Chionne27 Chionne27 force-pushed the 14.0-MIG-l10n_it_fatturapa_in-12236-Chionne27 branch from 6b7c2f3 to 299787a Compare April 22, 2025 12:15
@Chionne27 Chionne27 changed the title [14.0][FIX] l10n_it_fatturapa_in: Ignore nodes in DatiGeneraliDocumento [14.0][FIX] l10n_it_fatturapa_in - Errata importazione XML Apr 22, 2025
@francesco-ooops francesco-ooops linked an issue Apr 22, 2025 that may be closed by this pull request
2 tasks
Copy link

@Marco-ooops Marco-ooops left a comment

Choose a reason for hiding this comment

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

test effettuati:
IT08973230967_6zZcm.xml.zip
ho importato l'xml in allegato e ora se viene importato:

  • a livello minimo > il file viene importato come nota di credito anzichè come fattura, oltre ad avere anche l'importo errato;
  • a livello massimo > il file viene importato correttamente

VIDEO TEST

Copy link

@Marco-ooops Marco-ooops left a comment

Choose a reason for hiding this comment

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

test ok

@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). 🤖

Copy link

@SirPyTech SirPyTech 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 fatto revisione del codice e ho notato solo qualche svista, ma in buona parte va bene 👏

@Chionne27 Chionne27 force-pushed the 14.0-MIG-l10n_it_fatturapa_in-12236-Chionne27 branch from 299787a to 76c47c7 Compare April 30, 2025 13:01
@Chionne27
Copy link
Author

Chionne27 commented Apr 30, 2025

Ciao @aleuffre posso chiederti come si può risolvere questo errore? È.su un modulo diverso da quello di questa PR

2025-04-30 13:10:42,614 616 ERROR odoo odoo.tests.loader: Can not `import l10n_it_account_stamp`. 
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/loader.py", line 29, in _get_tests_modules
    mod = importlib.import_module('.tests', modpath)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/__init__.py", line 5, in <module>
    from . import test_account_stamp_invoicing
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py", line 2, in <module>
    from odoo.tools import first
ImportError: cannot import name 'first'

@aleuffre
Copy link
Contributor

Ciao @aleuffre posso chiederti come si può risolvere questo errore? È.su un modulo diverso da quello di questa PR

2025-04-30 13:10:42,614 616 ERROR odoo odoo.tests.loader: Can not `import l10n_it_account_stamp`. 
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/loader.py", line 29, in _get_tests_modules
    mod = importlib.import_module('.tests', modpath)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/__init__.py", line 5, in <module>
    from . import test_account_stamp_invoicing
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py", line 2, in <module>
    from odoo.tools import first
ImportError: cannot import name 'first'

Come puoi vedere da una breve ricerca, def first(...) è una funzione che in Odoo v14 è dichiarata in odoo.fields non in odoo.tools. Non credo sia questa PR a rompere i test, ma era questa #4685 (e non capisco come in quella PR i test siano passati)

@Chionne27
Copy link
Author

@aleuffre va bene allora se aggiungo un commit in questa PR in cui sistemo l'import?

@Chionne27 Chionne27 force-pushed the 14.0-MIG-l10n_it_fatturapa_in-12236-Chionne27 branch from 76c47c7 to dc2af49 Compare April 30, 2025 14:35
The values of DatiGeneraliDocumento/ScontoMaggiorazione and DatiGeneraliDocumento/ImportoTotaleDocumento are not checked in AdE, so we don't rely on them for totals or inconsistencies when importing an e-invoice
@Chionne27 Chionne27 force-pushed the 14.0-MIG-l10n_it_fatturapa_in-12236-Chionne27 branch from dc2af49 to eb7081e Compare April 30, 2025 14:43
@aleuffre
Copy link
Contributor

@aleuffre va bene allora se aggiungo un commit in questa PR in cui sistemo l'import?

Sarebbe ancora più pulita una PR separata, visto che è un fix da fare abbastanza urgentemente (immagino che blocchi tutte le PR della v14) e non si vuole vincolare l'accettazione del fix all'accettazione di questa PR

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

Successfully merging this pull request may close these issues.

[l10n_it_fatturapa_in] - Errata importazione XML
7 participants