diff --git a/partner_firstname/models/res_partner.py b/partner_firstname/models/res_partner.py index f61bff4cb6f..cab8a9170e4 100644 --- a/partner_firstname/models/res_partner.py +++ b/partner_firstname/models/res_partner.py @@ -65,6 +65,8 @@ def copy(self, default=None): @api.model def default_get(self, fields_list): """Invert name when getting default values.""" + if "firstname" in fields_list or "lastname" in fields_list: + fields_list.append("name") result = super().default_get(fields_list) inverted = self._get_inverse_name(