Odoo Help


How to show available stock on manufacturing order?

on 3/12/15, 3:38 AM 899 views

Hi guys,

I'd like to show the available stock from a product on the manufacturing order(s) (Manufacturing > Manufacturing Orders) but I can't get this working.
In the XML file mrp_view.xml under the module mrp is a view named mrp.production.form and I want to add a field here that shows the available stock from the product.

                        <page string="Consumed Products">
                                <group string="Products to Consume1">
                                    <field name="move_lines" nolabel="1" options="{'reload_on_button': true}">
                                        <tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
                                            <field name="product_id"/>
                                            <field name="product_qty"  string="Quantity"/>
                        <field name="product_uos_qty" string="Incoming"/>
                        //NEW FIELD SHOULD BE HERE
             //.. irrelevant code

I've tried to create a new field in the view like this:

<field name="product_stock_available"/>

And in mrp.py on the model mrp.production like this:

'product_stock_available': fields.float('Product Qty Available'),

But this throws me errors. I've tried dozens of ways to get it to show up but nothing is working.. I should get the value from the model product.product (field qty_available) and this should be accessible in the view mrp.production.form (mrp_view.xml) somehow.

Could anybody tell me how to do this please?
Note: This is in OpenERP 7.


Hi,, did you try using functional field??

Baiju KS
on 3/12/15, 7:21 AM

Hi Baiju, no I haven't yet.. would this be possible? And how?

on 3/12/15, 8:00 AM

Anybody? I'm still looking for a solution :s

on 3/19/15, 3:36 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/12/15, 3:38 AM
Seen: 899 times
Last updated: 3/19/15, 3:36 AM