Skip to content

Commit

Permalink
[FIX] partner_firstname : bug "create and edit" from invoice and sale…
Browse files Browse the repository at this point in the history
… order OCA#1757 OCA#1725
  • Loading branch information
rpinset authored and Joachim David committed Oct 14, 2024
1 parent bf0922d commit efd7dc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion partner_firstname/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ 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:
if (
"firstname" in fields_list or "lastname" in fields_list
) and "name" not in fields_list:
fields_list.append("name")
result = super().default_get(fields_list)

Expand Down

0 comments on commit efd7dc2

Please sign in to comment.