def METHOD_NAME(self):
    invoice = self.create_invoice(self.supplier_intraEU, [], post=False)
    move_line_model = self.env["account.move.line"]
    move_line_model.create(
        {
            "account_id": self.invoice_line_account.id,
            "move_id": invoice.id,
            "price_unit": 100,
            "rc": True,
        }
    )
    with self.assertRaises(UserError):
        invoice.action_post()