In some form_relate, i would add specific informations in the title (default_uom for instance). The suggestion is to update rec_name which is displayed after the form_relate action name in the title. But, i don't want this rec_name in all my forms...
So another suggestion is to update this rec_name following the context...
Indeed, but how? It seems context used by form_relate to get_rec_name with RPCExecute use a default context that can't be updated
Here's the context used when getting rec_name with RPCExecute:
{"params":[[1],["rec_name"],{"language":"en","employee.rec_name":"Maxime Richez","locale":{"date":"%m/%d/%Y","thousands_sep":",","grouping":[3,3,0],"decimal_point":"."},"language_direction":"ltr","company.rec_name":"Saluc","groups":[5,6,18,1,15,2,3,4,11,10,12,14,13,16,17,8,7,9],"employee":1,"company":1}],"id":36,"method":"model.product.product.read"}
Context manually added in ir.action.act_window (XML) is in the context after the get_rec_name call when displaying the form.
Could we have some more details in the default context like "origin_action"?
Or updating ir.action to pass context here :
http://hg.tryton.org/tryton/file/default/tryton/action/main.py#l91
Thanks for help!
Added an issue: https://bugs.tryton.org/issue7454