openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #11324
[Bug 537858] Re: on_change event does not pass context to the method!
*** This bug is a duplicate of bug 900861 ***
https://bugs.launchpad.net/bugs/900861
** This bug has been marked a duplicate of bug 900861
on_change doesn't pass context, no translations on exceptions
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/537858
Title:
on_change event does not pass context to the method!
Status in OpenERP Addons (modules):
Won't Fix
Status in OpenERP GTK Client:
Won't Fix
Status in OpenERP Web Client:
Won't Fix
Status in OpenERP Server:
Won't Fix
Bug description:
I wrote on_change event on product_id field in my object form to fill
up another 'Description' field value with product name but what I
notice it product name can not fetch according to language selected in
preferences it fetch only English name.
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
res = {'desc': ''}
if product_id:
product = self.pool.get('product.product').read(cr, uid, product_id, ['name'], context)
res['desc'] = product['name'] and product['name'] or ''
return {'value':res}
I also try to print context which I passed in 'onchange_product_id'
and its print blank dictionary and there for it can not pass in
product object's read method and product name cant fetch according to
context language.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/537858/+subscriptions