diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py index d3670daf8..28533d7e2 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_planning.py +++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py @@ -72,9 +72,9 @@ class YuthonShiftPlanning(models.Model): # 处理当前组员工的休息日 for record in employee_records: - if record.employee_id: # 检查 employee_id 是否存在 + if record.employee_id: resource_id = record.employee_id.resource_id.id - weekday_number = weekday_mapping.get(record.regular_holidays) # 确保 regular_holidays 字段存在 + weekday_number = weekday_mapping.get(record.regular_holidays) if resource_id not in ever_holidays: ever_holidays[resource_id] = [] if weekday_number is not None: # 检查weekday_number是否有效 @@ -85,8 +85,8 @@ class YuthonShiftPlanning(models.Model): while current_date < end_date: for role_index in role_order: for _ in range(self.number_of_shifts): - employee = record.employee_id # 获取employee对象 - resource_id = employee.resource_id.id # 获取 resource_id + employee = record.employee_id + resource_id = employee.resource_id.id current_weekday = current_date.weekday() if resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]: pass # 跳过休息日 diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml index 8de4d23e1..275a71c62 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -79,18 +79,18 @@ - - - - - + + + + + - - - - - + + + + + @@ -235,9 +235,10 @@ + + - diff --git a/yuthon_property_approval/models/property_handover.py b/yuthon_property_approval/models/property_handover.py index 9e3dc044b..2acf02d63 100644 --- a/yuthon_property_approval/models/property_handover.py +++ b/yuthon_property_approval/models/property_handover.py @@ -20,7 +20,7 @@ class PropertyHandoverLine(models.Model): property_handover_id = fields.Many2one('property.handover', string="审批信息") property_id = fields.Many2one('yuthon.property', string="关联物业信息") - property_address = fields.Text(related='property_id.address',string="物业地址") + property_address = fields.Char(related='property_id.name',string="物业地址") is_affirmation = fields.Boolean(related='property_id.is_confirm_authorization',string="是否确权") owner = fields.Many2one(related='property_id.owner_id',string="权属人") title_number = fields.Char(string="产权编号") diff --git a/yuthon_property_approval/models/property_information.py b/yuthon_property_approval/models/property_information.py index a2cc0f935..5a196d7bc 100644 --- a/yuthon_property_approval/models/property_information.py +++ b/yuthon_property_approval/models/property_information.py @@ -16,7 +16,7 @@ class PropertyInformation(models.Model): property_documents_ids = fields.Many2many('documents.document', string="物业信息文件") - original_property_id = fields.Many2one('property.information', string="关联物业管理变更审批") + original_property_id = fields.Many2one('property.management', string="关联物业管理变更审批") property_name = fields.Char(string="物业名称") company_id = fields.Many2one('res.company', string="所属公司") admin_id = fields.Many2one('res.users', string="管理员") diff --git a/yuthon_property_approval/models/property_management.py b/yuthon_property_approval/models/property_management.py index 5d34f6eae..8c832fdaf 100644 --- a/yuthon_property_approval/models/property_management.py +++ b/yuthon_property_approval/models/property_management.py @@ -13,8 +13,6 @@ class PropertyManagement(models.Model): name = fields.Char(string='标题') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_management_code')) - effective_start_date = fields.Date(string="生效开始日期") - effective_end_date = fields.Date(string="生效结束日期") reason_change = fields.Char(string="变更事由") handling_opinions = fields.Text(string="经办意见") original_property_ids = fields.One2many('property.information', 'original_property_id', string="原物业信息") diff --git a/yuthon_property_approval/models/property_offline_registration.py b/yuthon_property_approval/models/property_offline_registration.py index 631986389..19f0e2b9b 100644 --- a/yuthon_property_approval/models/property_offline_registration.py +++ b/yuthon_property_approval/models/property_offline_registration.py @@ -8,7 +8,7 @@ class PropertyOfflineRegistration(models.Model): code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence']. next_by_code('property_offline_registration_code')) property_id = fields.Many2one('yuthon.property',string='物业名称') - address = fields.Text(related='property_id.address',string='物业地址') + address = fields.Char(related='property_id.name',string='物业地址') area = fields.Float(related='property_id.actual_area',string='面积(m²)') rental_price = fields.Float(string='租金底价(元/m²)') monthly_rent = fields.Float(string='月租金(元)') diff --git a/yuthon_property_approval/models/property_rental_conditions.py b/yuthon_property_approval/models/property_rental_conditions.py index dd730bd84..057b3cc0e 100644 --- a/yuthon_property_approval/models/property_rental_conditions.py +++ b/yuthon_property_approval/models/property_rental_conditions.py @@ -6,7 +6,7 @@ class PropertyRentalConditions(models.Model): _description = '出租调整表' property_id = fields.Many2one('yuthon.property',string='物业名称') - address = fields.Text(related='property_id.address',string='物业地址') + address = fields.Char(related='property_id.name',string='物业地址') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence']. next_by_code('property_rental_conditions_code')) registered_use = fields.Char(related='property_id.registered_use',string='证载用途') diff --git a/yuthon_property_approval/models/property_rental_form.py b/yuthon_property_approval/models/property_rental_form.py index 03604da82..d487738e8 100644 --- a/yuthon_property_approval/models/property_rental_form.py +++ b/yuthon_property_approval/models/property_rental_form.py @@ -20,7 +20,7 @@ class PropertyRentalFormLine(models.Model): property_rental_form_id = fields.Many2one('property.rental.form', string="关联出租申报表") property_id = fields.Many2one('yuthon.property', string='物业名称', required=True) - property_address = fields.Text(related='property_id.address', string='物业地址') + property_address = fields.Char(related='property_id.name', string='物业地址') registered_use = fields.Char(related='property_id.registered_use', string='证载用途') evaluation_area = fields.Float(related='property_id.evaluation_area', string='出租面积(m²)') current_status = fields.Date(related='property_id.current_status', string='租聘到期日') diff --git a/yuthon_property_approval/views/property_management.xml b/yuthon_property_approval/views/property_management.xml index 1b8a229ad..f486179c2 100644 --- a/yuthon_property_approval/views/property_management.xml +++ b/yuthon_property_approval/views/property_management.xml @@ -17,28 +17,20 @@
+
- - - - - - - - - - + - + @@ -46,18 +38,18 @@ - + - + - +