diff --git a/soong_workflow/wizard/soong_workflow_apostille_ok_wizard.py b/soong_workflow/wizard/soong_workflow_apostille_ok_wizard.py index 974a82e66..165be44a5 100644 --- a/soong_workflow/wizard/soong_workflow_apostille_ok_wizard.py +++ b/soong_workflow/wizard/soong_workflow_apostille_ok_wizard.py @@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta class SoongWorkflowApostilleOKWizard(models.TransientModel): _name = "soong.workflow.apostille.ok.wizard" _description = "加签弹窗" - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string="name") res_model = fields.Char() diff --git a/soong_workflow/wizard/soong_workflow_apostille_wizard.py b/soong_workflow/wizard/soong_workflow_apostille_wizard.py index 319d29188..4c2bf7c76 100644 --- a/soong_workflow/wizard/soong_workflow_apostille_wizard.py +++ b/soong_workflow/wizard/soong_workflow_apostille_wizard.py @@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta class SoongWorkflowApostilleWizard(models.TransientModel): _name = "soong.workflow.apostille.wizard" _description = "加签弹窗" - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string="name") res_model = fields.Char() diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index a657ebb51..d8eb4dc04 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -10,7 +10,7 @@ from datetime import datetime, date, time, timedelta class SoongWorkflowCommentWizard(models.TransientModel): _name = "soong.workflow.comment.wizard" _description = "Soong Workflow Comment Wizard" - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string="name") res_model = fields.Char() diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py index 2b13b43ef..3df31eea1 100644 --- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py +++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py @@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta class SoongWorkflowRecordDeleteWizard(models.TransientModel): _name = "soong.workflow.record.delete.wizard" _description = "删除弹窗" - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string="") record_id = fields.Many2one(comodel_name="soong.workflow.record") diff --git a/yuthon_hr_attendance/views/overtime_page_views.xml b/yuthon_hr_attendance/views/overtime_page_views.xml index 087a015ec..ec87538c8 100644 --- a/yuthon_hr_attendance/views/overtime_page_views.xml +++ b/yuthon_hr_attendance/views/overtime_page_views.xml @@ -27,12 +27,6 @@ -
-
- - - -
diff --git a/yuthon_issue/models/issue_approval.py b/yuthon_issue/models/issue_approval.py index a7ef47c95..9ca71ab95 100644 --- a/yuthon_issue/models/issue_approval.py +++ b/yuthon_issue/models/issue_approval.py @@ -39,8 +39,20 @@ class IssueApproval(models.Model): def _check_issue_approval_ids(self): for rec in self: if rec.issue_approval_ids: - self.issue_display ='\n'.join([issue_library.issue_library_id.name for issue_library in self.issue_approval_ids]) - self.decision_display ='\n'.join([issue_library.approval_decision_sequence for issue_library in self.issue_approval_ids]) + # 处理 issue_library_id.name(假设为字符串,无需转换) + issue_names = [issue_library.issue_library_id.name for issue_library in rec.issue_approval_ids] + # 处理 approval_decision_sequence,确保转换为字符串 + decision_sequences = [] + for issue_library in rec.issue_approval_ids: + # 假设 approval_decision_sequence 是布尔类型,转换为 '是'/‘否’ 或直接转字符串 + if isinstance(issue_library.approval_decision_sequence, bool): + decision_sequences.append('是' if issue_library.approval_decision_sequence else '否') + else: + # 其他类型(如整数、浮点数)直接转字符串 + decision_sequences.append(str(issue_library.approval_decision_sequence)) + # 拼接字符串 + rec.issue_display = '\n'.join(issue_names) + rec.decision_display = '\n'.join(decision_sequences) class IssueApprovalLine(models.Model): _name = 'issue.approval.line' diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index c854790f5..76e3731c8 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -9,7 +9,7 @@ _logger = logging.getLogger(__name__) class YuthonNotice(models.Model): _name = "yuthon.notice" _description = '通知公告' - _inherit = ['soong.workflow.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _rec_name = 'name' _order = "sequence desc" diff --git a/yuthon_property/models/property_electric_reading.py b/yuthon_property/models/property_electric_reading.py index a0a061318..0618430a1 100644 --- a/yuthon_property/models/property_electric_reading.py +++ b/yuthon_property/models/property_electric_reading.py @@ -4,7 +4,7 @@ from odoo.exceptions import UserError, ValidationError class PropertyElectricReading(models.Model): _name = 'property.electric.reading' - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _description = '抄表' code = fields.Char(string='编号') diff --git a/yuthon_property/models/property_water_reading.py b/yuthon_property/models/property_water_reading.py index b1c7bb0d1..eaffc8aa1 100644 --- a/yuthon_property/models/property_water_reading.py +++ b/yuthon_property/models/property_water_reading.py @@ -4,7 +4,7 @@ from datetime import datetime, date, time, timedelta class PropertyWaterReading(models.Model): _name = 'property.water.reading' - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _description = '水表抄表' code = fields.Char(string='编号') diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py index 87d5e629b..5c747ac34 100644 --- a/yuthon_property/models/yuthon_property.py +++ b/yuthon_property/models/yuthon_property.py @@ -6,7 +6,7 @@ from pypinyin import pinyin,lazy_pinyin class YuthonProperty(models.Model): _name = 'yuthon.property' _description = '物业管理' - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _rec_name = 'name' _order = 'first_letter' diff --git a/yuthon_property_approval/models/perperty_claim_approval.py b/yuthon_property_approval/models/perperty_claim_approval.py index 7dcef8d22..1b985578e 100644 --- a/yuthon_property_approval/models/perperty_claim_approval.py +++ b/yuthon_property_approval/models/perperty_claim_approval.py @@ -3,7 +3,7 @@ from odoo import models, fields, api class PropertyClaimApproval(models.Model): _name = 'property.claim.approval' - _inherit = ['mail.thread', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _description = '业务报销单' name = fields.Char(string='名称', required=True) diff --git a/yuthon_property_approval/models/property_design_approval.py b/yuthon_property_approval/models/property_design_approval.py index e713d80ab..0cc0e1267 100644 --- a/yuthon_property_approval/models/property_design_approval.py +++ b/yuthon_property_approval/models/property_design_approval.py @@ -5,6 +5,7 @@ from odoo.exceptions import UserError, ValidationError class PropertyDesignApproval(models.Model): _name = 'property.design.approval' _description = '工程设计合同审批' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string='标题') code = fields.Char(string="编号", diff --git a/yuthon_property_approval/models/property_rental_conditions.py b/yuthon_property_approval/models/property_rental_conditions.py index af0c456f0..f31ebe90d 100644 --- a/yuthon_property_approval/models/property_rental_conditions.py +++ b/yuthon_property_approval/models/property_rental_conditions.py @@ -4,6 +4,7 @@ from odoo import models, fields, api class PropertyRentalConditions(models.Model): _name = 'property.rental.conditions' _description = '出租调整表' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] property_id = fields.Many2one('yuthon.property',string='物业名称') users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_property_approval/models/property_supervising_approval.py b/yuthon_property_approval/models/property_supervising_approval.py index e46dde15b..af0daf66f 100644 --- a/yuthon_property_approval/models/property_supervising_approval.py +++ b/yuthon_property_approval/models/property_supervising_approval.py @@ -5,6 +5,7 @@ from odoo.exceptions import UserError, ValidationError class PropertySupervisingApproval(models.Model): _name = 'property.supervising.approval' _description = '工程设计合同审批' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string='标题') code = fields.Char(string="编号", diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index 92b25ec61..8d3f1adda 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -11,7 +11,7 @@ class YuthonWillTask(models.Model): _name = 'yuthon.will.task' _description = '日程' _rec_name = 'task_content' - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] request_hour_from = fields.Selection([ ('0', '0:00'), ('0.5', '0:30'), diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml index 94b488676..126f09380 100644 --- a/yuthon_will_task/views/yuthon_will_task_views.xml +++ b/yuthon_will_task/views/yuthon_will_task_views.xml @@ -94,7 +94,7 @@ - +