Odoo Help

Welcome!

This community 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.

0

Comment synchroniser le mouvement du stock via xml-rpc-protocol (Odoo V9.0)

By
meriem HAKKANI
on 4/20/16, 4:17 AM 231 views

bonjour

je suis entrain de réaliser un web service avec xml-rpc-protocol (Odoo V9.0) et python pour pouvoir changer le stock d'un produit aprés avoir le scanner , comment 

faire via mon web service pour synchroniser <product.product>, <stock.picking>, <stock.move>, <sale.order> <stock.transfer_detail> .....

merci d'avance

 


Thanks for your contribution, but this is an english language forum. Could you please use english language?

Ermin Trevisan
on 4/20/16, 8:32 AM
0
meriem HAKKANI
On 4/20/16, 6:43 AM

j'ai trouver une solution

connection = openerplib.get_connection(hostname="localhost", database="admin", login="admin", password='odoo')

m = 'stock.change.product.qty'

model = connection.get_model(m)

v = {'prodlot_id': False, 'location_id': 12 , 'new_quantity': 99,'product_id' : 18}

stockID = model.create(v)

context = {'active_id': 18} # id of product!

res = model.change_product_qty([stockID], context)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 4/20/16, 4:17 AM
Seen: 231 times
Last updated: 5/11/16, 12:05 PM