diff options
| author | Josse Colpaert <jco@odoo.com> | 2014-12-11 17:13:25 +0100 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2014-12-12 10:48:00 +0100 |
| commit | 723f532e572dacb2f189b3fee38401ca9f52e1cd (patch) | |
| tree | e7c73f522ac1d647250e55411a4a59aea0aaae20 | |
| parent | 562fc998bf841f78698bb8006a6ef1d84ff03fc3 (diff) | |
[IMP] Changing product qty on product form should work with serial numbers like in 7.0, but we should explain it
Closes #3984
| -rw-r--r-- | addons/stock/wizard/stock_change_product_qty.py | 2 | ||||
| -rw-r--r-- | addons/stock/wizard/stock_change_product_qty_view.xml | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py index 961eb2e0aef..8843581d70a 100644 --- a/addons/stock/wizard/stock_change_product_qty.py +++ b/addons/stock/wizard/stock_change_product_qty.py @@ -98,7 +98,7 @@ class stock_change_product_qty(osv.osv_memory): 'product_id': data.product_id.id, 'location_id': data.location_id.id, 'lot_id': data.lot_id.id}, context=context) - product = data.product_id.with_context(location=data.location_id.id) + product = data.product_id.with_context(location=data.location_id.id, lot_id= data.lot_id.id) th_qty = product.qty_available line_data = { 'inventory_id': inventory_id, diff --git a/addons/stock/wizard/stock_change_product_qty_view.xml b/addons/stock/wizard/stock_change_product_qty_view.xml index 10bad736bb2..7c11189d1c3 100644 --- a/addons/stock/wizard/stock_change_product_qty_view.xml +++ b/addons/stock/wizard/stock_change_product_qty_view.xml @@ -10,7 +10,11 @@ <field name="new_quantity" /> <field name="product_id" invisible="1"/> <field name="location_id" groups="stock.group_locations"/> - <field name="lot_id" context="{'search_default_product_id':product_id,'default_product_id':product_id}" groups="base.group_no_one"/> + <field name="lot_id" context="{'search_default_product_id':product_id,'default_product_id':product_id}" groups="stock.group_production_lot"/> + <p groups="stock.group_production_lot" class="oe_grey"> + When you select a serial number (lot), the quantity is corrected with respect to + the quantity of that serial number (lot) and not to the total quantity of the product. + </p> </group> <footer> <button name="change_product_qty" string="_Apply" type="object" class="oe_highlight"/> |
