Skip to content

Commit

Permalink
FIX l10n_it_fatturapa_out: it does not depend on l10n_eu_oss_oca so i…
Browse files Browse the repository at this point in the history
…t can't use oss_country_id
  • Loading branch information
eLBati committed Jan 12, 2024
1 parent c8e6153 commit 0eff971
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 0 additions & 2 deletions l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def _key(tax_id):
out_computed[key] = {
"AliquotaIVA": aliquota,
"Natura": tax_line_id.kind_id.code,
"Oss Country": tax_line_id.oss_country_id,
# 'Arrotondamento':'',
"ImponibileImporto": tax_id.tax_base_amount,
"Imposta": abs(tax_id.balance),
Expand Down Expand Up @@ -168,7 +167,6 @@ def _key(tax_id):
out[key] = {
"AliquotaIVA": aliquota,
"Natura": tax_id.kind_id.code,
"Oss Country": tax_id.oss_country_id,
# 'Arrotondamento':'',
"ImponibileImporto": line.price_subtotal,
"Imposta": 0.0,
Expand Down
1 change: 1 addition & 0 deletions l10n_it_fatturapa_out_oss/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import l10n_eu_oss_wizard
from . import wizard_export_fatturapa
13 changes: 13 additions & 0 deletions l10n_it_fatturapa_out_oss/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, models


class WizardExportFatturapa(models.TransientModel):
_inherit = "wizard.export.fatturapa"

@api.model
def getAllTaxes(self, invoice):
out = super().getAllTaxes(invoice)
for tax_line_id in out:
tax_line = self.env["account.tax"].browse(tax_line_id)
out[tax_line_id]["Oss Country"] = tax_line.oss_country_id
return out

0 comments on commit 0eff971

Please sign in to comment.