Cambia el tipo de las ubicaciones de los depósitos de salida a tránsito para evitar que se calculen en las cantidades a mano.
This commit is contained in:
parent
82858796a4
commit
00e898069d
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue