Skip to content

Commit

Permalink
[IMP]l10n_it_riba_sale_commission:fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matteonext authored and OCA-git-bot committed Dec 9, 2024
1 parent ea06478 commit 79c21d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion l10n_it_riba_sale_commission/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def _get_reconciled_invoices_partials(self):
> date.today()
) and riba_type == "sbf":
to_remove.append((partial, amount, counterpart_line))
return [item for item in invoice_partials if item not in to_remove]
return [
item for item in invoice_partials if item not in to_remove
], exchange_diff_moves


class AccountInvoiceLineAgent(models.Model):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2023 Nextev
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html

from datetime import datetime

from dateutil.relativedelta import relativedelta

Expand Down Expand Up @@ -330,12 +331,10 @@ def test_riba_settlement(self):
def test_riba_partial_settlement(self):
date = fields.Date.today()
invoice = self._create_invoice(
date - relativedelta(days=100),
self.partial_payment_term,
self.partial_commission_net_paid,
date, self.partial_payment_term, self.partial_commission_net_paid
)
self.register_payment(invoice)
self._settle_agent(self.agent_monthly, 1)
self._settle_agent(self.agent_monthly, 1, date_payment_to=datetime.now())
settlements = self.env["commission.settlement"].search(
[
(
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
odoo16-addon-commission@git+https://github.com/OCA/commission/pull/561/head#subdirectory=setup/commission
odoo-addon-commission @ git+https://github.com/OCA/commission.git@refs/pull/561/head#subdirectory=setup/commission

0 comments on commit 79c21d2

Please sign in to comment.