Cambiado el estado del nuevo albarán a borrador para poder editar las ubicaciones.

This commit is contained in:
santiky 2021-09-16 15:16:02 +02:00
parent 303a1c515c
commit 136ff98559
Signed by: snt
GPG key ID: A9FD34930EADBE71

View file

@ -22,7 +22,6 @@ class ProductTemplate(models.Model):
picking = self.env['stock.picking'].create(picking_vals)
for p in self:
_logger.warning("product : %s" %p.name)
move_vals = {
'name': p.name,
'product_id': p.id,
@ -31,7 +30,7 @@ class ProductTemplate(models.Model):
'picking_id': picking.id,
'location_id': self.env.ref('stock.stock_location_stock').id,
'location_dest_id': self.env.ref('stock.stock_location_stock').id,
'state': 'waiting',
'state': 'draft',
'procure_method': 'make_to_order',
}
picking.move_lines = [(0, 0, move_vals)]