Skip to content

Commit

Permalink
[FIX] account_invoice_report_grouped_by_picking: Ensure exact search …
Browse files Browse the repository at this point in the history
…for tests instead of partial search

When installed with other modules (e.g., sale_order_line_sequence), this commit makes the assertion more specific to avoid inconsistencies. sale_order_line_sequence adds a similar span (<span>S00001/1</span>), causing duplicate searches.
  • Loading branch information
carlos-lopez-tecnativa committed Jul 16, 2024
1 parent e8fef5c commit d56bf77
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def test_account_invoice_group_picking(self):
0
].decode()
# information about sales is printed
self.assertEqual(tbody.count(self.sale.name), 1)
self.assertEqual(tbody.count(self.sale2.name), 1)
self.assertGreaterEqual(tbody.count(f"<span>{self.sale.name}</span>"), 1)
self.assertGreaterEqual(tbody.count(f"<span>{self.sale2.name}</span>"), 1)
# information about pickings is printed
self.assertTrue(self.sale.invoice_ids.picking_ids[:1].name in tbody)
self.assertTrue(self.sale2.invoice_ids.picking_ids[:1].name in tbody)
Expand Down

0 comments on commit d56bf77

Please sign in to comment.