From d2b4b3909eccf71098887045bfe2bb3e4f5d372a Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 15 Jun 2015 10:09:01 +0200 Subject: [PATCH] [IMP] stock: Improve lots with serial numbers, define lot tracking by picking type and convert stock with lot False to a lot when necessary Instead of having only outgoing, manufacturing, incoming, all... traceability on the product, we can define on the product if there is no tracking, lot tracking or unique serial number tracking. On the picking type we can define whether we will only create lots for the picking type or use existing lots. The lots are required when the product and the picking type demand it. The option for serial number will check that each piece (quantity 1) has its own serial number. A lot splitting wizard is added on the pack operations in the picking form. We want to be able to handle the case where we receive a lot of iPads e.g. and we only assign a serial number when the product is delivered. For this, when the product is delivered, we see that we only have products with no lots. When we see that we take something without lot for something that needed one, we assign the lot to that piece of stock. For negative quants: a positive quant with no lot can reconcile with a negative quant with/without lot, a positive quant with lot, will preferably reconcile with a negative quant with the same lot, afterwards with that without lot. --- addons/mrp/mrp_view.xml | 3 - addons/mrp/product.py | 1 - addons/mrp/stock.py | 21 +- addons/mrp/wizard/mrp_product_produce.py | 8 +- .../mrp/wizard/mrp_product_produce_view.xml | 4 +- addons/mrp_repair/mrp_repair.py | 2 +- addons/stock/__openerp__.py | 3 +- addons/stock/product.py | 18 +- addons/stock/product_view.xml | 4 +- addons/stock/stock.py | 253 ++++++++++-------- addons/stock/stock_view.xml | 26 +- addons/stock/wizard/__init__.py | 1 + addons/stock/wizard/stock_lot_split.py | 70 +++++ addons/stock/wizard/stock_lot_split.xml | 47 ++++ addons/stock/wizard/stock_pack_details.py | 17 +- addons/stock/wizard/stock_pack_details.xml | 21 +- addons/stock_account/stock_account.py | 4 +- 17 files changed, 309 insertions(+), 194 deletions(-) create mode 100644 addons/stock/wizard/stock_lot_split.py create mode 100644 addons/stock/wizard/stock_lot_split.xml diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 4f00214f7f4..83b8e51e002 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -555,9 +555,6 @@ product.template - - -