From 30bc765271e90683a9283b25dea707fa1fc25f28 Mon Sep 17 00:00:00 2001 From: "Ahmed Khalaf (ahkh)" Date: Tue, 31 May 2022 13:51:49 +0000 Subject: [PATCH] [IMP] stock: edit picking locations stock picking source and destination locations are editable until done state Task: 2764771 Part-of: odoo/odoo#91640 --- addons/stock/models/stock_picking.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 5d0b2f29d65..6731c0fe05d 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -318,13 +318,13 @@ class Picking(models.Model): location_id = fields.Many2one( 'stock.location', "Source Location", default=lambda self: self.env['stock.picking.type'].browse(self._context.get('default_picking_type_id')).default_location_src_id, - check_company=True, readonly=True, required=True, - states={'draft': [('readonly', False)]}) + check_company=True, required=True, + states={'done': [('readonly', True)]}) location_dest_id = fields.Many2one( 'stock.location', "Destination Location", default=lambda self: self.env['stock.picking.type'].browse(self._context.get('default_picking_type_id')).default_location_dest_id, - check_company=True, readonly=True, required=True, - states={'draft': [('readonly', False)]}) + check_company=True, required=True, + states={'done': [('readonly', True)]}) move_ids = fields.One2many('stock.move', 'picking_id', string="Stock Moves", copy=True) move_ids_without_package = fields.One2many( 'stock.move', 'picking_id', string="Stock moves not in package", compute='_compute_move_without_package',