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

How can I query the Consumed Products using the API?

By
CVE
on 11/24/13, 9:38 AM 961 views

Hello all,

I am currently writing a small OpenErp Android app to achieve basic tasks with a mobile. I have successfully connected to the database, and I can easily display all the Manufacturing orders, by querying the "mrp.production" model.

I have now succesfully displayed a list of MO, and all the details.

My question is quite simple, how is it possible (which model should I query?) to display the Consumed Products list for every of these MO?

This is the current list of field I can read with this command: List<HashMap<String, Object>> list = oc.read("mrp.production", ids, new String[0]);

{location_src_id=[Ljava.lang.Object;@41e3fd88
product_uos=false,
 date_finished=2013-10-31 17:27:30, 
company_id=[Ljava.lang.Object;@41e40140, 
sale_name=false, 
product_id=[Ljava.lang.Object;@41e40c78, 
date_start=2013-10-31 17:26:39, 
move_created_ids=[Ljava.lang.Object;@41e40a70, 
bom_id=[Ljava.lang.Object;@41e40980, 
state=done, 
move_created_ids2=[Ljava.lang.Object;@41e40598, 
product_uom=[Ljava.lang.Object;@41e3f510, 
date_planned=2013-10-30 00:00:00, 
product_uos_qty=0.0, 
cycle_total=0.0,
 location_dest_id=[Ljava.lang.Object;@41e413b8,
 id=6,
 allow_reorder=false, 
date_planned_date=2013-10-30, 
priority=1, 
name=MO/00006, 
date_planned_end=2013-10-30 00:00:00, 
user_id=false, 
hour_total=0.0, 
product_lines=[Ljava.lang.Object;@41e40408,
 move_lines=[Ljava.lang.Object;@41e406a0, 
workcenter_lines=[Ljava.lang.Object;@41e40e40, 
product_qty=40080.0, 
move_prod_id=[Ljava.lang.Object;@41e41148, o
rigin=OP/00002, 
picking_id=[Ljava.lang.Object;@41e41520, 
move_lines2=[Ljava.lang.Object;@41e3f758, 
routing_id=false, sale_ref=false}

Thank a lot.

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

1 follower(s)

Stats

Asked: 11/24/13, 9:38 AM
Seen: 961 times
Last updated: 3/16/15, 8:10 AM