in my module I call compose message wizard like this:
...the wizard shows but the send mail fails with access denied error because the user has no writing rights to the model . So I want to call the wizard with root privileges?
return {
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
'views': [(compose_form_id, 'form')],
'view_id': compose_form_id,
'target': 'new',
'context': ctx,
}
I know about sudo() but in this case I cannot use it. Is there a way to pass uid as a context to the action?