Merge pull request !471 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2024-11-15 13:06:36 +00:00
committed by Gitee
5 changed files with 20 additions and 6 deletions
+1
View File
@@ -13,6 +13,7 @@
'depends': ['mail', 'base', 'hr', 'yuthon_hr_employee','hr_payroll'],
'data': [
'security/ir.model.access.csv',
'security/yuthon_salary_company.xml',
'views/inherit_hr_payroll_structure_views.xml',
],
'installable': True,
@@ -6,12 +6,13 @@ class HrPayrollStructure(models.Model):
_order = 'sequence asc'
lv = fields.Char(string="级别")
name = fields.Char(string="级别名称")
name = fields.Char(string="职级名称")
sequence = fields.Char(string='级别序号', store=True)
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
('tctj', '天投城建')], string='公司')
('tctj', '天投城建')], string='所属公司')
create_time = fields.Datetime(string="生效日期", default=fields.Datetime.now)
end_time = fields.Datetime(string="失效日期")
type_id = fields.Many2one('hr.payroll.structure.type', string="岗位类别",required=False)
@api.model
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
+1 -1
View File
@@ -1 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="yuthon_salary_rule" model="ir.rule">
<field name="name">薪资公司过滤</field>
<field name="model_id" ref="model_hr_payroll_structure"/>
<field name="domain_force">[('yuthon_company', '=', user.employee_id.yuthon_company)]</field>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
</record>
</odoo>
@@ -12,7 +12,7 @@
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="string">级别名称</attribute>
<attribute name="string">职级名称</attribute>
</xpath>
<xpath expr="//field[@name='name']" position="before">
<field name="lv"/>
@@ -31,14 +31,14 @@
<field name="inherit_id" ref="hr_payroll.view_hr_employee_grade_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='country_id']" position="after">
<field name="lv"/>
<field name="sequence"/>
<field name="lv"/>
<field name="yuthon_company"/>
<field name="create_time"/>
<field name="end_time"/>
</xpath>
<xpath expr="//div[@class='oe_title']/label" position="attributes">
<attribute name="string">级别名称</attribute>
<attribute name="string">职级名称</attribute>
</xpath>
</field>
</record>