I created a model with a many2one field 'project_id' pointed to the model 
'project.project', and I set an 'on_change_project_id(self, cr, uid, ids, 
project_id, context)' method on this field.

The problem is when the on_change method triggered, the current 'project_id' 
didn't actually passed as an argument into on_change method, instead,  the 
'context_project_id' on model 'res.users'  get passed.

I've noticed that the 'context_project_id''s value will automatically  insert 
into 'session.context' with key 'project_id', and I guess that the 'project_id' 
in the context actually interferes with the passing argument on on_change 
method. This sounds like a bug, any idea?

Currently I can workaround the problem by setting the field name other than 
'project_id' ,e.g. 'myproject_id', however, this really looks awkward.




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=59465#59465

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to