c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #06490
Re: [Bug 684616] [NEW] Sale order line, onchange_product_id unicode problem
On Friday 03 December 2010, you wrote:
> Public bug reported:
>
> I'm testing openobject-addons revision 3954.
>
> addons/sale.py line 1060 on product_id_change method :
>
> warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ")
> + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
>
> if type_ul.name is unicode text then getting UnicodeEncodeError.
>
That was a good catch!
The _() +str() + _() concatenation was problematic all the way. It should be a
single string (translatable) where the "%s" operator (works with unicode, too)
will substitute the values.
Fix prepared, will push to trunk on the next patch.
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/684616
Title:
Sale order line, onchange_product_id unicode problem
Status in OpenObject Addons Modules:
Confirmed
Bug description:
I'm testing openobject-addons revision 3954.
addons/sale.py line 1060 on product_id_change method :
warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
if type_ul.name is unicode text then getting UnicodeEncodeError.
References