Commit 19be84b
committed
[FIX] l10n_it_edi_extension: when importing an XML with DatiRitenuta or DatiCassaPrevidenziale
get
TypeError: AccountMoveInherit._l10n_it_edi_search_tax_for_import() got an unexpected keyword argument 'vat_only'
The vat_only parameter has been in l10n_it_edi_withholding since the beginning of Odoo 18. Importing invoices that have withholding/pension fund taxes has never worked with l10n_it_edi_extension installed.
The error only triggers when the imported XML contains DatiRitenuta or DatiCassaPrevidenziale sections (withholding or pension fund data), because that's when l10n_it_edi_withholding calls the method with vat_only=False. Regular invoices without those sections work fine since the base module never passes vat_only.
When l10n_it_edi_withholding._l10n_it_edi_get_extra_info() calls self._l10n_it_edi_search_tax_for_import(..., vat_only=False), Python dispatches to the most derived override — which is l10n_it_edi_extension's version. But that version doesn't accept vat_only, hence the TypeError.1 parent 2a49142 commit 19be84b
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
424 | 429 | | |
425 | 430 | | |
426 | 431 | | |
| |||
438 | 443 | | |
439 | 444 | | |
440 | 445 | | |
| 446 | + | |
441 | 447 | | |
442 | 448 | | |
443 | 449 | | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
| 454 | + | |
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
| 462 | + | |
455 | 463 | | |
456 | 464 | | |
457 | 465 | | |
| |||
0 commit comments