diff --git a/soong_workflow/models/soong_workflow_log.py b/soong_workflow/models/soong_workflow_log.py
index ee89f05c6..cdb361046 100644
--- a/soong_workflow/models/soong_workflow_log.py
+++ b/soong_workflow/models/soong_workflow_log.py
@@ -74,6 +74,7 @@ class SoongWorkflowLog2(models.Model):
_description = "Soong Workflow Log2"
workflow_id = fields.Many2one(comodel_name="soong.workflow")
+ code = fields.Char(string="流水号", compute="_compute_code")
model = fields.Char(string="Related Document Model", index=True, required=True)
res_id = fields.Integer(string="Related Document ID", index=True, required=True)
node_id = fields.Many2one(comodel_name="soong.workflow.node")
@@ -87,6 +88,13 @@ class SoongWorkflowLog2(models.Model):
lase_click_date = fields.Datetime(string="操作时间")
commit = fields.Char(string="意见")
+ @api.depends("res_id", 'model')
+ def _compute_code(self):
+ record = self.env[self.model].browse(self.res_id)
+ if record:
+ self.code = record.code
+ else:
+ self.code = ""
@api.depends("workflow_id", "node_id", "node_btn_id")
def _compute_name(self):
diff --git a/soong_workflow/views/soong_workflow_log_views.xml b/soong_workflow/views/soong_workflow_log_views.xml
index f44ac9750..bea4311e3 100644
--- a/soong_workflow/views/soong_workflow_log_views.xml
+++ b/soong_workflow/views/soong_workflow_log_views.xml
@@ -32,6 +32,7 @@
+
diff --git a/yuthon_hr_attendance/models/remove_holiday_approval.py b/yuthon_hr_attendance/models/remove_holiday_approval.py
index 32d92e06e..5e63294ae 100644
--- a/yuthon_hr_attendance/models/remove_holiday_approval.py
+++ b/yuthon_hr_attendance/models/remove_holiday_approval.py
@@ -111,9 +111,9 @@ class RemoveHolidayApprovals(models.Model):
])
if attend_records:
for attend in attend_records:
- attend.compute_attend()
attend.workflow_id = False
attend.is_workflow = False
+ attend.compute_attend()
@api.depends('date_start', 'date_end')
def _compute_duration(self):
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 2b259ea64..979ec7ecd 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -193,6 +193,10 @@ class PropertyLeaseContract(models.Model):
first_year_rent = fields.Float(string="首年租金")
rent = fields.Float(string="租金", help='第一笔合同的应收')
total_contract_receivables = fields.Float(string="合同总应收", compute="_compute_total_contract_receivables")
+ lessor_line = fields.One2many('lessor.alteration.line', 'contract_id', string="出租变更明细")
+ lessee_line = fields.One2many('lessee.alteration.line', 'contract_id', string="承租变更明细")
+ is_lessor = fields.Boolean(string="出租方变更")
+ is_lessee = fields.Boolean(string="承租方变更")
def _get_default_tax_rate(self):
default_rate = self.env['yuthon.tariff.setting'].search(
@@ -2534,3 +2538,22 @@ class PropertySubsetContract(models.Model):
lessee_id = fields.Many2one(related='contract_id.lessee_id', string="承租方")
rental_purposes = fields.Many2one(related='contract_id.rental_purposes', string="出租用途")
+
+class LesseeAlterationLine(models.Model):
+ _name = 'lessee.alteration.line'
+ _description = '承租方变更明细行'
+
+ contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
+ lessee_id = fields.Char(string="承租方")
+ start_date = fields.Date(string="生效日期", default=fields.Datetime.today())
+ end_date = fields.Date(string="失效日期")
+
+
+class LessorAlterationLine(models.Model):
+ _name = 'lessor.alteration.line'
+ _description = '出租方变更明细行'
+
+ contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
+ lessor_id = fields.Char(string="出租方")
+ start_date = fields.Date(string="生效日期", default=fields.Datetime.today())
+ end_date = fields.Date(string="失效日期")
\ No newline at end of file
diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv
index 5afac0137..5061a8ff2 100644
--- a/yuthon_property_approval/security/ir.model.access.csv
+++ b/yuthon_property_approval/security/ir.model.access.csv
@@ -131,4 +131,7 @@ access_property_management_line2,property_management_line2,model_property_manage
access_yuthon_expenses_type,yuthon.expenses.type,model_yuthon_expenses_type,base.group_user,1,1,1,1
access_property_fee_spending,property_fee_spending,model_property_fee_spending,base.group_user,1,1,1,1
access_property_fee_spending_line,property_fee_spending_line,model_property_fee_spending_line,base.group_user,1,1,1,1
-access_build_fee_wizard,build_fee_wizard,model_build_fee_wizard,base.group_user,1,1,1,1
\ No newline at end of file
+access_build_fee_wizard,build_fee_wizard,model_build_fee_wizard,base.group_user,1,1,1,1
+
+access_lessee_alteration_line,lessee.alteration.line,model_lessee_alteration_line,base.group_user,1,1,1,1
+access_lessor_alteration_line,lessor.alteration.line,model_lessor_alteration_line,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index 25bf20363..10145bddf 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -857,6 +857,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_will_task/models/inherit_room_booking.py b/yuthon_will_task/models/inherit_room_booking.py
index 7dc660b58..bf18ef0a9 100644
--- a/yuthon_will_task/models/inherit_room_booking.py
+++ b/yuthon_will_task/models/inherit_room_booking.py
@@ -75,6 +75,8 @@ class InheritRoomBooking(models.Model):
'request_hour_from': request_hour_from,
'request_hour_to': request_hour_to,
'address': new_record.room_id.name,
+ 'room_booking_id': new_record.id,
+ 'task_type': 'meet',
'task_state': 'will',
})
return new_record
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 9ab9b1e5f..90f5b7ed2 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -73,10 +73,32 @@ class YuthonWillTask(models.Model):
('task', '日程'),
('meet', '会议')
], string='类型', default='task')
+ room_booking_id = fields.Many2one('room.booking', string='会议室')
def back_wecom_msg(self):
self.env['wecom.apps'].back_message(category='task', msg_id=self.msg_id)
+ def open_record(self):
+ self.ensure_one()
+ if self.room_booking_id:
+ target_model = 'room.booking'
+ target_id = self.room_booking_id.id
+ view_id = self.env.ref('room.room_booking_view_form').id
+ else:
+ target_model = self._name
+ target_id = self.id
+ view_id = self.env.ref('yuthon_will_task.view_yuthon_will_task_form').id
+ return {
+ 'type': 'ir.actions.act_window',
+ 'name': f'{target_model} 详情',
+ 'res_model': target_model,
+ 'res_id': target_id,
+ 'view_mode': 'form',
+ 'view_type': 'form',
+ 'view_id': view_id,
+ 'target': 'current',
+ }
+
@api.depends('start_date')
def _compute_task_week(self):
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 19376888b..3bf830273 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -8,7 +8,8 @@
decoration-muted="task_state == 'cancel'"
decoration-danger="priority == 'very_urgent'"
decoration-info="priority == 'urgent'"
- decoration-success="priority == 'important'" limit="15">
+ decoration-success="priority == 'important'" limit="15" action="open_record" type="object">
+
@@ -85,7 +86,7 @@
style="max-width: 6rem !important;"/>
→
+ style="max-width: 5rem !important;"/>