ERP-Ukraine / odoo-rpc-dart

Odoo RPC Library for Dart
MIT License
43 stars 32 forks source link

code: 200 , message: Odoo server error #18

Closed kururu-abdo closed 2 years ago

kururu-abdo commented 2 years ago

the method search_read worked fine but when i try to use method create it result in: {"jsonrpc": "2.0", "id": null, "error": {"code": 200, "message": "Odoo Server Error"}}

lem8r commented 2 years ago

Hi!

Method create must be called with empty kwargs even if they are not used.

Like so

var partner_id = await client.callKw({
  'model': 'res.partner',
  'method': 'create',
  'args': [
    {
      'name': 'Stealthy Wood',
    },
  ],
  'kwargs': {},
});

There might be other issues like expired session or security rules. Check your Odoo logs for traceback.