Skip to content
Permalink
Browse files

[FIX] stock: computation of quantity on hand

On the product form view, the stat button computing the quantity on hand
doesn't give the same result as the quants list triggered by this button
- What's displayed in the stat button of the quantity on hand ?
   1 get the view location of all the warehouses
   2 built the generation tree from the view locations
   3 get all the quants for those locations

- What's displayed in the quants list of the quantity on hand ?
   1 get all the quants stored in internal locations

This commit share the same logic for those two views, by building the
generation tree for the view location then filter on internal locations

Task : 1929515
  • Loading branch information...
Whenrow committed Apr 18, 2019
1 parent 8c402ca commit 633101273a38072e7bff3195682edacf516c0841
Showing with 7 additions and 0 deletions.
  1. +7 −0 addons/mrp/data/mrp_demo.xml
@@ -722,5 +722,12 @@
<value eval="[ref('mrp.mrp_production_laptop_cust')]"/>
</function>

<!-- set 'create component' as True for the demo manufacturing picking type
while leaving the default value to False for the others -->
<function model="stock.picking.type" name="write">
<value model="stock.picking.type" search="[('id', '=', obj().env.ref('stock.warehouse0').manu_type_id.id)]"/>
<value eval="{'use_create_components_lots': True}"/>
</function>

</data>
</odoo>

0 comments on commit 6331012

Please sign in to comment.
You can’t perform that action at this time.