From 246ef5bf587f4a8e2cd96a501105cbbcaf259df8 Mon Sep 17 00:00:00 2001
From: ONION <2275333053@qq.com>
Date: Fri, 31 May 2024 22:05:25 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tianhe_approvals/__manifest__.py | 3 +-
.../data/approval_category_type_data.xml | 5 ++++
tianhe_approvals/models/__init__.py | 1 +
.../models/inherit_approval_category.py | 1 +
.../models/tianhe_rental_receipt_approvals.py | 24 +++++++++++++++
.../views/tianhe_rental_receipt_approvals.xml | 30 +++++++++++++++++++
6 files changed, 62 insertions(+), 2 deletions(-)
create mode 100644 tianhe_approvals/models/tianhe_rental_receipt_approvals.py
create mode 100644 tianhe_approvals/views/tianhe_rental_receipt_approvals.xml
diff --git a/tianhe_approvals/__manifest__.py b/tianhe_approvals/__manifest__.py
index 398fb97b2..fc2930a21 100644
--- a/tianhe_approvals/__manifest__.py
+++ b/tianhe_approvals/__manifest__.py
@@ -23,8 +23,7 @@
'views/tianhe_management_declare_approval.xml',
'views/tianhe_business_statement_approval.xml',
'views/tianhe_contentious_matter_approval.xml',
-
-
+ 'views/tianhe_rental_receipt_approvals.xml',
],
'application': True,
'installable': True,
diff --git a/tianhe_approvals/data/approval_category_type_data.xml b/tianhe_approvals/data/approval_category_type_data.xml
index 52b904741..79beb2f40 100644
--- a/tianhe_approvals/data/approval_category_type_data.xml
+++ b/tianhe_approvals/data/approval_category_type_data.xml
@@ -64,5 +64,10 @@
诉讼事项录入表
contentious_matter
+
+
+ 天河投资租赁合同收款单
+ rental_receipt
+
diff --git a/tianhe_approvals/models/__init__.py b/tianhe_approvals/models/__init__.py
index 7e6496f62..01d995843 100644
--- a/tianhe_approvals/models/__init__.py
+++ b/tianhe_approvals/models/__init__.py
@@ -13,3 +13,4 @@ from . import tianhe_management_declare_approval
from . import tianhe_business_statement_approval
from . import tianhe_process_change_approval
from . import tianhe_contentious_matter_approval
+from . import tianhe_rental_receipt_approvals
diff --git a/tianhe_approvals/models/inherit_approval_category.py b/tianhe_approvals/models/inherit_approval_category.py
index 3a039adf6..f1767dbc3 100644
--- a/tianhe_approvals/models/inherit_approval_category.py
+++ b/tianhe_approvals/models/inherit_approval_category.py
@@ -24,4 +24,5 @@ class ApprovalCategory(models.Model):
('business_statement','科创中小企业服务中心业务呈批表'),
('process_change','流程变更申请'),
('contentious_matter','诉讼事项录入表'),
+ ('rental_receipt', '租赁合同收款单'),
], string="审批类别")
\ No newline at end of file
diff --git a/tianhe_approvals/models/tianhe_rental_receipt_approvals.py b/tianhe_approvals/models/tianhe_rental_receipt_approvals.py
new file mode 100644
index 000000000..8585bef1c
--- /dev/null
+++ b/tianhe_approvals/models/tianhe_rental_receipt_approvals.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from odoo import api, fields, models, tools, _
+from odoo.exceptions import ValidationError
+
+
+class TianHeRentalReceipt(models.Model):
+ _inherit = "approval.request"
+ _description = '天河投资租赁合同收款单'
+
+ affiliation = fields.Char(string="所属公司")
+ document_number = fields.Integer(string="单据编号")
+ contract_number = fields.Integer(string="合同编号")
+ receipt_date = fields.Date(string="收款日期")
+ lessee = fields.Char(string="承租方")
+ headr = fields.Char(string="负责人")
+ property_name = fields.Char(string="物业名称")
+ month_rent = fields.Float(string="月租金")
+ deposit = fields.Float(string="押金")
+ need_receipt_amount = fields.Float(string="应收金额")
+ receipted_amount = fields.Float(string="实收金额")
+ need_receipt_liquidated_damages = fields.Float(string="应收违约金")
+ receipted_liquidated_damages = fields.Float(string="实收违约金")
+ receipt_type = fields.Char(string="收款类型")
+ remarks = fields.Char(string="备注事项")
diff --git a/tianhe_approvals/views/tianhe_rental_receipt_approvals.xml b/tianhe_approvals/views/tianhe_rental_receipt_approvals.xml
new file mode 100644
index 000000000..2907c8f0d
--- /dev/null
+++ b/tianhe_approvals/views/tianhe_rental_receipt_approvals.xml
@@ -0,0 +1,30 @@
+
+
+
+ approvals.category.type.code.rental.receipt.approval
+ approval.request
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file