You can do it by creating a new functional field for res.partner that inspects whether the current partner is a company or not and generates a new kanban name for it accordingly. Something like this:
from openerp.osv import osv, fields
class Partner(osv.Model):
_inherit = 'res.partner'
def _get_kanban_name(self, cr, uid, ids, field_name, arg, context):
res = {}
for record in self.browse(cr, uid, ids, context):
id = record['id']
is_company = record['is_company']
actual_name = record['name']
kanban_name = ""
if is_company:
kanban_name = actual_name + " - I'm a company"
else:
kanban_name = actual_name + " - I'm not a company"
res[id] = kanban_name
return res
_columns = {
'kanban_name': fields.function(_get_kanban_name, type='char', string='New kanban name')
}
After you've done that, you can override the base.res_partner_kanban_view like Ghanshyam described, and put your new kanban_name field there in the desired place. Hope that helps.
@Mind And Go Hello! Did you find the solution? I need to do exactly the same as you have asked, but I do not understand very well the answers, I tried them with any result. Can you help us?