[FIX] mail_composer_cc_bcc: find invoice regardless of the current year

pull/1277/head
Stefan Rijnhart 2024-01-04 10:11:18 +01:00 committed by Aungkokolin1997
parent 27e2f4f4f0
commit d85dc84159
1 changed files with 5 additions and 1 deletions

View File

@ -38,8 +38,12 @@ class TestMailCcBcc(TestMailComposer):
def open_invoice_mail_composer_form(self):
# Use form to populate data
for_name = [("name", "=", "INV/2023/00003")]
for_name = [("name", "like", "%INV/20__/00003")]
self.test_invoice = test_record = self.env["account.move"].search(for_name)
self.assertTrue(
self.test_invoice,
"Test setup did not succeeed. Invoice not found.",
)
ctx = {
"active_ids": test_record.ids,
"default_model": "account.move",