!4395 添加功能

Merge pull request !4395 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-08-08 01:48:26 +00:00
committed by Gitee
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ class HrAttendance(models.Model):
}
def compute_attendance_ids(self):
for att in self.env["hr.attendance.detail"].browse(self._context.get('active_ids', self._context.get('active_id'))):
for att in self.env["hr.attendance"].browse(self._context.get('active_ids', self._context.get('active_id'))):
now_time = fields.Datetime.to_datetime(att.current_data) + timedelta(hours=8, days=1)
start_time = now_time - timedelta(days=2)
self.env["hr.attendance.detail"].get_hr_attendance_time(att.employee_id, now_time, start_time)
@@ -539,7 +539,7 @@ class PropertyRentList(models.Model):
if contract and contract.cycle_mode and due_date:
due_date_obj = fields.Date.from_string(due_date)
contract_actual_end = fields.Date.from_string(
contract.actual_start_time) if contract.actual_start_time else None
contract.actual_end_time) if contract.actual_end_time else None
# 处理合同月
if contract.cycle_mode == 'fixed_monthly':
# 计算理论应收结束日(当月最后一天)
@@ -595,7 +595,7 @@ class PropertyRentList(models.Model):
if contract and contract.cycle_mode and due_date:
due_date_obj = fields.Date.from_string(due_date)
contract_actual_end = fields.Date.from_string(
contract.actual_start_time) if contract.actual_start_time else None
contract.actual_end_time) if contract.actual_end_time else None
# 处理合同月
if contract.cycle_mode == 'fixed_monthly':
# 计算理论应收结束日(当月最后一天)
@@ -183,7 +183,7 @@ class PropertyLeaseContract(models.Model):
legal_entity_id = fields.Many2one('ir.attachment', string="身份证")
power_attorney_id = fields.Many2one('ir.attachment', string="授权委托书")
asset_valuation_id = fields.Many2one('ir.attachment', string="资产评估结果明细表")
lease_contract = fields.Many2one('ir.attachment', string="租赁合同(住宅)")
lease_contract = fields.Many2one('ir.attachment', string="合同/协议")
confirmation_transaction_id = fields.Many2one('ir.attachment', string="成交确认书")
responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书(住宅)")
other_ment_ids = fields.Many2many(
@@ -206,7 +206,7 @@ class PropertyLeaseContract(models.Model):
license_name = fields.Char(string="营业执照名称", compute='_compute_attachment_names', store=True)
legal_entity_name = fields.Char(string="身份证名称", compute='_compute_attachment_names', store=True)
asset_valuation_name = fields.Char(string="资产评估结果明细表名称", compute='_compute_attachment_names')
lease_contract_name = fields.Char(string="租赁合同(住宅)名称", compute='_compute_attachment_names')
lease_contract_name = fields.Char(string="合同/协议", compute='_compute_attachment_names')
confirmation_transaction_name = fields.Char(string="成交确认书名称", compute='_compute_attachment_names',
store=True)
responsibility_book_name = fields.Char(string="安全生产责任书(住宅)名称", compute='_compute_attachment_names',
@@ -1355,7 +1355,7 @@ class PropertyLeaseContract(models.Model):
"target": "new",
"context": {
'default_lease_contract_id': self.id,
'default_property_ids': property_ids2,
'default_property_ids2': property_ids2,
}
}
@@ -562,16 +562,16 @@
<label for="term_start_time" />
<div class="d-inline-flex w-100">
<field name="term_start_time" class="me-2" style="max-width: 5rem;"
readonly="1" string="合约起止"/>至
string="合约起止"/>至
<field name="term_end_time" class="me-2" style="max-width: 5rem;"
readonly="1" force_save="1"/>
force_save="1"/>
</div>
<label for="actual_start_time"/>
<div class="d-inline-flex w-100">
<field name="actual_start_time" class="me-2" style="max-width: 5rem"
readonly="1" string="实际起止"/>至
string="实际起止"/>至
<field name="actual_end_time" class="me-2" style="max-width: 5rem;"
readonly="1" force_save="1"/>
force_save="1"/>
</div>
<label for="cycle_mode"/>
<div class="d-inline-flex w-100">