添加功能

This commit is contained in:
zhou
2025-04-03 10:35:46 +08:00
parent 55e102769d
commit e16476016a
4 changed files with 4 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@ class YuthonUserRole(models.Model):
personnel = fields.Text(string="在岗人员", store=True)
employee_ids = fields.One2many('hr.employee', 'user_role_id')
child_ids = fields.One2many('soong.user.role', 'parent_id', string='下级角色', index=True)
company_id = fields.Many2one('res.company', string="所属公司")
pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True)
def write(self, vals):
@@ -28,6 +28,7 @@
<field name="number_people"/>
<field name="pinyin_name" column_invisible="1"/>
<field name="parent_id"/>
<field name="company_id" optional="show"/>
<field name="child_ids" column_invisible="1"/>
<field name="create_time" optional="hide"/>
<field name="end_time" optional="hide"/>
@@ -26,6 +26,7 @@ class YuthonHrDepartment(models.Model):
expiration_date = fields.Date(string="失效日期", default=fields.Date.today())
end_date = fields.Date(string="结束时间")
department_code = fields.Char(string="部门序号")
company_id = fields.Many2one('res.company', string="所属公司")
pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True)
def do_department_to_res_groups(self):
@@ -32,6 +32,7 @@
<field name="is_global_department" column_invisible="1"/>
<field name="start_date"/>
<field name="expiration_date"/>
<field name="company_id" optional="show"/>
</xpath>
<field name="manager_id" position="attributes">
<attribute name="column_invisible">1</attribute>