odoo-jsonrpc icon indicating copy to clipboard operation
odoo-jsonrpc copied to clipboard

Feature: Add Custom Command Option to have empty Result.

Open obuchmann opened this issue 1 year ago • 0 comments

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;

obuchmann avatar Apr 17 '23 09:04 obuchmann