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.
<notebook>
<page string="Consumed Products">
<group>
<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.
Yenthe
Hi,, did you try using functional field??
Hi Baiju, no I haven't yet.. would this be possible? And how?
Anybody? I'm still looking for a solution :s