28 lines
1010 B
Python
28 lines
1010 B
Python
import logging
|
|
from odoo import api, fields, models
|
|
from odoo.exceptions import UserError
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class WxworkApproval(models.Model):
|
|
_name = 'wxwork.approval'
|
|
_description = "审批"
|
|
inherit = ['mail.thread', 'mail.activity.mixin']
|
|
_order = 'id desc'
|
|
|
|
template_id = fields.Char(string='审批模板id')
|
|
business_model = fields.Many2many('sale.order', 'sale_approval_rel', 'sale_id', 'approval_id', string='业务类型')
|
|
approve_history_ids = fields.One2many('wxwork.approval.history', 'approve_id', string='审批流程')
|
|
state = fields.Char(string='状态')
|
|
|
|
|
|
class WxworkApprovalHistory(models.Model):
|
|
_name = 'wxwork.approval.history'
|
|
_description = "审批"
|
|
|
|
template_id = fields.Char(string='审批模板id')
|
|
business_model = fields.Many2many('sale.order', 'sale_approval_rel', 'sale_id', 'approval_id', string='业务类型')
|
|
approve_flow = fields.Char(string='审批流程')
|
|
state = fields.Char(string='状态')
|