This question has been flagged
1 Reply
2621 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

 


Avatar
Discard

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

Author Best Answer

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)

Avatar
Discard