From 00e898069d51d5348c700162fe5c53b5002bb712 Mon Sep 17 00:00:00 2001 From: santiky Date: Sat, 25 Sep 2021 15:51:38 +0200 Subject: [PATCH] =?UTF-8?q?Cambia=20el=20tipo=20de=20las=20ubicaciones=20d?= =?UTF-8?q?e=20los=20dep=C3=B3sitos=20de=20salida=20a=20tr=C3=A1nsito=20pa?= =?UTF-8?q?ra=20evitar=20que=20se=20calculen=20en=20las=20cantidades=20a?= =?UTF-8?q?=20mano.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stock_picking_deposito/models/res_partner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_picking_deposito/models/res_partner.py b/stock_picking_deposito/models/res_partner.py index c4ab8f1..bbc9e8e 100644 --- a/stock_picking_deposito/models/res_partner.py +++ b/stock_picking_deposito/models/res_partner.py @@ -43,13 +43,13 @@ class ResPartner(models.Model): def create(self, vals): if vals.get('deposit_sale_accept', False) == True: vals['deposit_sale_location_id'] = self.env['stock.location'].create({ - 'usage': 'internal', + 'usage': 'transit', 'name': vals.get('name'), 'location_id': self.env.ref('stock_picking_deposito.stock_location_deposits_stock').id }).id if vals.get('deposit_buy_accept', False) == True: vals['deposit_buy_location_id'] = self.env['stock.location'].create({ - 'usage': 'internal', + 'usage': 'transit', 'name': vals.get('name'), 'location_id': self.env.ref('stock_picking_deposito.location_deposit_buy').id }).id @@ -59,13 +59,13 @@ class ResPartner(models.Model): def write(self, vals): if ( vals.get('deposit_sale_accept', False) == True ) and not self.deposit_sale_location_id: vals['deposit_sale_location_id'] = self.env['stock.location'].create({ - 'usage': 'internal', + 'usage': 'transit', 'name': self.name, 'location_id': self.env.ref('stock_picking_deposito.stock_location_deposits_stock').id }).id if ( vals.get('deposit_buy_accept', False) == True ) and not self.deposit_buy_location_id: vals['deposit_buy_location_id'] = self.env['stock.location'].create({ - 'usage': 'internal', + 'usage': 'transit', 'name': self.name, 'location_id': self.env.ref('stock_picking_deposito.location_deposit_buy').id }).id