Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
import xmlrpclib HOST = 'localhost' PORT = 8069 DB = 'demo' USER = 'admin' PASS = 'admin' url = 'http://%s:%d/xmlrpc/'%(HOST,PORT) object_proxy = xmlrpclib.ServerProxy(url+'object') common_proxy = xmlrpclib.ServerProxy(url+'common')
uid = common_proxy.login(DB,USER,PASS) print "Logged in as %s (uid:%d)"%(USER,uid) def execute(*args): return object_proxy.execute(DB, uid, PASS, *args)
mo_ids = execute('mrp.production', 'search', [('state','=','draft')]) print mo_ids
4 Confirm & Produce
for mo in mo_ids: # confirm MOs object_proxy.exec_workflow(DB,uid, PASS, 'mrp.production', 'button_confirm', mo) # You may want to add a step for Check availability or Force availability # produce MOs object_proxy.exec_workflow(DB,uid, PASS, 'mrp.production', 'button_produce', mo)
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 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
|Asked: 10/28/13, 6:30 PM|
|Seen: 1969 times|
|Last updated: 3/16/15, 8:10 AM|