Skip to content

Commit

Permalink
Merge PR #1725 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Apr 18, 2024
2 parents c5377ed + 42c3f98 commit 6172d4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions partner_firstname/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6172d4c

Please sign in to comment.