Skip to content
Snippets Groups Projects
Commit ae61ed7f authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] delivery: Delivery method zip using the customer not shipping address


The available_carriers must be computed according to the shipping address.

opw:1967445

closes odoo/odoo#32693

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 027ff77a
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ class SaleOrder(models.Model):
def _compute_available_carrier(self):
carriers = self.env['delivery.carrier'].search([])
for rec in self:
rec.available_carrier_ids = carriers.available_carriers(rec.partner_id) if rec.partner_id else carriers
rec.available_carrier_ids = carriers.available_carriers(rec.partner_shipping_id) if rec.partner_id else carriers
def get_delivery_price(self):
for order in self.filtered(lambda o: o.state in ('draft', 'sent') and len(o.order_line) > 0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment