From ae4aaf7230ebc75c36c4768c81fbbe5ff0060d31 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Wed, 4 Jun 2025 14:50:38 +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 --- yuthon_holiday/models/inherit_hr_leave.py | 2 +- .../views/yuthon_leaving_approval_views.xml | 2 +- yuthon_lessee_service/__manifest__.py | 1 - yuthon_lessee_service/models/__init__.py | 1 - .../models/property_report_repair.py | 48 ----- .../security/ir.model.access.csv | 1 - .../views/property_report_repair.xml | 2 +- yuthon_notice/views/yuthon_notice_views.xml | 2 +- .../models/property_lease_contract.py | 4 +- .../views/property_lease_contract.xml | 45 +++-- .../models/purchase_service_orders.py | 6 +- .../views/purchase_service_orders_views.xml | 22 ++- .../views/inherit_hr_payslip_views.xml | 172 +++++++++++------- .../models/yuthon_work_condolences.py | 3 +- .../views/yuthon_message_approval_views.xml | 2 +- .../views/yuthon_work_condolences_views.xml | 1 + yuthon_will_task/models/yuthon_will_task.py | 56 +++++- .../views/yuthon_will_task_views.xml | 35 ++-- 18 files changed, 234 insertions(+), 171 deletions(-) delete mode 100644 yuthon_lessee_service/models/property_report_repair.py diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 6b3bdcc12..cb12efc66 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -440,7 +440,7 @@ class HolidaysRequestBatch(models.Model): start_time = first_hour_leave.request_hour_from end_time = first_hour_leave.request_hour_to hours = first_hour_leave.number_of_hours_text if first_hour_leave.number_of_hours_text else 0 - title = f"{self.employee_id.name}的休假 {date_str},{start_time}~{end_time}" + title = f"{self.employee_id.name}的休假 {date_str}" if hours: title += f"共计{hours}" self.name = title diff --git a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml index a00ac0c15..33218be96 100644 --- a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml @@ -6,7 +6,7 @@ - + diff --git a/yuthon_lessee_service/__manifest__.py b/yuthon_lessee_service/__manifest__.py index 0b5048f4c..19b858ff4 100644 --- a/yuthon_lessee_service/__manifest__.py +++ b/yuthon_lessee_service/__manifest__.py @@ -10,7 +10,6 @@ 'data/lessee_service_code.xml', 'security/ir.model.access.csv', 'views/yuthon_lessee_notice.xml', - 'views/property_report_repair.xml', 'views/all_menu.xml' ], 'demo': [], diff --git a/yuthon_lessee_service/models/__init__.py b/yuthon_lessee_service/models/__init__.py index 44020da76..cda763817 100644 --- a/yuthon_lessee_service/models/__init__.py +++ b/yuthon_lessee_service/models/__init__.py @@ -1,2 +1 @@ -from . import property_report_repair from . import yuthon_lessee_notice \ No newline at end of file diff --git a/yuthon_lessee_service/models/property_report_repair.py b/yuthon_lessee_service/models/property_report_repair.py deleted file mode 100644 index 27eb139d6..000000000 --- a/yuthon_lessee_service/models/property_report_repair.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import models, fields, api, exceptions, _ - -class PropertyRentRelief(models.Model): - _name = 'property.report.repair' - _description = '报事报修审批' - _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - _rec_name = 'name' - - name = fields.Char(string='标题') - code = fields.Char(string="编号", - default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code')) - property_documents_ids = fields.Many2many('documents.document', string="图片") - repairer = fields.Char(string="报修人") - repairer_address = fields.Char(string="报修人地址") - fault = fields.Char(string="故障") - dispatch = fields.Char(string="派单") - situation = fields.Char(string="现场说明情况") - is_fee = fields.Boolean(string="是否产生费用") - labor_costs = fields.Float(string="人工费") - - confirmation_repairer = fields.Char(string="报修人确认") - warehouse_management = fields.Char(string="库管") - property_repair_relief_ids = fields.One2many('property.repair.relief.line', 'property_repair_relief_id', string="物料清单") - total = fields.Float(string="总价") - active = fields.Boolean('Active', default=True, tracking=True) - work_end = fields.Boolean(string="结束") - urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', - default='normal') - def _get_default_name_title(self): - return self._description if self._description else self._name - - name_title = fields.Char(default=_get_default_name_title) - - -class PropertyRepairReliefLine(models.Model): - _name = 'property.repair.relief.line' - _description = '物料清单明细' - - property_repair_relief_id = fields.Many2one('property.report.repair', string="关联报事报修审批") - name = fields.Char(string="名称") - specs = fields.Char(string="规格") - unit_price = fields.Float(string="单价") - quantity = fields.Float(string="数量") - amount = fields.Float(string="小计") - total = fields.Float(string="总价") diff --git a/yuthon_lessee_service/security/ir.model.access.csv b/yuthon_lessee_service/security/ir.model.access.csv index e3a3597e2..9884ad587 100644 --- a/yuthon_lessee_service/security/ir.model.access.csv +++ b/yuthon_lessee_service/security/ir.model.access.csv @@ -1,5 +1,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_property_report_repair,property_report_repair,model_property_report_repair,base.group_user,1,1,1,1 access_yuthon_lessee_notice,yuthon_lessee_notice,model_yuthon_lessee_notice,base.group_user,1,1,1,1 diff --git a/yuthon_maintain/views/property_report_repair.xml b/yuthon_maintain/views/property_report_repair.xml index ba9c40431..4a93d10d8 100644 --- a/yuthon_maintain/views/property_report_repair.xml +++ b/yuthon_maintain/views/property_report_repair.xml @@ -50,7 +50,7 @@ - + diff --git a/yuthon_notice/views/yuthon_notice_views.xml b/yuthon_notice/views/yuthon_notice_views.xml index 6c94359dd..e7d09b342 100644 --- a/yuthon_notice/views/yuthon_notice_views.xml +++ b/yuthon_notice/views/yuthon_notice_views.xml @@ -115,7 +115,7 @@ - + diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 8b90f4cf6..dbf60ae03 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -68,7 +68,6 @@ class PropertyLeaseContract(models.Model): precinct_id = fields.Many2one('yuthon.precinct.message', string="所属片区") active = fields.Boolean('Active', default=True, tracking=True) - lease_term = fields.Float(string="租期") lease_term_year = fields.Integer(string="租期(年)") lease_term_month = fields.Integer(string="租期(月)") lease_term_day = fields.Integer(string="租期(日)") @@ -104,8 +103,7 @@ class PropertyLeaseContract(models.Model): split_context = fields.Char(string="拆分内容", default="该合同已拆分") percentage_liquidated_damages = fields.Many2one('yuthon.penalty.setting', string="违约金比例") percentage_damages= fields.Float(string="违约金") - date_payment_month = fields.Char(string="支付日期") - date_payment_day = fields.Char(string="支付日期") + date_payment_day = fields.Selection([('five', '5'), ('fifteen', '15'), ('twentyfive', '25')], string="支付日期") first_pay = fields.Date(string="首次付款日") unit_price = fields.Float(string="单价", store=True, digits=(16, 2)) deposit_type = fields.Selection([('deposit', '押金'), ('performance', '履约保证金')], string="押金/履约保证金") diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 88119b259..a244a095b 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -160,19 +160,18 @@ -