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 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
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.name or partner.commercial_partner_id.name,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"name1": partner.name or partner.commercial_partner_id.name,
"name1": partner.name or partner.parent_name

Thanks for your contribution.
But the commercial partner name should not be used, because this belongs maybe not to the actual address.
You should better use partner.parent_name. Like it is done in the contact widget of odoo. https://github.com/odoo/odoo/blob/cc0060e889603eb2e47fa44a8a22a70d7d784185/odoo/addons/base/views/ir_qweb_widget_templates.xml#L8

Copy link
Contributor

Choose a reason for hiding this comment

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

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