Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use 'read_group' method in mobile application ? #390

Open
naitikvithlani opened this issue Jun 14, 2019 · 0 comments
Open

How to use 'read_group' method in mobile application ? #390

naitikvithlani opened this issue Jun 14, 2019 · 0 comments

Comments

@naitikvithlani
Copy link

I am able to call search_read, create, unlink, write methods of odoo.

When I try to call 'read_group' at the same way like other methods using URL ending with "web/dataset/call_kw" getting below error.

URL:
http://192.168.0.114:9090/web/dataset/call_kw

Header Params:

X-Openerp-Session-Id: fab3bXXXXXXXXXXXXXXb6fe72e4164fe956cd7
Content-Type: application/json

Body Params:

{
    "jsonrpc": "2.0",
    "method": "call_kw",
    "params": {
    	"method": "read_group",
        "model": "sale.order",
        "fields": [
            "user_id", "amount_total"
        ],
        "domain": null,
        "offset": 0,
        "limit": 0
    }
}

Error response :

{
    "jsonrpc": "2.0",
    "id": null,
    "error": {
        "message": "Odoo Server Error",
        "code": 200,
        "data": {
            "debug": "Traceback (most recent call last):\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 641, in _handle_exception\n    return super(JsonRequest, self)._handle_exception(exception)\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 683, in dispatch\n    result = self._call_function(**self.params)\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 333, in _call_function\n    return checked_call(self.db, *args, **kwargs)\n  File \"/home/evo8/odoo10c+e/odoo/service/model.py\", line 101, in wrapper\n    return f(dbname, *args, **kwargs)\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 326, in checked_call\n    result = self.endpoint(*a, **kw)\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 941, in __call__\n    return self.method(*args, **kw)\n  File \"/home/evo8/odoo10c+e/odoo/http.py\", line 506, in response_wrap\n    response = f(*args, **kw)\nTypeError: call_kw() got an unexpected keyword argument 'domain'\n",
            "exception_type": "internal_error",
            "message": "call_kw() got an unexpected keyword argument 'domain'",
            "name": "exceptions.TypeError",
            "arguments": [
                "call_kw() got an unexpected keyword argument 'domain'"
            ]
        }
    }
}

Any can suggest how to implement this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant