主题
This commit is contained in:
@@ -19,7 +19,7 @@ class HrAttendance(models.Model):
|
||||
out_card_location = fields.Char(string="外出打卡地点")
|
||||
work_hours = fields.Float(string="工作时长")
|
||||
company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company)
|
||||
department_id = fields.Many2one('hr.department', string="部门", domain="[('company_id', 'in', allowed_company_ids)]")
|
||||
|
||||
|
||||
def send_wecom_attendance(self):
|
||||
pass
|
||||
@@ -11,6 +11,11 @@ class ResourceCalendar(models.Model):
|
||||
|
||||
calendar_holiday_ids = fields.One2many('resource.calendar.holiday', 'resource_calendar_id', string="法定节假日")
|
||||
holiday_data_lines = fields.Char(string="辅助计算字段")
|
||||
department_id = fields.Many2one(
|
||||
'hr.department',
|
||||
string="部门",
|
||||
domain="[('company_id', 'in', allowed_company_ids)]"
|
||||
)
|
||||
|
||||
def get_baidu_holiday(self):
|
||||
"""
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
</header>
|
||||
<field name="employee_id" widget="many2one_avatar_user"/>
|
||||
<field name="company_id" optional="show"/>
|
||||
<field name="department_id" optional="show"/>
|
||||
<field name="is_clock_card" optional="show"/>
|
||||
<field name="is_no_card" optional="show"/>
|
||||
<field name="is_early_card" optional="show"/>
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="inherit_resource_calendar_tree" model="ir.ui.view">
|
||||
<field name="name">inherit.resource.calendar</field>
|
||||
<field name="model">resource.calendar</field>
|
||||
<field name="inherit_id" ref="resource.view_resource_calendar_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='company_id']" position="after">
|
||||
<field name="department_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="yuthon_resource_calendar_inherit" model="ir.ui.view">
|
||||
<field name="name">yuthon.resource.calendar.inherit</field>
|
||||
<field name="model">resource.calendar</field>
|
||||
<field name="inherit_id" ref="resource.resource_calendar_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='company_id']" position="after">
|
||||
<field name="department_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='working_hours']" position="after">
|
||||
<page name="baidu_holiday" string="法定节假日明细">
|
||||
<button name="get_baidu_holiday" string="更新法定节假日" type="object"/>
|
||||
|
||||
Reference in New Issue
Block a user