Odoo Help

0

Android app, 'object has no attribute pop'

By
Lefteris L
on 11/11/13, 10:46 AM 1,500 views

Ok so i'm building this android app base on openERP and i'm currently stuck with create.

I managed to login fine and pretty much got an idea about everything works but i'm stuck at the following two errors for hours.

First is " 'str' object has no attribute 'pop' ".

Second one is " 'pop() takes at most 1 argument (2 given)' ".

I'm using XMLRPC with minor modifications since for errors it returns int while openERP returns string.

Below is the create function im calling

public void Create(Object[] Params) throws XMLRPCException{
    Log.d("Reached","Create before configured");
    if (configured){
        Log.d("Reached","reached Create");
        String name = "konto";
        String lang = "en_EN";
        Object[] pop = {"konto"};
        rtype="create";
        uri = URI.create(server+"/xmlrpc/object");
        client = new XMLRPCClient(uri);
        XMLRPCMethod method = new XMLRPCMethod("execute",this);
           //i believe i need help with the line below 
        Object[] params = {dbname,Integer.parseInt(userid),dbpass,model,"create", pop};
        method.call(params); 

    }
}

Tried various ways of declaring the pop as well as parsing String but still haven't figured out how to pass the parameters to create something.

In this case i'm trying to create a costumer so model is res.partner.

All help is appreciated. Thank you

0
ELIASS BENFATEH
On 4/11/16, 6:35 AM

Nonepop means that instead of an instance of whatever Class or Object you think you're working with, you've actually got 

None

. That usually means that an assignment or function call up above failed or returned an unexpected result.

0
hanane
On 4/9/16, 5:44 PM

I have the same problem did you fix it? 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 11/11/13, 10:46 AM
Seen: 1500 times
Last updated: 4/11/16, 6:35 AM