Skip to content

Commit

Permalink
* l10n_it_fatturapa_in_rc, fix set rc flag
Browse files Browse the repository at this point in the history
  • Loading branch information
GSLabIt committed May 24, 2022
1 parent 0283785 commit bb8e54e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions l10n_it_fatturapa_in_rc/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from odoo import _, models
from odoo import _, api, models
from odoo.tools import float_compare


class InvoiceLine(models.Model):
_inherit = "account.move.line"

def _set_rc_flag(self, invoice):
self.ensure_one()
@api.depends("move_id", "move_id.fiscal_position_id", "tax_ids")
def _compute_rc_flag(self):
if "fatturapa.attachment.in" in self.env.context.get("active_model", []):
# this means we are importing an e-invoice,
# so RC flag is already set, where needed
return
return super(InvoiceLine, self)._set_rc_flag(invoice)
super()._compute_rc_flag()


class Invoice(models.Model):
Expand Down
4 changes: 4 additions & 0 deletions l10n_it_fatturapa_in_rc/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Sergio Corato <info@efatto.it>
* Lorenzo Battistini <https://github.com/eLBati>
* Marco Colombo <https://github.com/TheMule71>

* `Ooops <https://www.ooops404.com>`_:

* Giovanni Serra <giovanni@gslab.it>

0 comments on commit bb8e54e

Please sign in to comment.