Poping up Mail-Wizard during workflow

Asked by Samuel Bissig (Toradex)

We have been looking for the following:

After an action (i.e. sale order confirmation) an e-mail should be sent. The user should still have the possibility to change the mail text, so the mail should not be sent in the background immediately but a poweremail wizard should pop up.

This is possible, if you create a new client action accessing a Mail form and add it as server action to the workflow (i.e. wait_invoice action). The problem using this solution is that attachments are not sent, because the rel_model_ref of the power_mail_wizard.py is not set. By changing the the following line in the _defaults:

'rel_model_ref': lambda self,cr,uid,ctx:ctx['active_id']

to

'rel_model_ref': lambda self,cr,uid,ctx:ctx['active_id'] or ctx['active_ids'][0],

We have solved this issue.

Our question: Is there a better way to solve this? Is it possible, that this change in the code is added to the branch?

Thanks a lot,

Samuel

Question information

Language:
English Edit question
Status:
Answered
For:
Power Email Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) said :
#1

Hi,

Thanks for the suggestion. Extremely busy these days..
Please wait for two days. I think the solution required is more straight forward .

I think this is a common requirement and it should be possible to set this from the template form itself like how server actions are set automatically.

Is it possible that you can make a bug out of this describing the issue and marking it as wishlist? because questions are never part of releases.

Cheers

Sharoon

Can you help with this problem?

Provide an answer of your own, or ask Samuel Bissig (Toradex) for more information if necessary.

To post a message you must log in.