Remove the '.id' in searcher methods of sale and purchase
In sale and purchase modules the functional sales and purchases fields are
defined on invoice model with a searcher method.
If these fields are added in the invoice tree view and we search the
invoices related to a sale, an SQL error appears because the sales id is compared with a string.
The problem is the last .id in the domain of the searcher method.
More details in https://groups.google.com/forum/#!topic/tryton-dev/cYUdRw1DP2o