Merge pull request !2912 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-05-28 03:46:33 +00:00
committed by Gitee
5 changed files with 38 additions and 16 deletions
+1
View File
@@ -46,6 +46,7 @@ class SoongWorkflow(models.Model):
remove_default_btn_until_end = fields.Boolean(string="覆盖表头按钮", default=False)
current_stage_highlight_color = fields.Char(string="当前阶段颜色", default="rgb(0, 255, 255)", help="The color to highlight the current stage on flow", )
start_date = fields.Date(string="生效日期", copy=False, default=fields.Date.today())
text = fields.Text(string="描述")
end_date = fields.Date(string="失效日期", copy=False, default=fields.Date.from_string('2099-01-01'))
is_enable = fields.Boolean(string="是否启用", compute="compute_is_enable", store=True)
is_enable_return_button = fields.Boolean(string="是否启用收回", default=True)
@@ -7,19 +7,24 @@
<kanban create="false" class="o_modules_kanban">
<field name="name"/>
<field name="id"/>
<field name="text"/>
<templates>
<t t-name="kanban-box">
<t t-name="kanban-box">
<div class="oe_module_vignette">
<div class="oe_module_desc">
<h4 class="o_kanban_record_title">
<field name="name"/>
</h4>
<p class="oe_module_name">
<br />
<!-- <field name="description"/>-->
</p>
<div class="oe_module_action" t-if="!selection_mode">
<button type="object" class="btn btn-primary btn-sm" name="create_request" >新建审批</button>
<div class="oe_module_desc" style="display: flex; justify-content: space-between;">
<div class="o_left_container" style="flex: 1; max-width: 40%;">
<h4 class="o_kanban_record_title">
<field name="name"/>
</h4>
<p class="oe_module_name">
<br/>
</p>
<div class="oe_module_action" t-if="!selection_mode">
<button type="object" class="btn btn-primary btn-sm" name="create_request">新建审批</button>
</div>
</div>
<div class="o_right_container" style="flex: 1; max-width: 55%; margin-left: 16px; border-left: 1px solid #eee; padding-left: 16px;">
<field name="text" options="{'mode': 'readonly'}" style="white-space: normal; word-wrap: break-word;"/>
</div>
</div>
</div>
@@ -25,6 +25,7 @@
<group>
<field name="name" required="1"/>
<field name="model_id" required="1" options="{'no_open': True, 'no_create': True}"/>
<field name="text"/>
<field name="current_stage_highlight_color" widget="color"/>
<field name="remove_default_btn_until_end"/>
<field name="is_enable_return_button"/>
@@ -60,6 +61,7 @@
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="model_id"/>
<field name="text"/>
<!-- <field name="remove_default_attrs_mod"/>-->
<field name="start_date"/>
<field name="end_date"/>
@@ -502,6 +502,15 @@ class YuthonHrEmployee(models.Model):
}
return action
def put_batch_return(self):
uid = self.user_id.id
action = {
'type': 'ir.actions.act_window',
'res_model': 'hr.leave.batch',
'view_mode': 'tree',
'domain': [('users_id', '=', uid)],
}
return action
def put_holiday_return(self):
employee_id = self.user_id.employee_id.id
@@ -192,11 +192,16 @@
<field name="meal_number"/>
<field name="meal_supplement"/>
</group>
<group name="holiday" string="假期">
<field name="user_year_holiday_hours"/>
<field name="remainder_year_holiday_hours"/>
<field name="cumulative_remainder_visit_hours"/>
<field name="all_year_holiday_hours"/>
<group name="holiday" string="假期" col="2">
<group>
<field name="user_year_holiday_hours"/>
<field name="remainder_year_holiday_hours"/>
<field name="cumulative_remainder_visit_hours"/>
<field name="all_year_holiday_hours"/>
</group>
<group>
<button name="put_batch_return" type="object" string="详情" class="oe_highlight"/>
</group>
</group>
</xpath>
<xpath expr="//page[@name='hr_settings']" position="before">