[FIX] stock: Cancelled DO changed to Ready
State to reproduce the bug: - Let's consider a 2 steps delivery setting - Create a SO with a product P and a quantity Q and confirm it - Pick: Deliver a smaller quantity than Q, don't create a backorder but duplicate the Pick and validate it with the remaining quantity. - Out: the initial delivery order OUT P1 does not allow the reservation, so cancel it and duplicate it (let's call it P2). - Click on Mark to do on P2 Bug: The initial picking OUT P1 was changed in state Ready instead of keeping in state Cancelled opw:2339217 closes odoo/odoo#60391 X-original-commit: 61734cdaf1cf6857125b1ece63928ab080359c6c Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Co-authored-by: Whenrow <whe@odoo.com>
This commit is contained in:
@@ -203,7 +203,7 @@ class SaleOrder(models.Model):
|
||||
picking_id = picking_id[0]
|
||||
else:
|
||||
picking_id = pickings[0]
|
||||
action['context'] = dict(self._context, default_partner_id=self.partner_id.id, default_picking_id=picking_id.id, default_picking_type_id=picking_id.picking_type_id.id, default_origin=self.name, default_group_id=picking_id.group_id.id)
|
||||
action['context'] = dict(self._context, default_partner_id=self.partner_id.id, default_picking_type_id=picking_id.picking_type_id.id, default_origin=self.name, default_group_id=picking_id.group_id.id)
|
||||
return action
|
||||
|
||||
def action_cancel(self):
|
||||
|
||||
Reference in New Issue
Block a user