24 lines
749 B
Python
24 lines
749 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import api, fields, models, tools, _
|
|
from odoo.exceptions import ValidationError
|
|
|
|
|
|
class ApprovalRequest(models.Model):
|
|
_inherit = "approval.request"
|
|
|
|
approval_category_name = fields.Selection(string="类别名称", related='category_id.approval_type')
|
|
|
|
def print_approval_report(self):
|
|
return self.env.ref('yuthon_approval.all_demo_report_actions').report_action(self)
|
|
|
|
# def action_approve(self):
|
|
# super(ApprovalRequest, self).action_approve()
|
|
# return {
|
|
# "type": "ir.actions.act_window",
|
|
# "name": "审批意见",
|
|
# "res_model": "approval.notice.wizard",
|
|
# "view_mode": "form",
|
|
# "target": "new",
|
|
# }
|
|
|