Giter VIP home page Giter VIP logo

Comments (5)

a14n avatar a14n commented on May 25, 2024

If a No encoder to encode the value error occurs it's likely related to the specifics codecs you used. Note that you can skip encodeCodecs/decodeCodecs if you use the standard types of the xmlrpc spec.

Moreover after a quick look at the api, shouldn't it be res.partner instead of res_partner?

from dart-xmlrpc.

Pablo-ACF avatar Pablo-ACF commented on May 25, 2024

Hi thanks for the help, about the res.partner on my odoo instance its named res_partner just cause, and for the No encoder to encode the value I've tried with and without
xml_rpc.intCodec, xml_rpc.boolCodec, xml_rpc.stringCodec, xml_rpc.dateTimeCodec, xml_rpc.base64Codec, xml_rpc.structCodec, xml_rpc.arrayCodec,

from dart-xmlrpc.

a14n avatar a14n commented on May 25, 2024

Assuming db, pass are strings and uid is int, I don't see any reason the following code (without codecs) ends up with the errors No encoder to encode the value.

final test = xml_rpc
        .call(
            url,
            'execute_kw',
            [
              db,
              uid,
              pass,
              'res_partner',
              'search',
              [
                [
                  ['is_company', '=', true]
                ]
              ],
            ])
        .then((result) => print(result))
        .catchError((error) => print(error));

You should try to launch your program in debug mode and follow step by step to understand where this error is coming from.

from dart-xmlrpc.

Pablo-ACF avatar Pablo-ACF commented on May 25, 2024

Fixed that error, turns out the uid was instantiated a a Future<void> so there was the error.
Thanks for the help!

from dart-xmlrpc.

a14n avatar a14n commented on May 25, 2024

Glad you find the bug :)

from dart-xmlrpc.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.