新增审批模型及相关页面

This commit is contained in:
jinling.yang
2023-05-31 17:44:27 +08:00
parent fd943df012
commit 29acd4d879
6 changed files with 91 additions and 6 deletions

View File

@@ -5,5 +5,5 @@ from . import wxwork_approval_template_controls
from . import wxwork_settings
from . import wxwork_approval_template_summary
from . import we_approval_record
from . import wxwork_approval
# from . import res_config_setting

View File

@@ -0,0 +1,27 @@
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='状态')