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

        $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);

        return $this->deleteById($model, $ids);
    }
public function delete($model)
    {
        if ($this->hasNotProvided($this->condition))
            return "To prevent deleting all records you must provide at least one condition. Using where method would solve this.";

        $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);

        return $this->deleteById($model, $ids);
    }
public function delete ( $ model ) { if ( $ this -> hasNotProvided ( $ this -> condition ) ) return "To prevent deleting all records you must provide at least one condition. Using where method would solve this." ; $ 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 ) ; return $ this -> deleteById ( $ model , $ ids ) ; }
Remove one or a group of records.
returns true except when an error happened.

@param string $model
@return true|string
@throws OdooException
Remove one or a group of records . returns true except when an error happened .