添加功能

This commit is contained in:
zhou
2025-04-24 15:10:54 +08:00
parent f2f1c1cc75
commit 0d8a01ada9
4 changed files with 9 additions and 0 deletions
@@ -24,6 +24,7 @@ class HrAttendance(models.Model):
absenteeism_card = fields.Boolean(string="旷工", group_operator='count_true')
work_time_type = fields.Selection([('close_day', '休息日'), ('work_day', '工作日')], string="工作时间类型")
company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company)
real_company_id = fields.Many2one(related='employee_id.company_id', store=True, string='公司')
on_card_location = fields.Char(string="上班打卡地点")
down_card_location = fields.Char(string="下班打卡地点")
out_card_time = fields.Datetime(string="外出打卡时间")
@@ -25,6 +25,7 @@
<field name="abnormal" optional="show" column_invisible="1"/>
<field name="work_time_type" optional="hidden"/>
<field name="is_approval" optional="hidden"/>
<field name="real_company_id" column_invisible="1"/>
<button name="button_controls_wizard" type="object" string="操作" class="oe_highlight" invisible="not (is_abnormal or is_early_card or is_late_card or absenteeism_card or is_no_card)"/>
<button name="button_source" type="object" string="详情" class="oe_highlight"/>
</tree>
@@ -39,6 +39,7 @@
<attribute name="widget">None</attribute>
</xpath>
<xpath expr="//field[@name='check_out']" position="after">
<field name="real_company_id" invisible="1"/>
<field name="sch_check_out_time"/>
<field name="check_noon"/>
<field name="sch_check_noon_time"/>
@@ -421,6 +421,12 @@
<field name="state">code</field>
<field name="code">action = model.action_hr_employee()</field>
</record>
<record id="hr.open_view_employee_list_my" model="ir.actions.act_window">
<field name="view_mode">tree,kanban,form,activity,graph,pivot,hierarchy</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('hr.view_employee_tree')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('hr.view_employee_form')})]"/>
</record>
<record id="all_employee_contacts_action" model="ir.actions.act_window">
<field name="name">通讯录</field>
<field name="res_model">hr.employee</field>