'Test search ordered by a translated field.'

def test_104_orderby_translated_field(self):

    padawans = self.env['res.partner.category'].create({'name': 'Padawans'})
    padawans_fr = padawans.with_context(lang='fr_FR')
    padawans_fr.write({'name': 'Apprentis'})
    categories = padawans_fr.search([('id', 'in', [self.customers.id, padawans.id])], order='name')
    self.assertEqual(categories.ids, [padawans.id, self.customers.id], 'Search    ordered    by    translated    name    should    return    Padawans    (Apprentis)    before    Customers    (Clients)')
