obuchmann / odoo-jsonrpc

PHP Odoo Json-RPC connector, prepared for laravel integration
MIT License
34 stars 11 forks source link

Feature: Add Custom Command Option to have empty Result. #8

Open obuchmann opened 1 year ago

obuchmann commented 1 year ago

e.g. project.project action_archive.

use Obuchmann\OdooJsonRpc\Odoo\Request\Request;

class ArchiveProject extends Request
{
    public function __construct(private int $projectId)
    {
        parent::__construct('project.project', 'action_archive');
    }

    public function toArray(): array
    {
        return [
            $this->projectId
        ];
    }

  public function hasResponse(): bool {
    return false;
  }
}

should be taken care at Obuchmann\OdooJsonRpc\JsonRpc\Client: makeResponse

Error thrown at: return $json->result;