Skip to content

Commit

Permalink
Merge PR #66 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 3, 2025
2 parents 67e75e6 + 3bc2fc5 commit e6ffa61
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions agreement_rebate/tests/test_agreement_rebate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from odoo.tests.common import Form, TransactionCase, tagged


@freeze_time("2022-02-01 09:30:00")
@tagged("-at_install", "post_install")
class TestAgreementRebate(TransactionCase):
@classmethod
Expand Down Expand Up @@ -117,9 +116,7 @@ def create_invoice(cls, partner):
move_form = Form(
cls.env["account.move"].with_context(default_move_type="out_invoice")
)
move_form.invoice_date = fields.Date.from_string(
"{}-01-01".format(fields.Date.today().year)
)
move_form.invoice_date = fields.Date.from_string("2022-01-01")
move_form.ref = "Test Customer Invoice"
move_form.partner_id = partner
products = (
Expand All @@ -142,6 +139,7 @@ def create_invoice_line(cls, invoice_form, products):
line_form.price_unit = 500.00

# Create Agreements rebates for customers for all available types
@freeze_time("2022-02-01 09:30:00")
def create_agreements_rebate(self, rebate_type, partner):
agreement = self.Agreement.create(
{
Expand Down Expand Up @@ -371,6 +369,7 @@ def _create_invoice_wizard(self):
wiz_create_invoice_form.agreement_type_ids.add(self.agreement_type)
return wiz_create_invoice_form.save()

@freeze_time("2022-02-01 09:30:00")
def test_invoice_agreements(self):
# Create some rebate settlements
agreement = self._create_agreement_product_filter("section_total")
Expand Down

0 comments on commit e6ffa61

Please sign in to comment.