This bug occurs when I need to send something via context, for example
if I use this code on my view:

<field name="line_product_ids" required="1 colspan="4" nolabel="1"
on_change="on_change_lines(parent.raw_material_long, line_product_ids)"
context="{'relations': context.get('relations')}"/>

line_product_ids is a one2many field on my form,  whit this view on a editable 
tree, context is not evaled
when I pressed new button of one2many widget, instead context is evaled only 
when I press down key,
because my editable tree use editable="bottom".

I debugged the client and saw that the way to add the new line on one2many 
widget is different when I
press the button new, and when I press the down key.  

On bin/widget/view/tree_gtk/editabletree.py the method on_create_line eval the 
context on, but this method
is called only from key_down or key_up.  Instead when I press the new button 
the way to create the new
line on one2many widget is different, and the context for some reason is not 
send to my class, I when I want
to redefine the search method and want to read my var, context is empty.

-- 
v6 rc1 context not evaled on new button on editable tree
https://bugs.launchpad.net/bugs/661509
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject GTK Client: New

Bug description:
When I use a new button on a editable tree, context is not evaluated.
To fix this I change model_new on class ModelRecordGroup on 
bin/widget/model/group.py
 whit this code:

    def model_new(self, default=True, domain=[], context={}):
        ctx2 = self.context.copy()
        ctx2.update(context)
        self.context = ctx2
        ....
        ....





_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to