diff --git a/stock_picking_deposito/models/stock_picking.py b/stock_picking_deposito/models/stock_picking.py index 0bcae08..1882dd8 100644 --- a/stock_picking_deposito/models/stock_picking.py +++ b/stock_picking_deposito/models/stock_picking.py @@ -25,6 +25,10 @@ class Picking(models.Model): super(Picking, self).onchange_picking_type() if self.picking_type_id.is_deposit and self.partner_id: self.change_dest_location() + if self.partner_id and self.location_id == self.env.ref("stock_picking_deposito.stock_location_deposits_stock"): + self.update({ + 'location_id': self.partner_id.deposit_sale_location_id.id, + }) def change_dest_location(self): if self.picking_type_id.code == 'internal':