← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 514251] Re: Error in getting lang of description_sale of the product

 

@digitalsatori

The sale order line is used mainly to display the product in the partner's lang. When the partner lang is not defined on the partner form, we have two choices:
  - we use english
  - we use the lang of the user.

It's not only about the sale order line description, it's also the lang
of each external report that come from the partner form. If you print
several time the same sale order or the same invoice it's important that
it always appears in the same format/data, and not being dependent of
the user that prints the invoice/sale order.

The sale order line description (which is used for printing mainly)
should be consistent with the lang used in the reports. The lang used in
all reports is english if no other lang is defined. So, I invalidate
this bug.

This make me think about one improvement: when we install a new database
in an non english language, OpenERP should put a default value for all
partners' lang to the installation language.

** Changed in: openobject-addons
       Status: Confirmed => Invalid

-- 
Error in getting lang of description_sale of the product 
https://bugs.launchpad.net/bugs/514251
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Invalid

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_obj.browse(cr, uid, partner_id).lang

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_obj.browse(cr, uid, partner_id).lang:
            lang = partner_obj.browse(cr, uid, partner_id).lang

So only does the work if the partner has lang defined, otherwise lang is untouched (this works for me)