Skip to content

Commit

Permalink
Merge PR OCA#654 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by AaronHForgeFlow
  • Loading branch information
OCA-git-bot committed Mar 7, 2024
2 parents dc90b93 + 439ffc2 commit d9c1c6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions account_operating_unit/tests/test_payment_operating_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ def test_payment_from_invoice(self):

# Pay the invoice using a cash journal associated to the main company
ctx = {"active_model": "account.move", "active_ids": [self.invoice.id]}
payment_method_id = self.cash_journal_ou1.outbound_payment_method_line_ids[0]
register_payments = self.register_payments_model.with_context(**ctx).create(
{
"payment_date": time.strftime("%Y") + "-07-15",
"journal_id": self.cash_journal_ou1.id,
"payment_method_line_id": self.payment_method_manual_in.id,
"payment_method_line_id": payment_method_id.id,
}
)

Expand Down Expand Up @@ -56,11 +57,12 @@ def test_payment_from_two_invoices(self):

# Pay the invoices using a cash journal associated to the main company
ctx = {"active_model": "account.move", "active_ids": invoices.ids}
payment_method_id = self.cash_journal_ou1.outbound_payment_method_line_ids[0]
register_payments = self.register_payments_model.with_context(**ctx).create(
{
"payment_date": time.strftime("%Y") + "-07-15",
"journal_id": self.cash_journal_ou1.id,
"payment_method_line_id": self.payment_method_manual_in.id,
"payment_method_line_id": payment_method_id.id,
}
)

Expand All @@ -76,6 +78,7 @@ def test_payment_from_two_invoices(self):

def test_payment_transfer(self):
"""Create a transfer payment with journals in different OU"""
payment_method_id = self.cash_journal_ou1.outbound_payment_method_line_ids[0]
payment = self.payment_model.create(
{
"payment_type": "outbound",
Expand All @@ -84,7 +87,7 @@ def test_payment_transfer(self):
"journal_id": self.cash_journal_ou1.id,
"destination_journal_id": self.cash2_journal_b2b.id,
"destination_account_id": self.company.transfer_account_id.id,
"payment_method_line_id": self.payment_method_manual_in.id,
"payment_method_line_id": payment_method_id.id,
"is_internal_transfer": True,
}
)
Expand Down

0 comments on commit d9c1c6d

Please sign in to comment.