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

[14.0][FIX] delivery_schenker: Use display_name in name1 field of address #805

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion delivery_schenker/models/delivery_carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def _prepare_schenker_address(
"""
vals = {
"type": address_type,
"name1": partner.name,
"name1": partner.display_name,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this can happen when the address belongs to another partner (likely the company) and itself has no name. Then maybe better user partner.name or partner.parent_id.name. This will prevent the possibility of sending internal info, and when there is no parent, or the parent has no name, using display_name will not help anyway.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RuudFreshfilter How about using partner.name or partner.commercial_partner_id.name then?

Copy link
Author

@RuudFreshfilter RuudFreshfilter Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that sounds like a good solution. I applied that.

"locationType": location_type, # POSTAL or PHYSICAL
"personType": person_type, # PERSON OR COMPANY
"street": partner.street,
Expand Down
Loading