On 2018-05-22 06:40, Maxime Richez wrote: > Hi, > > 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
I think the RPC call to get the rec_name should use the action_ctx. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180522135246.GQ27454%40kei.