c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #04111
[Bug 537858] Re: on_change event does not pass context to the method!
I propose to drop this request for 6.0, as it's out of the scope and would imply a risky refactoring of all addons.
Instead, we plan to implement a better and more extensible mechanism for on_change parameters after v6.0, and it makes sense to do this at the same time. This is part of the product backlog post-v6, so it won't be forgotten.
** Changed in: openobject-addons
Importance: Undecided => Low
** Changed in: openobject-addons
Status: Confirmed => Won't Fix
** Changed in: openobject-client
Importance: Undecided => Low
** Changed in: openobject-client
Status: Confirmed => Won't Fix
** Changed in: openobject-server
Importance: Undecided => Low
** Changed in: openobject-server
Status: Confirmed => Won't Fix
** Changed in: openobject-client-web
Importance: Undecided => Low
** Changed in: openobject-client-web
Status: Confirmed => Won't Fix
--
on_change event does not pass context to the method!
https://bugs.launchpad.net/bugs/537858
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: Won't Fix
Status in OpenObject GTK Client: Won't Fix
Status in OpenObject Web Client: Won't Fix
Status in OpenObject 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.