Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] l10n_es_partner: Corregido mostrar dirección completa tras rellenar nombre comercial #3857

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions l10n_es_partner/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ def _compute_display_name(self):
)
no_display_commercial = self.env.context.get("no_display_commercial")
for partner in self:
if no_display_commercial or not name_pattern or not partner.comercial:
super(ResPartner, partner)._compute_display_name()
else:
super(ResPartner, partner)._compute_display_name()
if partner.comercial and not no_display_commercial and name_pattern:
partner.display_name = name_pattern % {
"name": partner.complete_name,
"comercial_name": partner.comercial,
"name": partner.display_name,
"comercial_name": partner.comercial or "",
}
return True

Expand Down
Loading