This question has been flagged
1 Reply
3124 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

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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?

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