public function update($model, array $data)
    {
        if ($this->hasNotProvided($this->condition))
            return "To prevent updating all records you must provide at least one condition. Using where method would solve this.";

        $method = 'write';

        $ids = $this->search($model);

        //If string it can't continue for retrieving models
        //Throw exception with the error.
        if (is_string($ids))
            throw new OdooException($ids);

        $result = $this->call($model, $method, [$ids->toArray(), $data]);

        return $this->makeResponse($result, 0);
    }
public function update($model, array $data)
    {
        if ($this->hasNotProvided($this->condition))
            return "To prevent updating all records you must provide at least one condition. Using where method would solve this.";

        $method = 'write';

        $ids = $this->search($model);

        //If string it can't continue for retrieving models
        //Throw exception with the error.
        if (is_string($ids))
            throw new OdooException($ids);

        $result = $this->call($model, $method, [$ids->toArray(), $data]);

        return $this->makeResponse($result, 0);
    }
public function update ( $ model , array $ data ) { if ( $ this -> hasNotProvided ( $ this -> condition ) ) return "To prevent updating all records you must provide at least one condition. Using where method would solve this." ; $ method = 'write' ; $ ids = $ this -> search ( $ model ) ; //If string it can't continue for retrieving models //Throw exception with the error. if ( is_string ( $ ids ) ) throw new OdooException ( $ ids ) ; $ result = $ this -> call ( $ model , $ method , [ $ ids -> toArray ( ) , $ data ] ) ; return $ this -> makeResponse ( $ result , 0 ) ; }
Update one or more records.
returns true except when an error happened.

@param string $model
@param array $data
@return true|string
@throws OdooException
Update one or more records . returns true except when an error happened .