Odoo Help


Field from one object to show in another object

on 1/5/14, 4:53 AM 1,134 views

For the Products table in Internal Moves of the Warehouse module, I want to add 4 columns from Inventory tab in Products, they are:

  1. Quantity On Hand
  2. Incoming
  3. Outgoing
  4. Forecasted Quantity

to be shown in the Internal Moves table in Form View.

From my understanding it seems that the Internal Moves is in stock.picking Object and those product columns in Inventory tab is in product.product Object. Then, I have to do some kind of _inherits in the python file. Is this right? If it is right, could you please tell me how to do it? (Maybe in pseudo steps or whatever) But if it is not correct, could you please describe how to accomplish this?

Thank you very much, Sincerely

abdelwahed chiheb
On 1/5/14, 5:17 AM

i added those colums to my sale_order_line by adding those columns to the table sale_order_line :

_columns = { 
'qty_available': fields.float('Qty Disponible',digits_compute= dp.get_precision('Product UoS')),

wg_qty_avail = self.pool.get('product.product').browse(cr,uid,product,context=None).qty_available

result['qty_available'] = wg_qty_avail

In XML file :

<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/form/group/group/field[@name='product_id']" position="after"> <field name="qty_available" string="Qty Disponible" class="chabata"/> </xpath>

Hope that will help you

I'm trying to follow your instruction, since it may be give me some clue. In your case, could you please tell me the name of the XML file that you edited?

on 1/5/14, 5:36 AM

it's a new custom module, iherit the view XML of SALE_ORDER_LINE (The form view)

abdelwahed chiheb
on 1/15/14, 6:42 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

0 follower(s)


Asked: 1/5/14, 4:53 AM
Seen: 1134 times
Last updated: 3/16/15, 8:10 AM