Hello Ayoub,
I don't explained why i don't use standard duplicate method because it is not the problem here.
But to explain the purpose here:
My client need 2 duplicate method : The standard one and an other wich name differently the copied record.
That's why i add an new item duplicate wich call an overriden copy method with a context and the standard duplicate menu call the same overriden copy method but without context.
Like the context is different i can do different things before call the super copy method.
All of that works well.
My problem is when i choose standard duplicate menu, i'm on the new record after copy but if i choose the new duplicate menu, i stay on the first record (but the copy is done).
I tried after call super copy to return an action like that but it doesn't works!
return {
'type': 'ir.actions.act_window',
'res_model': 'sale.order',
'res_id': new_so.id,
'view_type': 'form',
'target': 'current',
}