[IMP] Improve ospp_base and ospp_slide modules
parent
ba7a03317f
commit
78a1c42803
|
@ -4,7 +4,7 @@ import random
|
|||
import requests
|
||||
from urllib.parse import urlencode
|
||||
import uuid
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import models, fields, api, tools, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
|
@ -162,6 +162,10 @@ class ChannelInstance(models.Model):
|
|||
is_notified = fields.Boolean('Is Notified', default=False)
|
||||
|
||||
def action_post_instance(self):
|
||||
"""
|
||||
发送实训环境地址和登录信息给用户...
|
||||
:return:
|
||||
"""
|
||||
partner_obj = self.env['slide.channel.partner'].sudo()
|
||||
for rec in self:
|
||||
subject = f"通知: 《{rec.channel_id.name}》实训环境已经生成"
|
||||
|
@ -170,7 +174,7 @@ class ChannelInstance(models.Model):
|
|||
<div>环境: {rec.service_url} \n</div>
|
||||
<div>账号: {rec.admin_account} \n</div>
|
||||
<div>密码: {rec.admin_password} \n</div>
|
||||
<div>课程: https://www.newbizpaas.cn/slides/{rec.channel_id.id} \n</div>
|
||||
<div>课程: {self.env['ir.config_parameter'].sudo().get_param("web.base.url")}/slides/{rec.channel_id.id} \n</div>
|
||||
|
||||
<div>预祝学习愉快!</div>
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue