summaryrefslogtreecommitdiff
path: root/addons/delivery
diff options
context:
space:
mode:
authorIEL <iel@odoo.com>2020-10-08 13:58:29 +0000
committerIEL <iel@odoo.com>2020-10-13 14:42:14 +0000
commit01f97eee4e767dd28cf07bb1ef8528e0a3c6c0e1 (patch)
treefebf913f6db44e162112f537dd368cca18709de9 /addons/delivery
parentc36acb474f23524e1f67f3606c0a070c0412abe6 (diff)
[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: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/delivery')
-rw-r--r--addons/delivery/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/delivery/models/sale_order.py b/addons/delivery/models/sale_order.py
index 10fd1d9cea4..d1100ecbde9 100644
--- a/addons/delivery/models/sale_order.py
+++ b/addons/delivery/models/sale_order.py
@@ -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',