!7192 添加功能

Merge pull request !7192 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-12-23 02:21:29 +00:00
committed by Gitee
3 changed files with 7 additions and 24 deletions
@@ -256,17 +256,11 @@ class YuthonVacationReports(models.Model):
})
def update_data(self):
august_start = fields.Date.from_string('2025-09-01')
august_end = fields.Date.from_string('2025-9-30')
august_records = self.env["yuthon.vacation.reports"].search([
('vacation_date', '>=', august_start),
('vacation_date', '<=', august_end)
])
if august_records:
august_records.write({
'vacation_date': august_start
})
records = self.env["yuthon.vacation.reports"].browse(
self._context.get('active_ids', self._context.get('active_id', self.ids))
)
for rec in records:
rec._compute_working_overtime()
@api.depends('other_fee_ids', 'other_fee_ids.holiday_type', 'other_fee_ids.lines',
'other_fee_ids.is_void', 'other_fee_ids.update_type')
@@ -467,13 +467,6 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_yuthon_vacation_my_reports_tree')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_hr_attendance.view_yuthon_vacation_reports_form1')})]"/>
</record>
<record id="all_update_employee" model="ir.actions.server">
<field name="name">更新报表</field>
<field name="model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
<field name="binding_model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
<field name="state">code</field>
<field name="code">action = model.update_vacation()</field>
</record>
<record id="all_vacation_delete" model="ir.actions.server">
<field name="name">初始化日志</field>
<field name="model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
@@ -496,7 +489,7 @@
<field name="code">action = model._compute_attendance_fields1()</field>
</record>
<record id="all_update_data" model="ir.actions.server">
<field name="name">更新日期</field>
<field name="name">更新报表</field>
<field name="model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
<field name="binding_model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
<field name="state">code</field>
@@ -499,11 +499,7 @@ class PropertyLeaseContract(models.Model):
'code': self.code,
'approval_date': fields.Datetime.now(),
})
def _get_default_name_title(self):
return self._description if self._description else self._name
name_title = fields.Char(default=_get_default_name_title)
name_title = fields.Char(string="租赁合同审批")
contract_sort = fields.Selection([('property', '物业'), ('guanggao', '广告位'),('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property')