Comment 2 for bug 530822

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Stephane, they where trying to extend the search so you could search by the contact name or first name.

But yes, that also meant that you can't longer search res.partner.job on some res.partner (cause the field name was used to store the partner id! That means that it will search on the contact's name with the partner id).

I propose this:
  - Revert the search method to the old version (revert changesets 2551 and 2568).
  - Add, to res.partner.job, two related or function fields, with store (so we can search in SQL), to the contact name and last name.
               'contact_name': fields.related('contact_id', 'name', type='char', size=30, string='Last Name'),
               'contact_first_name': fields.related('contact_id', 'first_name', type='char', size=30, string='First Name'),

And I repeat, in the released 5.0.7 version the res.parner.job search is severely broken:
  - From revno 2551 to revno 2567 you can't search by partner id properly (it searches on contact name with the partner id).
  - Since revno 2568 you can't search by contact_id (gives error).