Browse Source

[FIX] Change label on different firstname and last name and name field to make them easier to differianciate

pull/105/head
Thibault Francois 6 years ago
committed by Elouan
parent
commit
cce67fee85
  1. 6
      partner_firstname/models/partner.py

6
partner_firstname/models/partner.py

@ -15,7 +15,7 @@ class Partner(models.Model):
firstname = fields.Char('First Name') firstname = fields.Char('First Name')
lastname = fields.Char('Last Name', required=True, default="/") lastname = fields.Char('Last Name', required=True, default="/")
name = fields.Char(compute='_get_name', inverse='_set_name', store=True)
name = fields.Char(compute='_get_name', inverse='_set_name', store=True, string="Full Name")
@api.depends('firstname', 'lastname') @api.depends('firstname', 'lastname')
def _get_name(self): def _get_name(self):
@ -33,5 +33,5 @@ class Partner(models.Model):
rec.lastname = rec.name rec.lastname = rec.name
#Compatibility with old name use in beedoo #Compatibility with old name use in beedoo
last_name = fields.Char(related='lastname')
first_name = fields.Char(related='firstname')
last_name = fields.Char(related='lastname', string="Last Name (Legacy)")
first_name = fields.Char(related='firstname', string="Frist Name (Legacy)")
Loading…
Cancel
Save