Remove index from "type" field in sales, purchases and invoices


Sale, Purchase and Invoice lines have a “type” field but that field that is declared with “select=True” which creates an index to the database.

However, checking on several customer databases we see that the index is never used (pretty normal as I don’t think there are any places that use type in a domain).


We should remove “select=True” from those fields.

I guess we should also remove the index with the migration code. Although if somebody really needs it, is going to be annoyed by core removing it.


I think it does not deserve a blueprint and we already have an issue for that: Issue 5757: Make harder to create an index - Tryton issue tracker