From 8a1a6fa9cb7ed970da4c570543da568a2e6304c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Mon, 1 Sep 2025 16:34:34 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/inherit_hr_contract_views.xml | 1 +
.../models/yuthon_vacation_reports.py | 2 +-
.../views/overtime_approval.xml | 51 ++++++++++++-------
yuthon_property_approval/__manifest__.py | 1 +
.../models/property_lease_contract.py | 11 ++++
.../security/ir.model.access.csv | 1 +
.../views/property_lease_contract.xml | 3 ++
yuthon_property_approval/wizard/__init__.py | 3 +-
.../wizard/contract_signature_wizard.py | 22 ++++++++
.../contract_signature_wizard_viwes.xml | 20 ++++++++
yuthon_stock/models/inherit_stock_picking.py | 1 +
yuthon_stock/views/inherit_stock_picking.xml | 24 +++++++--
12 files changed, 117 insertions(+), 23 deletions(-)
create mode 100644 yuthon_property_approval/wizard/contract_signature_wizard.py
create mode 100644 yuthon_property_approval/wizard/contract_signature_wizard_viwes.xml
diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml
index 1dd0f4515..eb93aff30 100644
--- a/yuthon_contract/views/inherit_hr_contract_views.xml
+++ b/yuthon_contract/views/inherit_hr_contract_views.xml
@@ -55,6 +55,7 @@
false
+
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index 35b045e09..a28577045 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -33,7 +33,7 @@ class YuthonVacationReports(models.Model):
compensatory_leave = fields.Integer(string="调休", compute='_compute_other_leave', store=True, group_operator=None)
leave_of_absence = fields.Float(string="事假", digits=(16, 3), compute='_compute_other_leave', store=True,
group_operator=None)
- statutory_leave = fields.Integer(string="加班时(法定假)", compute='_compute_other_leave', store=True, group_operator=None)
+ statutory_leave = fields.Integer(string="加班时(法定)", compute='_compute_other_leave', store=True, group_operator=None)
cop_leave = fields.Float(string='补休', digits=(16, 3), compute='_compute_other_leave', store=True,
group_operator=None)
duty_off_leave = fields.Integer(string='值班调休', compute='_compute_other_leave', store=True, group_operator=None)
diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml
index cc183bbf8..48bb709fd 100644
--- a/yuthon_hr_attendance/views/overtime_approval.xml
+++ b/yuthon_hr_attendance/views/overtime_approval.xml
@@ -50,35 +50,50 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py
index accc8e53d..8b06ccd78 100644
--- a/yuthon_property_approval/__manifest__.py
+++ b/yuthon_property_approval/__manifest__.py
@@ -79,6 +79,7 @@
'wizard/accounts_wizard_views.xml',
'wizard/binding_information_wizard_views.xml',
'wizard/property_rental_wizard_views.xml',
+ 'wizard/contract_signature_wizard_viwes.xml',
'wizard/property_meeting_wizard_views.xml',
'views/property_menu_all.xml',
],
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index e18ffc1ce..c0898308a 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -188,6 +188,7 @@ class PropertyLeaseContract(models.Model):
asset_valuation_id = fields.Many2one('ir.attachment', string="资产评估结果明细表")
lease_contract = fields.Many2one('ir.attachment', string="合同/协议")
confirmation_transaction_id = fields.Many2one('ir.attachment', string="成交确认书")
+ contract_signature_id = fields.Many2one('ir.attachment', string="合同签名附件")
responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书(住宅)")
other_ment_ids = fields.Many2many(
'ir.attachment',
@@ -220,6 +221,16 @@ class PropertyLeaseContract(models.Model):
reconciliation_count = fields.Integer(string="对账数量", compute='_compute_reconciliation_count')
process_count = fields.Integer(string="流程数量", compute='_compute_process_count')
+ def contract_signature(self):
+ return {
+ 'type': 'ir.actions.act_window',
+ 'name': '合同签订',
+ "target": "new",
+ 'res_model': 'contract.signature.wizard',
+ 'view_mode': 'form',
+ 'context': {'default_contract_id': self.id}
+ }
+
def _compute_contract_count(self):
for record in self:
record.contract_count = self.env['property.accounts.receivable'].search_count([('contract_id', '=', record.id)])
diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv
index df560483b..b4841954d 100644
--- a/yuthon_property_approval/security/ir.model.access.csv
+++ b/yuthon_property_approval/security/ir.model.access.csv
@@ -101,5 +101,6 @@ access_accounts_wizard, accounts_wizard,model_accounts_wizard,base.group_user,1,
access_binding_information_wizard,binding_information_wizard,model_binding_information_wizard,base.group_user,1,1,1,1
access_yuthon_property_ledger, yuthon_property_ledger,model_yuthon_property_ledger,base.group_user,1,1,1,1
access_property_lessee_analysis,property_lessee_analysis,model_property_lessee_analysis,base.group_user,1,1,1,1
+access_contract_signature_wizard,contract_signature_wizard,model_contract_signature_wizard,base.group_user,1,1,1,1
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index dba4b912d..3db4d93d9 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -405,6 +405,8 @@
decoration-danger="contact_state == 'terminate'"
decoration-warning="contact_state == 'complete'"
decoration-muted="contact_state == 'early_termination'"/>
+
+
@@ -768,6 +770,7 @@
+
diff --git a/yuthon_property_approval/wizard/__init__.py b/yuthon_property_approval/wizard/__init__.py
index e30f20b94..eaf7600b2 100644
--- a/yuthon_property_approval/wizard/__init__.py
+++ b/yuthon_property_approval/wizard/__init__.py
@@ -8,4 +8,5 @@ from . import property_meeting_wizard
from . import property_management_wizard
from . import click_reconciliation_wizard
from . import accounts_wizard
-from . import binding_information_wizard
\ No newline at end of file
+from . import binding_information_wizard
+from . import contract_signature_wizard
\ No newline at end of file
diff --git a/yuthon_property_approval/wizard/contract_signature_wizard.py b/yuthon_property_approval/wizard/contract_signature_wizard.py
new file mode 100644
index 000000000..e53e25378
--- /dev/null
+++ b/yuthon_property_approval/wizard/contract_signature_wizard.py
@@ -0,0 +1,22 @@
+from odoo import models, fields, api, _, SUPERUSER_ID
+from odoo.exceptions import ValidationError, UserError
+import xlrd
+import base64
+import datetime
+from datetime import datetime
+import pandas as pd
+
+
+class ContractSignatureWizard(models.TransientModel):
+ _name = 'contract.signature.wizard'
+ _description = '合同签订'
+
+ signature_date = fields.Date(string='签订日期')
+ contract_id = fields.Many2one('property.lease.contract', string='合同')
+ contract_signature_id = fields.Many2one('ir.attachment', string="合同签订附件")
+
+ def action_confirm(self):
+ if self.contract_id:
+ self.contract_id.write({'contract_date': self.signature_date,
+ 'contract_signature_id': self.contract_signature_id.id
+ })
diff --git a/yuthon_property_approval/wizard/contract_signature_wizard_viwes.xml b/yuthon_property_approval/wizard/contract_signature_wizard_viwes.xml
new file mode 100644
index 000000000..f99532701
--- /dev/null
+++ b/yuthon_property_approval/wizard/contract_signature_wizard_viwes.xml
@@ -0,0 +1,20 @@
+
+
+
+ contract.signature.wizard
+ contract.signature.wizard
+
+
+
+
+
diff --git a/yuthon_stock/models/inherit_stock_picking.py b/yuthon_stock/models/inherit_stock_picking.py
index 9d588e896..d111cfbce 100644
--- a/yuthon_stock/models/inherit_stock_picking.py
+++ b/yuthon_stock/models/inherit_stock_picking.py
@@ -6,6 +6,7 @@ class StockPicking(models.Model):
_inherit = 'stock.picking'
document_ids = fields.Many2many('ir.attachment', string="附件")
+ employee_id = fields.Many2one('hr.employee', string="领用人")
diff --git a/yuthon_stock/views/inherit_stock_picking.xml b/yuthon_stock/views/inherit_stock_picking.xml
index e41bfc840..80a911526 100644
--- a/yuthon_stock/views/inherit_stock_picking.xml
+++ b/yuthon_stock/views/inherit_stock_picking.xml
@@ -10,6 +10,9 @@
+
+ 供应商
+
@@ -17,15 +20,30 @@
stock.picking
-
-
-
编号
目的位置
+
+ 验收人
+
+
+ 经手人
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
1