@@ -7,4 +7,10 @@
|
||||
<field name="padding">4</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
<record id="yuthon_holiday_fixes_sequence" model="ir.sequence">
|
||||
<field name="name">修正编号</field>
|
||||
<field name="code">yuthon_holiday_fixes_code</field>
|
||||
<field name="prefix">XZ</field>
|
||||
<field name="padding">4</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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="原休假时长(小时)")
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="details" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="按天请假" invisible="not is_day"/>
|
||||
<field name="leave_ids" invisible="not is_day"
|
||||
@@ -127,9 +130,6 @@
|
||||
<field name="custom_document_ids" widget="preview_many2many" options="{'show_select_btn': false}"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
<field name="details" readonly="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<attribute name="string">结束时间</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='state']" position="after">
|
||||
<button name="button_fixes_wizard" string="修正" type="object" class="oe_highlight"/>
|
||||
<button name="button_fixes_approval" string="修正" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -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': [],
|
||||
|
||||
@@ -12,4 +12,10 @@
|
||||
<field name="prefix">GR%(y)s%(month)s%(day)s</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record id="property_care_reward_code_sequence" model="ir.sequence">
|
||||
<field name="name">关怀奖励编号</field>
|
||||
<field name="code">property_care_reward_code</field>
|
||||
<field name="prefix">GH%(y)s%(month)s%(day)s</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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
|
||||
from . import yuthon_trade_setting
|
||||
@@ -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="退休证明")
|
||||
@@ -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='名称')
|
||||
@@ -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'))
|
||||
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="会议纪要")
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_care_condolences_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.care.condolences_tree</field>
|
||||
<field name="model">yuthon.care.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="关怀慰问">
|
||||
<field name="name"/>
|
||||
<field name="care_type_id"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_care_condolences_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.care.condolences.form</field>
|
||||
<field name="model">yuthon.care.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="关怀慰问">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="care_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="marriage_cate_id" widget="preview_many2one"/>
|
||||
<field name="born_cate_id" widget="preview_many2one"/>
|
||||
<field name="discharge_summary_id"/>
|
||||
<field name="retired_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="marriage_date"/>
|
||||
<field name="born_date"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="reason"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_yuthon_care_condolences" model="ir.actions.act_window">
|
||||
<field name="name">关怀慰问</field>
|
||||
<field name="res_model">yuthon.care.condolences</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
parent="executive_manage_approval"
|
||||
action="action_yuthon_personal_condolences"
|
||||
sequence="9"/>
|
||||
<menuitem id="executive_care_activities_menu"
|
||||
name="关怀慰问"
|
||||
parent="executive_manage_approval"
|
||||
action="action_yuthon_care_condolences"
|
||||
sequence="10"/>
|
||||
<menuitem id="executive_work_condolences"
|
||||
name="节日慰问"
|
||||
parent="executive_manage_approval"
|
||||
@@ -69,4 +74,18 @@
|
||||
parent="executive_manage_approval"
|
||||
action="action_yuthon_trade_reimbursed"
|
||||
sequence="31"/>
|
||||
<menuitem id="executive_trade_setting"
|
||||
name="配置"
|
||||
parent="executive_manage_approval"
|
||||
sequence="99"/>
|
||||
<menuitem id="executive_yuthon_care_setting"
|
||||
name="关怀类型"
|
||||
parent="executive_trade_setting"
|
||||
action="view_yuthon_care_setting_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="executive_yuthon_work_setting"
|
||||
name="节日类型"
|
||||
parent="executive_trade_setting"
|
||||
action="view_yuthon_work_setting_action"
|
||||
sequence="10"/>
|
||||
</odoo>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_care_setting_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.care.setting.tree</field>
|
||||
<field name="model">yuthon.care.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="关怀类型配置" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_care_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">关怀类型配置</field>
|
||||
<field name="res_model">yuthon.care.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_yuthon_work_setting_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.work.setting.tree</field>
|
||||
<field name="model">yuthon.work.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="节日类型配置" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_work_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">节日类型配置</field>
|
||||
<field name="res_model">yuthon.work.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_work_condolences_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.work.condolences_tree</field>
|
||||
<field name="model">yuthon.work.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="节日慰问">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_work_condolences_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.work.condolences.form</field>
|
||||
<field name="model">yuthon.work.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="节日慰问">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_yuthon_work_condolences" model="ir.actions.act_window">
|
||||
<field name="name">节日慰问</field>
|
||||
<field name="res_model">yuthon.work.condolences</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_work_condolences_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.work.condolences_tree</field>
|
||||
<field name="model">yuthon.work.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="节日慰问">
|
||||
<field name="name"/>
|
||||
<field name="work_type_id"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_work_condolences_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.work.condolences.form</field>
|
||||
<field name="model">yuthon.work.condolences</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="节日慰问">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="reason"/>
|
||||
<field name="scheme_id" widget="preview_many2one"/>
|
||||
<field name="meeting_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_yuthon_work_condolences" model="ir.actions.act_window">
|
||||
<field name="name">节日慰问</field>
|
||||
<field name="res_model">yuthon.work.condolences</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user