23 lines
773 B
Python
23 lines
773 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class WxSettings(models.Model):
|
|
_name = 'wxwork.settings'
|
|
_description = '企业微信设置'
|
|
|
|
wx_work_app = fields.Char(string='企业微信应用名称')
|
|
wx_work_corp_id = fields.Char(string='企业微信CorpID')
|
|
wx_work_secret = fields.Char(string='企业微信Secret')
|
|
wx_work_templates = fields.One2many('wxwork.template.settings', 'wxwork_id', string='审批模板')
|
|
|
|
|
|
class WxTemplateSettings(models.Model):
|
|
_name = 'wxwork.template.settings'
|
|
_description = '企业微信模板设置'
|
|
|
|
sp_name = fields.Char(string='审批模板名称')
|
|
template_id = fields.Char(string='审批模板ID')
|
|
wxwork_id = fields.Many2one('wxwork.settings', string='企业微信')
|