You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
426 B

# -*- coding: utf-8 -*-
from openerp import models, fields, api
from openerp.addons.beesdoo_base.tools import concat_names
class Partner(models.Model):
_inherit = 'res.partner'
first_name = fields.Char('First Name')
last_name = fields.Char('Last Name', required=True)
@api.onchange('first_name', 'last_name')
def _on_change_name(self):
self.name = concat_names(self.first_name, self.last_name)