出勤字段,和看板样式优化
This commit is contained in:
@@ -38,14 +38,15 @@
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div t-attf-class="o_attachment o_attachment_many2many #{ editable ? 'o_attachment_editable' : '' } #{upload ? 'o_attachment_uploading' : ''}" t-att-title="file.name">
|
||||
<div class="o_attachment_wrap">
|
||||
<div class="o_attachment_wrap d-flex">
|
||||
<t t-set="ext" t-value="getExtension(file)"/>
|
||||
<t t-set="url" t-value="getUrl(file.id)"/>
|
||||
<div class="o_image_box float-start" t-att-data-tooltip="'Preview ' + file.name">
|
||||
<span class="o_image o_hover" t-on-click.stop="() => this.preview_Obj(file.id,file.name)" t-att-data-mimetype="file.mimetype" t-att-data-ext="ext" role="img"/>
|
||||
</div>
|
||||
|
||||
<div class="caption">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="caption" style="white-space: unset;">
|
||||
<a class="ml4" t-att-data-tooltip="'Download ' + file.name" t-att-href="getUrl(file.id)"><t t-esc='file.name'/></a>
|
||||
</div>
|
||||
<div class="caption small">
|
||||
@@ -54,6 +55,7 @@
|
||||
<div class="progress-bar progress-bar-striped active" style="width: 100%">Uploading</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="o_attachment_uploaded"><i class="text-success fa fa-check" role="img" aria-label="Uploaded" title="Uploaded"/></div>
|
||||
<div t-if="editable" class="o_attachment_delete" t-on-click.stop="() => this.onFileRemove(file.id)"><span class="text-white" role="img" aria-label="Delete" title="Delete">×</span></div>
|
||||
|
||||
@@ -2931,7 +2931,7 @@ nav.o_main_navbar {
|
||||
}
|
||||
}
|
||||
.modal.o_modal_full {
|
||||
z-index: 1111;
|
||||
z-index: 1070;
|
||||
}
|
||||
html {
|
||||
body {
|
||||
|
||||
@@ -243,12 +243,12 @@
|
||||
decoration-danger="approve_state == 'end'" decoration-success="approve_state == 'pending'"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="employee_ids" widget="many2many_tags" string="当前经办人" class="list_ids_width"/>
|
||||
<field name="soong_state"/><field name="node_update_time" string="办结时间" optional="show"/>
|
||||
<field name="soong_state"/>
|
||||
<field name="node_update_time" string="到达时间" optional="show"/>
|
||||
<field name="is_manager" column_invisible="1"/>
|
||||
<field name="is_unlink" column_invisible="1"/>
|
||||
<field name="is_log2" column_invisible="1"/>
|
||||
<button name="delete_record" type="object" string="删除" class="btn-primary"
|
||||
confirm="你确定要删除吗?"
|
||||
<button name="delete_record" type="object" string="删除" class="btn-primary" confirm="你确定要删除吗?"
|
||||
invisible="not is_unlink"/>
|
||||
<button name="greater_record" type="object" string="更多" class="btn-primary" invisible="not is_log2"/>
|
||||
<button name="reminders_record" type="object" string="催办" class="btn-primary"
|
||||
@@ -410,8 +410,7 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">soong.workflow.record</field>
|
||||
<field name="view_mode">tree,kanban,search</field>
|
||||
<field name="context">{'header_search_default_approve_state': 1, 'header_search_default_to_do':1,
|
||||
'check_employee': 1}
|
||||
<field name="context">{'header_search_default_approve_state': 1, 'header_search_default_to_do':1, 'check_employee': 1}
|
||||
</field>
|
||||
<field name="domain">[('is_to_do', '=', True)]</field>
|
||||
<field name="search_view_id" ref="soong_workflow_record_search1"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { DateTimePicker } from "@web/core/datetime/datetime_picker";
|
||||
import { isMobileOS } from "@web/core/browser/feature_detection";
|
||||
import { useEffect, useRef, reactive } from "@odoo/owl";
|
||||
import { useEffect, useRef } from "@odoo/owl";
|
||||
|
||||
patch(DateTimePicker.prototype, {
|
||||
setup() {
|
||||
|
||||
@@ -984,6 +984,7 @@ class VacationLeaveLine(models.Model):
|
||||
self._sync_to_employee(reverse=True)
|
||||
return super(VacationLeaveLine, self).unlink()
|
||||
|
||||
|
||||
class VacationOverline(models.Model):
|
||||
_name = 'vacation.over.line'
|
||||
_description = '加班明细'
|
||||
@@ -999,6 +1000,7 @@ class VacationOverline(models.Model):
|
||||
last_balance = fields.Float(string='上年结余', compute='_compute_last_balance', store=True)
|
||||
legal_day = fields.Float(string='法定节假日')
|
||||
public_holidays = fields.Float(string='公休日')
|
||||
vacation_sum = fields.Float(string='合计数', compute='_compute_last_balance')
|
||||
meal_number = fields.Integer(string='误餐次数')
|
||||
update_date = fields.Date(string='更新时间')
|
||||
is_void = fields.Boolean(string='是否作废')
|
||||
@@ -1023,7 +1025,7 @@ class VacationOverline(models.Model):
|
||||
],string='结转状态',
|
||||
default='pending',
|
||||
)
|
||||
remaining_quantity = fields.Float(string='剩余数', compute="_compute_remaining_quantity", store=True)
|
||||
remaining_quantity = fields.Float(string='剩余数', compute="_compute_last_balance", store=True)
|
||||
|
||||
def open_record1(self):
|
||||
tree_id = self.env.ref("yuthon_vacation_reports.view_yuthon_vacation_overtime_tree").id
|
||||
@@ -1102,21 +1104,17 @@ class VacationOverline(models.Model):
|
||||
over_ids = self.env["vacation.over.line"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for rec in over_ids:
|
||||
rec._compute_remaining_quantity()
|
||||
rec._compute_overtime()
|
||||
rec._compute_employee_id()
|
||||
rec._compute_last_balance()
|
||||
|
||||
@api.depends('duration', 'carry_forward_quantity')
|
||||
def _compute_remaining_quantity(self):
|
||||
for rec in self:
|
||||
rec.remaining_quantity = rec.duration - rec.carry_forward_quantity
|
||||
|
||||
@api.depends('vacation_id')
|
||||
def _compute_last_balance(self):
|
||||
for rec in self:
|
||||
if rec.vacation_id:
|
||||
rec.last_balance = rec.vacation_id.last_holiday + rec.vacation_id.last_workday
|
||||
rec.vacation_sum = rec.last_balance + rec.public_holidays + rec.workday
|
||||
rec.remaining_quantity = rec.vacation_sum - rec.carry_forward_quantity
|
||||
else:
|
||||
rec.last_balance = 0
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export class CustomAttendanceVacationPutController extends ListController {
|
||||
this.actionService.doAction({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: 'vacation.over.line',
|
||||
name: '加班情况',
|
||||
name: '加班合计数报表',
|
||||
view_mode: 'tree',
|
||||
view_type: 'form',
|
||||
views: [[false, 'tree']],
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_list_buttons')]" position="after">
|
||||
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="openVacationOverWizard">
|
||||
加班情况
|
||||
加班合计数报表
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_list_buttons')]" position="after">
|
||||
|
||||
@@ -569,12 +569,13 @@
|
||||
<field name="name">vacation.over.line.overtime.briefly.tree</field>
|
||||
<field name="model">vacation.over.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="加班情况弹窗" editable="bottom" js_class="custom_vacation_confirm_button" create="0">
|
||||
<tree string="加班合计数报表" editable="bottom" js_class="custom_vacation_confirm_button" create="0">
|
||||
<field name="employee_id"/>
|
||||
<field name="last_balance" groups="yuthon_salary.group_lc_user,yuthon_salary.group_wg_user"/>
|
||||
<field name="valid_date" groups="yuthon_salary.group_lc_user,yuthon_salary.group_wg_user"/>
|
||||
<field name="workday"/>
|
||||
<field name="public_holidays"/>
|
||||
<field name="vacation_sum"/>
|
||||
<field name="carry_forward_quantity"/>
|
||||
<field name="carry_forward_date"/>
|
||||
<field name="remaining_quantity"/>
|
||||
@@ -593,6 +594,7 @@
|
||||
<field name="start_time"/>
|
||||
<field name="end_time"/>
|
||||
<field name="duration"/>
|
||||
<field name="vacation_sum"/>
|
||||
<field name="carry_forward_quantity"/>
|
||||
<field name="carry_forward_date"/>
|
||||
<field name="carry_forward_state"/>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<!-- 核心关联字段:员工 -->
|
||||
<button type="object" name="payslip_transmit" string="发送" class="oe_highlight"/>
|
||||
<field name="employee_id" string="员工"/>
|
||||
<field name="confirm_status"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
<field name="company_id" column_invisible="1"/>
|
||||
<field name="company_old" column_invisible="1"/>
|
||||
@@ -65,7 +66,7 @@
|
||||
<field name="meal_allowance" string="误餐费"/>
|
||||
<field name="reimbursed_medical_exam_fee" string="已报销体检费"/>
|
||||
<field name="remaining_medical_exam_fee" string="剩余体检费"/>
|
||||
<field name="confirm_status"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user