Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1448 Zobrazení

comment envoyer des email from button submit in odoo 14

Avatar
Zrušit
Autor

def action_validate(self):
if len(self.loan_line_ids)<=0:
raise ValidationError(
_("Rien a Validé"))
self.env['extra.loan.approver'].create({
'loan_id': self.id,
'user_id': self.env.uid, 'date_approved': fields.Datetime.now(), 'state': 'approved'})
mail_template = self.env.ref('extra_rh.extra_loan_valid')
mail_template.send_mail(self.id, force_send=True)
self.write({'state':'approve'})

Related Posts Odpovědi Zobrazení Aktivita
2
čvn 24
3885
2
lis 23
3099
2
úno 21
2362
1
čvc 25
2250
2
čvc 25
7738