code
picking = self.env['stock.picking'].sudo().create(pick)
for line in self:
move = {
'name': picking.name,
'product_id': line.product_id.id,
'product_uom_qty': line.product_qty,
'product_uom': line.product_id.uom_id.id,
'location_id': line.source_location.id,
'location_dest_id': line.destination_location.id,
'picking_id': picking.id,
'company_id': line.source_location.company_id.id,
}
self.env['stock.move'].sudo().create(move)
Error
The requested operation cannot be processed because of a programming error setting the `product_qty` field instead of the `product_uom_qty`.