def METHOD_NAME(self):
    self.env.company.write(
        {"with_vat_prorate": False}
    )  # We want to be sure that it is executed properly
    invoice = self.init_invoice(
        "out_invoice", products=[self.product_a, self.product_b]
    )
    self.assertEqual(4, len(invoice.line_ids))
    self.assertEqual(1, len(invoice.line_ids.filtered(lambda r: r.tax_line_id)))