[IMP] send sms using recurring template
This commit is contained in:
parent
43e37518e8
commit
4bc61c1b25
|
|
@ -182,7 +182,15 @@ class DonationRecurring(models.Model):
|
|||
return False
|
||||
|
||||
def _recurring_confirm_sale_order(self, order):
|
||||
order.with_context(skip_donation_sms=not self.send_recurring_sms).action_confirm()
|
||||
template = self.env.company.donation_recurring_charged_sms_template_id
|
||||
bot = self.env.ref('base.partner_root').id
|
||||
order.with_context(skip_donation_sms=True).action_confirm()
|
||||
order._message_sms_with_template(
|
||||
template=template,
|
||||
partner_ids=order.partner_id.ids,
|
||||
put_in_queue=True,
|
||||
author_id=bot
|
||||
)
|
||||
self.message_post(
|
||||
body=_("✅ Sale Order <b>%s</b> created for donation dated %s.") % (order.name, order.date_order)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue