public function getReport($model, $ids, $type = 'qweb-pdf')
	{
		$params = $this->buildParams(array(
			$model,
			$ids,
			array(
				'model' => $model,
				'id' => $ids[0],
				'report_type' => $type
			)
		));

		$client = $this->getClient('report');

		$reportId = $client->call('report', $params);

		$state = false;

		while (!$state) {
			$report = $client->call(
				'report_get',
				$this->buildParams(array($reportId))
			);

			$state = $report['state'];

			if (!$state) {
				sleep(1);
			}
		}

		return base64_decode($report['result']);
	}