diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py
index 81359738b..1abc35fb9 100644
--- a/soong_workflow/models/soong_workflow_record.py
+++ b/soong_workflow/models/soong_workflow_record.py
@@ -586,7 +586,6 @@ class SoongWorkflowRecord(models.Model):
# return [('id', 'in', ids)]
# 后台
-
def backend(self):
form_id = self.env.ref("soong_workflow.soong_workflow_record_form").id
return {
@@ -695,7 +694,6 @@ class SoongWorkflowRecord(models.Model):
title=record_id._description + '催办传阅/抄送,请尽快查看',
description=description, url=url,
btntxt="查看详情")
-
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py
index 79df907f2..26ecad4a3 100644
--- a/yuthon_hr_attendance/models/hr_attendance.py
+++ b/yuthon_hr_attendance/models/hr_attendance.py
@@ -123,7 +123,7 @@ class HrAttendance(models.Model):
existing_employee_ids.add(record.employee_id.id)
for employee in existing_employees:
if employee.id not in existing_employee_ids:
- self.create({
+ att = self.create({
'employee_id': employee.id,
'current_data': today_str,
'check_in': False,
@@ -131,6 +131,7 @@ class HrAttendance(models.Model):
'is_no_card': False,
'is_abnormal': False
})
+ att.compute_attend()
def state_fix(self):
for att in self.env["hr.attendance"].browse(self._context.get('active_ids', self._context.get('active_id'))):
diff --git a/yuthon_property_approval/models/property_approval.py b/yuthon_property_approval/models/property_approval.py
index 6ae01b350..7f6d15449 100644
--- a/yuthon_property_approval/models/property_approval.py
+++ b/yuthon_property_approval/models/property_approval.py
@@ -19,7 +19,7 @@ class PropertyApproval(models.Model):
is_issues = fields.Boolean(string='是否上会')
issues_result = fields.Html(string="会议结果")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
- property_documents_ids = fields.Many2many('documents.document', string="附件")
+ property_documents_ids = fields.Many2many('ir.document', string="附件")
property_source = fields.Selection([('cut', '划拨'), ('self', '自建'),
('replace', '置换'), ('buy', '购入'),
('entrust', '委托'), ('Rent', '租入')], string='资产来源')
@@ -93,7 +93,7 @@ class PropertyApprovalLine(models.Model):
is_affirmation = fields.Boolean(string="是否确权")
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
title_number = fields.Char(string="产权编号")
- area = fields.Float(string="面积")
+ area = fields.Float(string="面积", digits=(16, 4))
registered_id = fields.Many2one('yuthon.purpose.evidence', string='用途')
condition = fields.Selection([('rental', '出租中'), ('vacant', '空置中'), ('rented', '待出租')], string="状态",
default="rented")
diff --git a/yuthon_property_approval/models/property_management.py b/yuthon_property_approval/models/property_management.py
index 7f6e3af28..db11ef6d4 100644
--- a/yuthon_property_approval/models/property_management.py
+++ b/yuthon_property_approval/models/property_management.py
@@ -112,7 +112,8 @@ class PropertyManagement(models.Model):
'work_end': False,
'version': new_version,
'condition': 'new',
- 'code': self.env['ir.sequence'].next_by_code('property_lease_contract_code'),
+ 'contract_code': lease_contract_ids.contract_code,
+ 'contract_id': lease_contract_ids.id,
'self_users_ids': [(6, 0, [self.env.user.id])],
'contact_state': 'to',
})
@@ -142,6 +143,11 @@ class PropertyManagement(models.Model):
])
for line in other_lines:
line.copy({'other_id': new_contract.id})
+ breakdown_lines = self.env['property.rent.breakdown.line'].search([
+ ('breakdown_id', '=', lease_contract.lease_id.id)
+ ])
+ for line in breakdown_lines:
+ line.copy({'breakdown_id': new_contract.id})
# 复制子合同明细
subset_lines = self.env['property.subset.contract'].search([
('subset_id', '=', lease_contract.lease_id.id)
@@ -153,14 +159,11 @@ class PropertyManagement(models.Model):
])
for line in lease_lines:
line.copy({'lease_id': new_contract.id})
- lease_contract.lease_id.term_end_time = record.start_time - relativedelta(days=1)
lease_contract.lease_id.actual_end_time = record.start_time - relativedelta(days=1)
new_contract.term_start_time = record.start_time
new_contract.actual_start_time = record.start_time
new_contract._compute_name()
- new_contract._onchange_contract_sort()
new_contract._update_wkf_records()
- new_contract._onchange_action_generate_details()
existing_info = self.env['manage.information.line'].search([
('yuthon_property_id', '=', target_property_id),
diff --git a/yuthon_property_approval/views/property_approval_views.xml b/yuthon_property_approval/views/property_approval_views.xml
index 67d769f6d..773fe703f 100644
--- a/yuthon_property_approval/views/property_approval_views.xml
+++ b/yuthon_property_approval/views/property_approval_views.xml
@@ -58,7 +58,7 @@
-
+
diff --git a/yuthon_wechat/models/wecom_apps_config.py b/yuthon_wechat/models/wecom_apps_config.py
index 67dd269f3..9d2520c5d 100644
--- a/yuthon_wechat/models/wecom_apps_config.py
+++ b/yuthon_wechat/models/wecom_apps_config.py
@@ -30,6 +30,7 @@ class WecomAppsConfig(models.Model):
('task', '日程类型'),
('att_ok', '考勤确认类型'),
('salary', '薪资消息通知'),
+ ('can', '餐饮消息通知'),
], default="default")
wecom_apps_id = fields.Many2one("wecom.apps", string="企业微信的应用")