summaryrefslogtreecommitdiff
path: root/addons/stock_picking_batch/tests/test_batch_picking.py
AgeCommit message (Collapse)Author
2020-08-20[IMP] delivery, stock(_picking_batch): add "Put In Pack" buttonTiffany Chang (tic)
This commit sets up the logic and adds the button for "Put in Pack" action that already exists in stock.picking. Reuse/extension of logic from stock.picking reused where possible, including extension of pack wizard to handle products with different destination. Note that logic to handle "Delivery Packaging" wizard when "Delivery Methods" is active was purposely not extended to work correctly in batch pickings due to complexity of adding in a new module just to handle conflicting carrier_ids across pickings in the same batch. It is expected that this use case will not occur except in case of user error. Additionally, stock.picking implementation of 'put_in_pack' method has been renamed to 'action_put_in_pack' to have consistent naming (and support enterprise level code). Part of "1. Improve Batch Pickings" specification of overall barcode improvements task. Task: 1884520 Enterprise PR: odoo/enterprise#12086 Closes: odoo/odoo#55096
2020-08-20[IMP] stock_picking_batch: add "Scheduled Date" fieldTiffany Chang (tic)
This commit adds a "Scheduled Date" field to the batch pickings. Logic behind this date is a bit tricky: 1. If "Scheduled Date" is edited directly in batch then this date will also be applied to all of its picking's "Schedule Date"s. 2. If "Scheduled Date" is not edited directly in the batch, then this date will be the earliest date of its assigned pickings and pickings will maintain their original scheduled date' including if picking scheduled date is changed. 3. If "Scheduled Date" is not edited directly and all pickings are removed or there are none then date will default to no date. First cut of test for scheduled_date logic has also been added. Update will be needed for testing onchange logic since it is currently not supported by the tests.Form due to M2M widget used with O2M picking_ids (M2M widget is used for when doing a "Add a Line" transfer to a batch in backend). Additionally this commit adds the 'scheduled_date' and 'operation_type' to the kanban view. Part of "1. Improve Batch Pickings" specification of overall barcode app improvements task. Task: 1884520 Enterprise PR: odoo/enterprise#12086 Upgrade PR: odoo/upgrade#1569 Closes: odoo/odoo#55096
2020-01-31[IMP] stock_picking_batch: display moves and move linesSimon Lejeune
* allow to directly edit the move lines of the batched transfers * add a check availability button if any move is not assigned yet task-2069646
2019-12-06[REF] stock: immediate and backorder wizard multiSimon Lejeune
followup of rev [0] If these wizards are called on multiple pickings, display the list of the pickings that could be impacted and allow to select which one should be impacted. We also adapt the sanity checks at the start of `button_validte` in order to specify the concerned pickings if needed. We do not enable the multi behavior for batch at the moment, so it's only enabled for the validate multi in the list view. [0] 6ab4b0d4967490ed1ee0559ec296da6637705125 task-2069646 closes odoo/odoo#41497 X-original-commit: ff276c6484b138982f185ec9c832f2dbf25baaef Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-25[REF] stock_picking_batch: use picking button_validate multiSimon Lejeune
2019-09-03[REF] stock_picking_batch: multi companySimon Lejeune
Ensure proper domains are applied and enforced on relation fields thanks to the `check_company` attributes. task-1985992
2019-07-31[REF] stock: tests commonSimon Lejeune
This class referenced demo data but even if they weren't installed, the tests were passing. Remove the definition and usages. closes odoo/odoo#35343 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2018-09-18[REF] stock: `_action_done` and cache invalidationArnold Moyaux
`_action_done` could unlink a quant. This happens when moving a product from a location to another one and makes null the quantity of this product in one of theses locations. In this case, we unlink the quant because it is now useless and could be confusing on reports based on quants. The unwanted side effect is that unlinking a record will invalidate the cache. In some pathologic cases, like making an inventory adjustment of 600 products and reseting their quantity back to 0, the time of the operation is around 15 minutes. With this patch that tries to work carefully with the cache invalidation, the same operations takes around 15 secondes. This commit do not unlink quant anymore, instead it use a 'garbage collector' on quants without quantity. The garbage collector is trigger on the scheduler and when the user open the inventory view.
2017-09-26[IMP] stock_picking_batch: ask for qty done and backorderamoyaux
Previsously picking batch done button automatically run backorder for picking that need and set a quantity done for picking without it This commit changes the function done for picking wave in order to call the needed wizard(set qty_done automatically or asking for a backorder). Also it override the immediate transfer wizard in order to pass the picking to backorder found in done function through the process action. pick_to_backorder_ids is needed in immediate transfer since we need to pass the backorders from the done function in stock_picking_batch through the immediate transfer wizard.