When a backorder was created and the auto_batch was activated for this picking_type, no batch was assigned to the created backorder, even if it matched the auto-batch criterias. Now when a picking is done, we check if backorders were created. If they are eligible for auto-batchs (given their picking_type, etc.), they also get the auto_batch done for them. We can't simply use the previous picking's batch, because if this batch is now done, then introducing a non-done picking into the batch would raise an inconsistency between the pickings' states and raise an error. Removes the old override of backorder confirmation as now batch dissociation is done in the picking's 'action_done()' override. Allows the validation of a batch that has pickings 'waiting for another operation', as they now will get removed from the batch in the process, no longer blocking the batch's validation. Finally, makes that pickings that had no quantities done when validating a batch aren't cancelled when selecting 'No backorder' in the confirmation wizard, but are instead removed from the batch. Task-2971346 X-original-commit: 1720840b7bd9b3e3e90f7cf860f60f1d0746ce63 Part-of: odoo/odoo#102382
7 lines
209 B
Python
7 lines
209 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import stock_picking_to_batch
|
|
from . import stock_add_to_wave
|
|
from . import stock_package_destination
|