concatenate firstname and lastname and fill into name field in odoo
问题 I have module which has three fields •name •first name •last name When a user press save The first name and last name will concatenate and displayed in name field. Name Field must be in read only mode. def onchange_name(self, cr, uid, ids, firstname, lastname, context=None): value = {'fullname' : True} if firstname and lastname: value['fullname'] = firstname + " " +lastname return {'value': value} <field name="fullname" readonly="True" on_change="onchange_fullname(fullname,context)"/> <field