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']);
	}
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']);
	}
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' ] ) ; }
Get report for model

@param string $model Model
@param array  $ids   Array of id's, for this method it should typically be an array with one id
@param string $type  Report type

@return mixed A report file
Get report for model