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 16ef3c4d4810d6cb3c8d008478dbce76572b6f86
Showing with 9 additions and 0 deletions.
  1. +9 −0 addons/mrp/data/mrp_demo.xml
@@ -722,5 +722,14 @@
<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 16ef3c4

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