Why does pyQGIS QgsVectorLayer().isValid() return FALSE with Oracle views?
For VIEWS you have to define the column which uniquely identify features for the layer, try to add:
uri.setKeyColumn("your_unique_field")
For VIEWS you have to define the column which uniquely identify features for the layer, try to add:
uri.setKeyColumn("your_unique_field")