Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7438 Vizualizări

Im trying to confirm picking ( validate ) in odoo 10 using xmlrpc search works but not to call the model do_new_transfer

Maybe i cant do like this at all ? But how do I confirm picking ( validate ) via xmlrpc.

-- snippet ---

pick_id = models.execute_kw(db, uid, password,
    'stock.picking', 'search',
    [[['name', '=', 'WH/OUT/00002']]])

print pick_id

print models.execute_kw(
    db, uid, password, 'stock.picking', 'do_new_transfer', pick_id)

Imagine profil
Abandonează
Cel mai bun răspuns

Hello,

you need to pass parameters as a list.

Try this :

models.execute_kw(
    db, uid, password, 'stock.picking', 'do_new_transfer', [pick_id],{})

Calling methods

The second endpoint is xmlrpc/2/object, is used to call methods of odoo models via the execute_kw RPC function.

Each call to execute_kw takes the following parameters:

  • the database to use, a string
  • the user id (retrieved through authenticate), an integer
  • the user's password, a string
  • the model name, a string
  • the method name, a string
  • an array/list of parameters passed by position
  • a mapping/dict of parameters to pass by keyword (optional)

example :

models.execute_kw(db, uid, password,
    'res.partner', 'check_access_rights',
    ['read'], {'raise_exception': False})


Imagine profil
Abandonează
Autor

This worked perfectly, Thanks a lot :-)

Related Posts Răspunsuri Vizualizări Activitate
3
iul. 25
3008
1
nov. 24
18892
1
oct. 24
2191
1
apr. 24
2250
0
sept. 23
1749