Closed ShaoDaTao closed 7 months ago
I had a similar error after successful authentication, in my case it has to do with the company_id column of the res.partner model that is not returned after authentication. For now I simply removed the field from this file that is specific to the package waiting for the problem to be resolved.
Thanks for reporting! Please upgrade to v 0.5.4
environment: sdk: '>=2.16.0' dependencies: odoo_rpc: ^0.4.5
code:
main() async { final client = OdooClient('http://127.0.0.1:8069'); try { await client.authenticate('odoo17uat', 'admin', 'admin'); print(client); // final res = await client.callRPC('/web/session/modules', 'call', {}); // print('Installed modules: \n' + res.toString()); } on OdooException catch (e) { print(e); client.close(); exit(-1); } client.close(); }
err: Unhandled exception: type 'Null' is not a subtype of type 'int' in type cast
0 OdooSession.fromSessionInfo (package:odoo_rpc/src/odoo_session.dart:65:37)
1 OdooClient.authenticate (package:odoo_rpc/src/odoo_client.dart:262:32)