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