Merge pull request !1550 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-02-24 03:03:46 +00:00
committed by Gitee
4 changed files with 33 additions and 3 deletions
+1
View File
@@ -7,6 +7,7 @@
'license': 'LGPL-3',
'data': [
'security/ir.model.access.csv',
'security/yuthon_holiday_group.xml',
'data/yuthon_holiday_data.xml',
'views/inherit_hr_type_views.xml',
'views/inherit_hr_leave_allocation_views.xml',
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="module_yuthon_holiday" model="ir.module.category">
<field name="name">假期组</field>
</record>
<record id="group_yuthon_holiday_user" model="res.groups">
<field name="name">假期:用户</field>
<field name="category_id" ref="module_yuthon_holiday"/>
</record>
<record id="group_yuthon_holiday_admin" model="res.groups">
<field name="name">假期:管理员</field>
<field name="category_id" ref="module_yuthon_holiday"/>
<field name="implied_ids" eval="[(4, ref('group_yuthon_holiday_user'))]"/>
</record>
</data>
</odoo>
+14 -3
View File
@@ -1,3 +1,5 @@
from email.policy import default
from odoo import api, fields, models, _
@@ -32,8 +34,6 @@ class YuthonPayrollInsurances (models.Model):
name = fields.Char(string='工资项名称')
is_base = fields.Boolean(string='独立基数')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
string='公司')
proportion_company = fields.Float(string='公司缴纳比例')
proportion_employee = fields.Float(string='个人缴纳比例')
proportion_company_ceiling = fields.Float(string='公司缴纳比例上限')
@@ -45,4 +45,15 @@ class YuthonPayrollInsurances (models.Model):
documents_ids = fields.Many2many('ir.attachment', string="附件")
remarks = fields.Text(string="备注")
start_date = fields.Date(string="生效日期", default=fields.Date.today())
end_date = fields.Date(string="失效日期")
end_date = fields.Date(string="失效日期")
def _get_default_yuthon_company(self):
current_user = self.env.user
employee = self.env['hr.employee'].search([('user_id', '=', current_user.id)], limit=1)
if employee:
if employee.yuthon_company:
return employee.yuthon_company
return ''
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
default=_get_default_yuthon_company, string = '公司')
+1
View File
@@ -284,6 +284,7 @@
sequence="7"/>
<menuitem id="holiday_set_menu_board"
name="配置"
groups="yuthon_holiday.group_yuthon_holiday_admin"
parent="holiday_manage_menu_root_board"
sequence="9"/>
<menuitem id="holiday_set_type_board2"