i have a custom module in odoo 12 and i need to send mail automatically to users who assigned to do work; When i saving the record
i have created the email template also
i already have 'create' function for generating the sequence number like
@api.model
def create(self, vals):
if vals.get('seq_name', _('New')) == _('New'):
vals['seq_name'] = self.env['ir.sequence'].next_by_code('test.sequence') or _('New')
result = super(Test, self).create(vals)
return result
how can i solve this, Can i write the mail sending code inside this function ???
Please help me to fix this
Most of the time we need to send an email after successfully completion of some tasks or event. To day I will show you how to send an email in odoo using button click.
Reference: https://goo.gl/z16PBZ