@@ -777,6 +777,24 @@ class HrAttendance(models.Model):
|
||||
else:
|
||||
record.shift_name = '行政班次'
|
||||
|
||||
def labor_update(self):
|
||||
start_date = fields.Date.to_date('2025-05-01')
|
||||
end_date = fields.Date.to_date('2025-05-05')
|
||||
# 搜索符合条件的考勤记录
|
||||
attendance_records = self.search([
|
||||
('current_data', '>=', start_date),
|
||||
('current_data', '<=', end_date),
|
||||
('shift_id', '=', False),
|
||||
])
|
||||
if attendance_records:
|
||||
for record in attendance_records:
|
||||
record.write({
|
||||
'is_no_card': False,
|
||||
'is_early_card': False,
|
||||
'is_late_card': False,
|
||||
'is_abnormal': False,
|
||||
})
|
||||
|
||||
class card_remind_form(models.Model):
|
||||
_name = 'card.remind.form'
|
||||
_description = '测试表单'
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<header>
|
||||
<!-- <button name="compute_company_id" string="公司更新" type="object" class="btn btn-primary"/>-->
|
||||
<!-- <button name="button_all" string="班次更新" type="object" class="btn btn-primary"/>-->
|
||||
<button name="labor_update" string="考勤更新" type="object" class="btn btn-primary"/>
|
||||
</header>
|
||||
<field name="employee_id" class="list_current_data"/>
|
||||
<field name="current_data" optional="show" class="list_current_data"/>
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
<xpath expr="//page[@name='job_description_page']" position="attributes">
|
||||
<attribute name="string">任职要求</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='department_id']" position="after">
|
||||
<field name="number"/>
|
||||
<field name="establishment_quotas"/>
|
||||
@@ -143,9 +146,6 @@
|
||||
<field name="is_enable"/>
|
||||
<field name="job_personnel_ids" widget="many2many_tags"/>
|
||||
</div>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="before">
|
||||
<field name="email"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="after">
|
||||
<field name="function"/>
|
||||
</xpath>
|
||||
|
||||
@@ -354,9 +354,14 @@
|
||||
<xpath expr="//field[@name='contract_id']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='department_id']" position="before">
|
||||
<field name="mobile_phone"/>
|
||||
<field name="work_phone"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='job_id']" position="after">
|
||||
<field name="user_role_id"/>
|
||||
<field name="use_user_type"/>
|
||||
<field name="political_aspects"/>
|
||||
<field name="user_role_id" column_invisible="1"/>
|
||||
<field name="use_user_type" optional="hide"/>
|
||||
<field name="salary_group_id" column_invisible="1"/>
|
||||
<field name="user_number" optional="hide"/>
|
||||
<field name="mobile_phone" optional="hide"/>
|
||||
@@ -369,7 +374,6 @@
|
||||
<field name="birthday_month" optional="hide"/>
|
||||
<field name="user_type" optional="hide"/>
|
||||
<!-- <field name="retire_years" optional="hide"/>-->
|
||||
<field name="political_aspects" optional="hide"/>
|
||||
<field name="dang_data" optional="hide"/>
|
||||
<!-- <field name="new_start_contract_data" optional="hide"/>-->
|
||||
<field name="open_start_time" optional="hide"/>
|
||||
@@ -388,11 +392,11 @@
|
||||
<xpath expr="//field[@name='attendance_manager_id']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='work_phone']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
<xpath expr="//field[@name='parent_id']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='work_phone']" position="before">
|
||||
<field name="number"/>
|
||||
<xpath expr="//field[@name='work_phone']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='company_id']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
|
||||
Reference in New Issue
Block a user