Error in getting lang of description_sale of the product
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Medium
|
Unassigned |
Bug Description
When the lang of the Partner is default (None), the sale.order.line product_id_change brings the english translation of the text, not the text of the default lang of the system (or the user one).
In the 926 of sale.py (product_id_change) if the partner lang is False (leave as blank lang defined) the lang var is getting False
if partner_id:
lang = partner_
Then when the lang is false the default behaviour of the system is using en_EN (i don't know the internals of translation module)
For solving the 926 line of sale.py can be changed:
if partner_id and partner_
lang = partner_
So only does the work if the partner has lang defined, otherwise lang is untouched (this works for me)
Just to shedding light on translations: when lang=False, you get en_EN because for the moment it's hardcoded. If I understand Fabien right, this is by design.
He commented on bug #400256 :
"I invalidate this bug. It's important for us to have a clean approach on being fully multi-languages. Everything must be in english and the server send translated versions to the client.
It's the same for dates, floats, ... Example: dates are stored in SQL format but the format is adapted at the client side depending on the user. For sentences, everything in the base module and fields are in english and the client send/receive translations according to the user."
Your solution is only good if that's what happens in other places (we need to keep thing coherent). If it's not, then please file a Blueprint, I'll support it as much as I can.
I hope this helps.
Lionel.