Skip to content

Commit

Permalink
fix issue #3884, add test and update CONTRIBUTORS
Browse files Browse the repository at this point in the history
  • Loading branch information
salvorapi authored and SylweKra committed Jan 20, 2025
1 parent cf850e8 commit f5a7d14
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Contributors
* Giovanni Serra <[email protected]>
* Gianmarco Conte <[email protected]>
* Marco Colombo <https://github.com/TheMule71>

* Salvo Rapisarda <https://github.com/salvorapi>
* `Aion Tech <https://aiontech.company/>`_:

* Simone Rubino <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Giovanni Serra <[email protected]>
* Gianmarco Conte <[email protected]>
* Marco Colombo <https://github.com/TheMule71>

* Salvo Rapisarda <https://github.com/salvorapi>
* `Aion Tech <https://aiontech.company/>`_:

* Simone Rubino <[email protected]>
1 change: 1 addition & 0 deletions l10n_it_fatturapa_in/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
<li>Giovanni Serra &lt;<a class="reference external" href="mailto:giovanni&#64;gslab.it">giovanni&#64;gslab.it</a>&gt;</li>
<li>Gianmarco Conte &lt;<a class="reference external" href="mailto:gconte&#64;dinamicheaziendali.it">gconte&#64;dinamicheaziendali.it</a>&gt;</li>
<li>Marco Colombo &lt;<a class="reference external" href="https://github.com/TheMule71">https://github.com/TheMule71</a>&gt;</li>
<li>Salvo Rapisarda &lt;<a class="reference external" href="https://github.com/salvorapi">https://github.com/salvorapi</a>&gt;</li>
<li><a class="reference external" href="https://aiontech.company/">Aion Tech</a>:<ul>
<li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;aion-tech.it">simone.rubino&#64;aion-tech.it</a>&gt;</li>
</ul>
Expand Down
22 changes: 22 additions & 0 deletions l10n_it_ricevute_bancarie/tests/test_riba.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,28 @@ def test_unsolved_riba(self):
wiz_accreditation.create_move()
self.assertEqual(riba_list.state, "accredited")

# credit wizard with skip
credit_wizard = (
self.env["riba.accreditation"]
.with_context(
{
"active_model": "riba.distinta",
"active_ids": [riba_list_id],
"active_id": riba_list_id,
}
)
.create(
{
"bank_amount": 95,
"expense_amount": 5,
}
)
)
credit_wizard.skip()
self.assertEqual(riba_list.state, "accredited")

self.assertEqual(riba_list.line_ids[0].state, "accredited")

# past due wizard
wiz_unsolved = (
self.env["riba.unsolved"]
Expand Down
4 changes: 3 additions & 1 deletion l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def skip(self):
active_id = self.env.context.get("active_id") or False
if not active_id:
raise UserError(_("No active ID found."))
self.env["riba.distinta"].browse(active_id).state = "accredited"
riba_distinta = self.env["riba.distinta"].browse(active_id)
riba_distinta.state = "accredited"
riba_distinta.line_ids.state = "accredited"
return {"type": "ir.actions.act_window_close"}

def create_move(self):
Expand Down

0 comments on commit f5a7d14

Please sign in to comment.