openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #23365
[Bug 1116401] Re: function name_get : context not passed
*** This bug is a duplicate of bug 1088842 ***
https://bugs.launchpad.net/bugs/1088842
** This bug has been marked a duplicate of bug 1088842
Context is not transfered to one2many fields_view_get anymore
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1116401
Title:
function name_get : context not passed
Status in OpenERP Addons (modules):
New
Bug description:
Hello all,
When i try to pass a context inside a view which contains a
product.product one2many fields for instance, the function name_get of
the product.product doesn't receive the context specified in the view.
By this way i can't give severa representations of a product name
depending context.
Only the base context is passed (lang, uid, etc...)
Is this a bug or should OpenERP work this way?
Bellow is my code :
def name_get( cr.... context):
if 'contextkey' in context :
#do something for this context
if 'contextkey2' in context :
# do something else
in my view :
<record id="view1" model="ir.ui.view">
<field name="context">{'contextkey1':1}</field>
....
and other view
<record id="view2" model="ir.ui.view">
<field name="context">{'contextkey2':1}</field>
i tried to add context on the concerned product.product field one2
many, it works on edition (when i select the products) but when i save
the object, the context is not passed anymore and the default product
name displays.
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1116401/+subscriptions
References