Skip to content
Snippets Groups Projects
Commit 01f97eee authored by IEL's avatar IEL
Browse files

[FIX] delivery: choose delivery method by partner_shipping_id


Steps:

* Create a delivery method (1) restricted to Spain (any country would do)
* Create a delivery method (2) restricted to Madagascar (same)
* Create a partner, main company, whose country is Spain and the default
delivery method is the first one.
* Create a delivery address for that customer with Madagascar as country and the
default delivery method as the second one.
* Now place a new quotation with such partner and set the delivery address to
the one of Madagascar (multiple addresses setting must be on).

Before:

* The delivery method for the quotation is set to the one restricted to Spain
although we're sending it to Madagascar.

After:

* The delivery method for the quotation is set to the one restricted to
Madagascar.

---

opw-2348336

closes odoo/odoo#59879

X-original-commit: 535d429960a0347d01c528c2440c2b8e9ff2fb51
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent c36acb47
Branches
Tags
No related merge requests found
......@@ -56,7 +56,7 @@ class SaleOrder(models.Model):
carrier = self.carrier_id
else:
name = _('Add a shipping method')
carrier = self.with_company(self.company_id).partner_id.property_delivery_carrier_id
carrier = self.with_company(self.company_id).partner_shipping_id.property_delivery_carrier_id
return {
'name': name,
'type': 'ir.actions.act_window',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment