summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2020-10-19 10:29:30 +0000
committerGoffin Simon <sig@odoo.com>2020-10-20 17:26:21 +0000
commit6910438fe5f86bc85eab589f434c4f2980943736 (patch)
treee0aae2693cceb5baaa9f91007a158d6f5f90bb46
parent797878862a0315fe92026ef4015b3ae6ea177cf6 (diff)
[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#60390 X-original-commit: 61734cdaf1cf6857125b1ece63928ab080359c6c Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Co-authored-by: Whenrow <whe@odoo.com>
-rw-r--r--addons/sale_stock/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py
index b805e6a9137..e856e9a1732 100644
--- a/addons/sale_stock/models/sale_order.py
+++ b/addons/sale_stock/models/sale_order.py
@@ -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):