diff --git a/yuthon_holiday/data/yuthon_holiday_data.xml b/yuthon_holiday/data/yuthon_holiday_data.xml
index 2f4c53bf1..b3088c82c 100644
--- a/yuthon_holiday/data/yuthon_holiday_data.xml
+++ b/yuthon_holiday/data/yuthon_holiday_data.xml
@@ -7,4 +7,10 @@
4
+
+ 修正编号
+ yuthon_holiday_fixes_code
+ XZ
+ 4
+
\ No newline at end of file
diff --git a/yuthon_holiday/models/inherit_hr_leave_allocation.py b/yuthon_holiday/models/inherit_hr_leave_allocation.py
index e877017d6..28d2692c8 100644
--- a/yuthon_holiday/models/inherit_hr_leave_allocation.py
+++ b/yuthon_holiday/models/inherit_hr_leave_allocation.py
@@ -81,7 +81,8 @@ class HrLeaveAllocation(models.Model):
self.env['hr.leave.allocation'].with_context(mail_notify_force_send=False, mail_activity_automation_skip=True).create(allocation_vals)
self.linked_request_ids.filtered(lambda c: c.state != 'validate').action_validate()
- def button_fixes_wizard(self):
+ def button_fixes_approval(self):
+ form_id = self.env.ref('yuthon_holiday.view_yuthon_fixes_approval_form').id
if self.type_request_unit == 'hour':
now_type = 'hours'
else:
@@ -89,15 +90,15 @@ class HrLeaveAllocation(models.Model):
return {
"type": "ir.actions.act_window",
"name": "修正申请",
- "res_model": "yuthon.fixes.wizard",
- "view_mode": 'form',
- 'target': 'new',
+ "res_model": "yuthon.fixes.approval",
+ "views": [[form_id, "form"]],
"context": {
'default_users_id': self.employee_id.user_id.id,
'default_leave_id': self.id,
'default_now_type': now_type,
- }
+ 'default_original_days': self.number_of_days_display,
+ 'default_original_hours': self.number_of_days_display,
+ }
}
-
diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py
index cc32f4356..d6d402403 100644
--- a/yuthon_holiday/models/yuthon_fixes_approval.py
+++ b/yuthon_holiday/models/yuthon_fixes_approval.py
@@ -9,7 +9,7 @@ class YuthonFixesApproval(models.Model):
yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司")
name = fields.Char(string="标题")
- code = fields.Char(string="编号")
+ code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_holiday_fixes_code'))
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
original_days = fields.Float(string="原休假时长(天)")
original_hours = fields.Float(string="原休假时长(小时)")
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 73629ee3b..09896c553 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -38,6 +38,9 @@
+
+
+
-
-
-
diff --git a/yuthon_holiday/views/inherit_hr_leave_allocation_views.xml b/yuthon_holiday/views/inherit_hr_leave_allocation_views.xml
index 8dac334be..0daba141f 100644
--- a/yuthon_holiday/views/inherit_hr_leave_allocation_views.xml
+++ b/yuthon_holiday/views/inherit_hr_leave_allocation_views.xml
@@ -18,7 +18,7 @@
结束时间
-
+
diff --git a/yuthon_trade/__manifest__.py b/yuthon_trade/__manifest__.py
index f9aa0aa1d..880d1d51b 100644
--- a/yuthon_trade/__manifest__.py
+++ b/yuthon_trade/__manifest__.py
@@ -21,7 +21,9 @@
'views/yuthon_trade_reimbursed.xml',
'views/yuthon_trade_supportive.xml',
'views/yuthon_none_views.xml',
- 'views/yuthon_work_condolences.xml',
+ 'views/yuthon_care_condolences_views.xml',
+ 'views/yuthon_trade_setting_views.xml',
+ 'views/yuthon_work_condolences_views.xml',
'views/yuthon_trade_menu.xml',
],
'demo': [],
diff --git a/yuthon_trade/data/sale_renting_code_data.xml b/yuthon_trade/data/sale_renting_code_data.xml
index a69cee7f2..7694e27af 100644
--- a/yuthon_trade/data/sale_renting_code_data.xml
+++ b/yuthon_trade/data/sale_renting_code_data.xml
@@ -12,4 +12,10 @@
GR%(y)s%(month)s%(day)s
3
+
+ 关怀奖励编号
+ property_care_reward_code
+ GH%(y)s%(month)s%(day)s
+ 3
+
\ No newline at end of file
diff --git a/yuthon_trade/models/__init__.py b/yuthon_trade/models/__init__.py
index e4918dd09..c1f697dc3 100644
--- a/yuthon_trade/models/__init__.py
+++ b/yuthon_trade/models/__init__.py
@@ -9,5 +9,7 @@ from . import yuthon_trade_purchase
from . import yuthon_trade_refund
from . import yuthon_trade_reimbursed
from . import yuthon_trade_supportive
+from . import yuthon_care_condolences
+from . import yuthon_none
from . import yuthon_work_condolences
-from . import yuthon_none
\ No newline at end of file
+from . import yuthon_trade_setting
\ No newline at end of file
diff --git a/yuthon_trade/models/yuthon_care_condolences.py b/yuthon_trade/models/yuthon_care_condolences.py
new file mode 100644
index 000000000..e688e2eef
--- /dev/null
+++ b/yuthon_trade/models/yuthon_care_condolences.py
@@ -0,0 +1,23 @@
+from odoo import models, fields, api
+
+
+class YuthonCareCondolences(models.Model):
+ _name = 'yuthon.care.condolences'
+ _description = '关怀慰问'
+ _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
+
+ name = fields.Char(string='名称')
+ 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="部门")
+ care_type_id = fields.Many2one('yuthon.care.setting', string='类型')
+ code = fields.Char(string="编号",
+ default=lambda self: self.env['ir.sequence'].next_by_code('property_care_reward_code_sequence'))
+ date = fields.Date(string='日期')
+ fees = fields.Float(string='费用')
+ reason = fields.Html(string="正文")
+ marriage_cate_id = fields.Many2one('ir.attachment', string="结婚证明")
+ marriage_date = fields.Date(string="结婚时间")
+ born_cate_id = fields.Many2one('ir.attachment', string="出生证明")
+ born_date = fields.Date(string="出生时间")
+ discharge_summary_id = fields.Many2one('ir.attachment', string="出院小结")
+ retired_id = fields.Many2one('ir.attachment', string="退休证明")
\ No newline at end of file
diff --git a/yuthon_trade/models/yuthon_trade_setting.py b/yuthon_trade/models/yuthon_trade_setting.py
new file mode 100644
index 000000000..c560c6b4e
--- /dev/null
+++ b/yuthon_trade/models/yuthon_trade_setting.py
@@ -0,0 +1,15 @@
+from odoo import models, fields, api
+
+
+class YuthonCareSetting(models.Model):
+ _name = 'yuthon.care.setting'
+ _description = '关怀类型配置'
+
+ name = fields.Char(string='名称')
+
+
+class YuthonWorkSetting(models.Model):
+ _name = 'yuthon.work.setting'
+ _description = '节日类型配置'
+
+ name = fields.Char(string='名称')
\ No newline at end of file
diff --git a/yuthon_trade/models/yuthon_work_condolences.py b/yuthon_trade/models/yuthon_work_condolences.py
index 3f0b5b968..9e478d6a0 100644
--- a/yuthon_trade/models/yuthon_work_condolences.py
+++ b/yuthon_trade/models/yuthon_work_condolences.py
@@ -3,9 +3,17 @@ from odoo import models, fields, api
class YuthonWorkCondolences(models.Model):
_name = 'yuthon.work.condolences'
- _description = '节日慰问'
+ _description = '关怀慰问'
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
name = fields.Char(string='名称')
+ 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="部门")
+ work_type_id = fields.Many2one('yuthon.work.setting', string='类型')
code = fields.Char(string="编号",
- default=lambda self: self.env['ir.sequence'].next_by_code('property_work_condolences_code_sequence'))
\ No newline at end of file
+ default=lambda self: self.env['ir.sequence'].next_by_code('property_work_condolences_code_sequence'))
+ date = fields.Date(string='日期')
+ fees = fields.Float(string='费用')
+ reason = fields.Html(string="正文")
+ scheme_id = fields.Many2one('ir.attachment', string="方案")
+ meeting_id = fields.Many2one('ir.attachment', string="会议纪要")
\ No newline at end of file
diff --git a/yuthon_trade/security/ir.model.access.csv b/yuthon_trade/security/ir.model.access.csv
index 64bbdb6fc..7415aa40c 100644
--- a/yuthon_trade/security/ir.model.access.csv
+++ b/yuthon_trade/security/ir.model.access.csv
@@ -10,6 +10,10 @@ access_yuthon_trade_premium,yuthon_trade_premium,model_yuthon_trade_premium,base
access_yuthon_trade_refund,yuthon_trade_refund,model_yuthon_trade_refund,base.group_user,1,1,1,1
access_yuthon_trade_reimbursed,yuthon_trade_reimbursed,model_yuthon_trade_reimbursed,base.group_user,1,1,1,1
access_yuthon_trade_supportive,yuthon_trade_supportive,model_yuthon_trade_supportive,base.group_user,1,1,1,1
+access_yuthon_care_condolences,yuthon_care_condolences,model_yuthon_care_condolences,base.group_user,1,1,1,1
access_yuthon_work_condolences,yuthon_work_condolences,model_yuthon_work_condolences,base.group_user,1,1,1,1
+access_yuthon_care_setting,yuthon_care_setting,model_yuthon_care_setting,base.group_user,1,1,1,1
+access_yuthon_work_setting,yuthon_work_setting,model_yuthon_work_setting,base.group_user,1,1,1,1
+
diff --git a/yuthon_trade/views/yuthon_care_condolences_views.xml b/yuthon_trade/views/yuthon_care_condolences_views.xml
new file mode 100644
index 000000000..cd9544d13
--- /dev/null
+++ b/yuthon_trade/views/yuthon_care_condolences_views.xml
@@ -0,0 +1,64 @@
+
+
+
+ yuthon.care.condolences_tree
+ yuthon.care.condolences
+
+
+
+
+
+
+
+
+
+ yuthon.care.condolences.form
+ yuthon.care.condolences
+
+
+
+
+
+ 关怀慰问
+ yuthon.care.condolences
+ tree,form
+
+
+
+
diff --git a/yuthon_trade/views/yuthon_trade_menu.xml b/yuthon_trade/views/yuthon_trade_menu.xml
index ad92b80ec..f81463de6 100644
--- a/yuthon_trade/views/yuthon_trade_menu.xml
+++ b/yuthon_trade/views/yuthon_trade_menu.xml
@@ -14,6 +14,11 @@
parent="executive_manage_approval"
action="action_yuthon_personal_condolences"
sequence="9"/>
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_trade/views/yuthon_trade_setting_views.xml b/yuthon_trade/views/yuthon_trade_setting_views.xml
new file mode 100644
index 000000000..6a535b845
--- /dev/null
+++ b/yuthon_trade/views/yuthon_trade_setting_views.xml
@@ -0,0 +1,31 @@
+
+
+
+ yuthon.care.setting.tree
+ yuthon.care.setting
+
+
+
+
+
+
+
+ 关怀类型配置
+ yuthon.care.setting
+ tree
+
+
+ yuthon.work.setting.tree
+ yuthon.work.setting
+
+
+
+
+
+
+
+ 节日类型配置
+ yuthon.work.setting
+ tree
+
+
\ No newline at end of file
diff --git a/yuthon_trade/views/yuthon_work_condolences.xml b/yuthon_trade/views/yuthon_work_condolences.xml
deleted file mode 100644
index 432fd9cb9..000000000
--- a/yuthon_trade/views/yuthon_work_condolences.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- yuthon.work.condolences_tree
- yuthon.work.condolences
-
-
-
-
-
-
-
-
- yuthon.work.condolences.form
- yuthon.work.condolences
-
-
-
-
-
- 节日慰问
- yuthon.work.condolences
- tree,form
-
-
-
-
diff --git a/yuthon_trade/views/yuthon_work_condolences_views.xml b/yuthon_trade/views/yuthon_work_condolences_views.xml
new file mode 100644
index 000000000..7c95afead
--- /dev/null
+++ b/yuthon_trade/views/yuthon_work_condolences_views.xml
@@ -0,0 +1,51 @@
+
+
+
+ yuthon.work.condolences_tree
+ yuthon.work.condolences
+
+
+
+
+
+
+
+
+
+ yuthon.work.condolences.form
+ yuthon.work.condolences
+
+
+
+
+
+ 节日慰问
+ yuthon.work.condolences
+ tree,form
+
+