diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml index baacd5db0..4e4d4cd36 100644 --- a/yuthon_contract/views/inherit_hr_contract_views.xml +++ b/yuthon_contract/views/inherit_hr_contract_views.xml @@ -12,7 +12,8 @@ - false + false + "{'no_open': True}" 1 @@ -27,7 +28,7 @@ - + @@ -51,16 +52,19 @@ ['|', ('country_id', '=', False), ('country_id', '=', company_country_id), ('company_id', '=', company_id)] 职级 + "{'no_open': True}" ['|', ('country_id', '=', False), ('country_id', '=', company_country_id), ('company_id', '=', company_id)] 职级 + "{'no_open': True}" 1 false + "{'no_open': True}" @@ -75,7 +79,7 @@ - + @@ -86,7 +90,7 @@ - + diff --git a/yuthon_holiday/__manifest__.py b/yuthon_holiday/__manifest__.py index 1c1d9e763..082ef6c80 100644 --- a/yuthon_holiday/__manifest__.py +++ b/yuthon_holiday/__manifest__.py @@ -15,6 +15,7 @@ 'views/hr_leave_accrual_views.xml', 'views/yuthon_fixes_approval_views.xml', 'views/hr_leave_batch.xml', + 'views/yuthon_breastfeed_leave_views.xml', 'views/yuthon_holiday_setting_views.xml', 'wizard/yuthon_fixes_wizard_views.xml', 'wizard/leave_allocation_wizard_views.xml', diff --git a/yuthon_holiday/data/yuthon_holiday_data.xml b/yuthon_holiday/data/yuthon_holiday_data.xml index c8b17a38e..e40998543 100644 --- a/yuthon_holiday/data/yuthon_holiday_data.xml +++ b/yuthon_holiday/data/yuthon_holiday_data.xml @@ -14,4 +14,11 @@ 4 + + 哺乳编号 + yuthon_breastfeed_leave_code + BR + 4 + + \ No newline at end of file diff --git a/yuthon_holiday/models/yuthon_breastfeed_leave.py b/yuthon_holiday/models/yuthon_breastfeed_leave.py new file mode 100644 index 000000000..851e7beb7 --- /dev/null +++ b/yuthon_holiday/models/yuthon_breastfeed_leave.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api + + +class YuthonBreastfeedLeave(models.Model): + _name = 'yuthon.breastfeed.leave' + _description = '哺乳假' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] + + name = fields.Char(string="标题") + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_breastfeed_leave_code')) + users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") + company_id = fields.Many2one(related='users_id.company_id', string="公司") + baby_date = fields.Date(string="婴儿出生日期") + start_date = fields.Date(string="开始日期") + end_date = fields.Date(string="结束日期") + time_slot_selection = fields.Selection([('morning', '上午'), ('afternoon', '下午')], string="时间段") + work_end = fields.Boolean(string="结束") + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + + def _get_default_name_title(self): + return self._description if self._description else self._name + + name_title = fields.Char(default=_get_default_name_title) + self_users_ids = fields.Many2many('res.users', string="当前经办人", + default=lambda self: [(6, 0, [self.env.user.id])]) diff --git a/yuthon_holiday/security/ir.model.access.csv b/yuthon_holiday/security/ir.model.access.csv index 94e399a72..c29785467 100644 --- a/yuthon_holiday/security/ir.model.access.csv +++ b/yuthon_holiday/security/ir.model.access.csv @@ -5,4 +5,5 @@ access_yuthon_fixes_approval,yuthon_fixes_approval,model_yuthon_fixes_approval,b access_yuthon_fixes_wizard,yuthon_fixes_wizard,model_yuthon_fixes_wizard,base.group_user,1,1,1,1 access_yuthon_holiday_setting,yuthon_holiday_setting,model_yuthon_holiday_setting,base.group_user,1,1,1,1 access_leave_allocation_wizard,leave_allocation_wizard,model_leave_allocation_wizard,base.group_user,1,1,1,1 -access_yuthon_leave_wizard,yuthon_leave_wizard,model_yuthon_leave_wizard,base.group_user,1,1,1,1 \ No newline at end of file +access_yuthon_leave_wizard,yuthon_leave_wizard,model_yuthon_leave_wizard,base.group_user,1,1,1,1 +access_yuthon_breastfeed_leave,yuthon_breastfeed_leave, model_yuthon_breastfeed_leave,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_holiday/views/yuthon_breastfeed_leave_views.xml b/yuthon_holiday/views/yuthon_breastfeed_leave_views.xml new file mode 100644 index 000000000..82ff80755 --- /dev/null +++ b/yuthon_holiday/views/yuthon_breastfeed_leave_views.xml @@ -0,0 +1,68 @@ + + + + yuthon.breastfeed.leave.tree + yuthon.breastfeed.leave + + + + + + + + + + + yuthon.breastfeed.leave.form + yuthon.breastfeed.leave + +
+ + + + + + + + + + + + +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+ + 哺乳假 + yuthon.breastfeed.leave + tree,form + +
\ No newline at end of file diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index 30a2c8a44..da39863ac 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -34,7 +34,7 @@ - +
@@ -117,6 +117,7 @@
1 + "{'no_open': True}" 1 @@ -126,8 +127,8 @@ - - + + ztree_select diff --git a/yuthon_property/views/property_meter_archives_views.xml b/yuthon_property/views/property_meter_archives_views.xml index 1b54408c0..a3cea96cf 100644 --- a/yuthon_property/views/property_meter_archives_views.xml +++ b/yuthon_property/views/property_meter_archives_views.xml @@ -14,7 +14,7 @@ - + @@ -40,11 +40,11 @@ - - + + - + @@ -57,10 +57,10 @@ - - - - + + + + @@ -102,9 +102,9 @@ - - - + + + diff --git a/yuthon_property/views/property_meter_water_views.xml b/yuthon_property/views/property_meter_water_views.xml index 4dc0bbc4e..ce8abefe0 100644 --- a/yuthon_property/views/property_meter_water_views.xml +++ b/yuthon_property/views/property_meter_water_views.xml @@ -16,9 +16,9 @@ - - - + + + @@ -26,7 +26,7 @@ - +