Skip to content

Commit

Permalink
[IMP] make payments overridable too
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMule71 committed Jul 15, 2022
1 parent fa02435 commit fec1bc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion l10n_it_fatturapa_out_rc/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import efattura
from . import wizard_export_fatturapa
13 changes: 7 additions & 6 deletions l10n_it_fatturapa_out_rc/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# Copyright 2021 Alex Comba - Agile Business Group
# Copyright 2022 Marco Colombo - Phi srl - <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models

from .efattura import EFatturaOut


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

@api.model
def _get_efattura_class(self):
return EFatturaOut

@api.model
def getSign(self, invoice):
sign = 1
Expand All @@ -23,6 +18,12 @@ def getSign(self, invoice):
sign = -1
return sign

@api.model
def getTemplateValues(self, template_values):
template_values = super().getTemplateValues(template_values)
template_values.update({"get_sign": self.getSign})
return template_values

@api.model
def getPayments(self, invoice):
payments = super().getPayments(invoice)
Expand Down

0 comments on commit fec1bc1

Please sign in to comment.