[FIX] purchase: customer lang

Introduced by f7f18ba5b1
The lang of the customer must be used.
In the drop shipping use case (order.location_id.usage == 'customer'), the customer
is in the destination address of the order (order.dest_address_id).

opw:647628
This commit is contained in:
Goffin Simon 2015-08-24 10:10:26 +02:00
parent 772112e8d0
commit 6947313cd0
1 changed files with 1 additions and 1 deletions

View File

@ -747,7 +747,7 @@ class purchase_order(osv.osv):
price_unit = self.pool.get('res.currency').compute(cr, uid, order.currency_id.id, order.company_id.currency_id.id, price_unit, round=False, context=context)
res = []
if order.location_id.usage == 'customer':
name = order_line.product_id.name
name = order_line.product_id.with_context(dict(context or {}, lang=order.dest_address_id.lang)).name
else:
name = order_line.name or ''
move_template = {