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

[FIX] delivery: Delivery method name not translated

When adding a SO line with a delivery method (e.g. The Post) for a customer
with a different language that the one set on the current language, the description
of the SO line was not translated. Inspired from function 'product_id_change' in
model 'sale.order.line'

opw:1843934
parent 6de80364
Branches
Tags
No related merge requests found
......@@ -89,9 +89,10 @@ class SaleOrder(models.Model):
taxes_ids = self.fiscal_position_id.map_tax(taxes, carrier.product_id, self.partner_id).ids
# Create the sales order line
carrier_name = carrier.product_id.with_context(lang=self.partner_id.lang).name_get()[0][1]
values = {
'order_id': self.id,
'name': carrier.name,
'name': carrier_name,
'product_uom_qty': 1,
'product_uom': carrier.product_id.uom_id.id,
'product_id': carrier.product_id.id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment