xtuple/xtuple — pull request #1460 by bendiy (2014-05-08 20:08:04+00:00)
Title: Fix invoice performance.

This PR should resolve performance issues with XM.Invoice. A query like this was taking 35-45 seconds:

```sql

```
After this pull request, it returns in 312ms.

I do not know what impact removing `salesOrderLine` from here will have on the mobile client:
enyo-client/extensions/source/sales/database/orm/ext/invoice.json