Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
'views/card_remind_form.xml',
|
||||
'views/yuthon_customer_planning_views.xml',
|
||||
'views/planning_slot_template_views.xml',
|
||||
'views/yuthon_overtime_line_views.xml',
|
||||
'views/vacation_overtime_active_views.xml',
|
||||
'views/hr_attendance_month_views.xml',
|
||||
'views/wifi_message_view.xml',
|
||||
|
||||
@@ -36,6 +36,7 @@ from . import yuthon_holiday_statement
|
||||
from . import yuthon_meal_case
|
||||
from . import yuthon_parenting_allocate
|
||||
from . import vacation_overtime_active
|
||||
from . import yuthon_overtime_line
|
||||
# from odoo.tools import SQL
|
||||
# import odoo
|
||||
# odoo.models.READ_GROUP_AGGREGATE.update({
|
||||
|
||||
@@ -23,6 +23,7 @@ class CardApprovals(models.Model):
|
||||
reason_application = fields.Text(string="申请事由")
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
attendance_id = fields.Many2one('hr.attendance', string="补卡日期")
|
||||
number_cards_replaced = fields.Integer(string="已补卡次数")
|
||||
attendance = fields.Char(string="补卡日期")
|
||||
is_attendance = fields.Boolean(string="字段隐藏")
|
||||
replacement_time = fields.Selection([('work', '上班卡'), ('quitting', '下班卡'), ('all', '全天卡')], string="补卡", store=True)
|
||||
|
||||
@@ -14,6 +14,7 @@ class OvertimeApprovals(models.Model):
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string="标题", compute='_compute_name')
|
||||
number_card = fields.Char(string="补卡次数")
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval'))
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
company_id = fields.Many2one(related='users_id.employee_ids.company_id', string="公司")
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
from odoo import api, fields, models, tools, _
|
||||
from datetime import datetime, time, timedelta
|
||||
from odoo.exceptions import UserError
|
||||
from datetime import date, timedelta
|
||||
|
||||
|
||||
|
||||
class YuthonOvertimeLine(models.Model):
|
||||
_name = 'yuthon.overtime.line'
|
||||
_description = '加班明细'
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string="员工")
|
||||
last_balance = fields.Float(string="上年结余")
|
||||
valid_date = fields.Date(string="有效至")
|
||||
workday = fields.Float(string='工作日')
|
||||
public_holidays = fields.Float(string='公休日')
|
||||
vacation_sum = fields.Float(string='合计数')
|
||||
carry_forward_quantity = fields.Float(string="结转时长")
|
||||
carry_forward_date = fields.Date(string="结转日期")
|
||||
remaining_quantity = fields.Float(string="剩余数")
|
||||
|
||||
def open_record(self):
|
||||
pass
|
||||
@@ -88,4 +88,6 @@ access_yuthon_meal_case,access_yuthon_meal_case,model_yuthon_meal_case,base.grou
|
||||
access_pay_carryover_wizard,pay.carryover.wizard,model_pay_carryover_wizard,base.group_user,1,1,1,1
|
||||
access_vacation_parenting_line,vacation.parenting.line,model_vacation_parenting_line,base.group_user,1,1,1,1
|
||||
access_yuthon_parenting_allocate,yuthon.parenting.allocate,model_yuthon_parenting_allocate,base.group_user,1,1,1,1
|
||||
access_vacation_overtime_active,vacation.overtime.active,model_vacation_overtime_active,base.group_user,1,1,1,1
|
||||
access_vacation_overtime_active,vacation.overtime.active,model_vacation_overtime_active,base.group_user,1,1,1,1
|
||||
|
||||
access_yuthon_overtime_line,yuthon.overtime.line,model_yuthon_overtime_line,base.group_user,1,1,1,1
|
||||
|
@@ -11,6 +11,12 @@ export class CustomAttendanceVacationConfirmController extends ListController {
|
||||
async getAction(lock_type) {
|
||||
await this.orm.call('vacation.over.line', 'confirm', []);
|
||||
}
|
||||
async getNextAction(lock_type) {
|
||||
await this.orm.call('vacation.meal.line', 'confirm', []);
|
||||
}
|
||||
async getLastAction(lock_type) {
|
||||
await this.orm.call('vacation.meal.line', 'confirm', []);
|
||||
}
|
||||
}
|
||||
|
||||
registry.category("views").add("custom_vacation_confirm_button", {
|
||||
|
||||
@@ -42,27 +42,13 @@ export class CustomAttendanceVacationPutController extends ListController {
|
||||
openVacationOverWizard() {
|
||||
this.actionService.doAction({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: 'vacation.over.line',
|
||||
res_model: 'yuthon.overtime.line',
|
||||
name: '加班合计数报表',
|
||||
view_mode: 'tree',
|
||||
view_type: 'form',
|
||||
views: [[false, 'tree']],
|
||||
target: 'current',
|
||||
context: {'tree_view_ref': "yuthon_hr_attendance.view_yuthon_vacation_overtime_briefly_tree"},
|
||||
domain: [
|
||||
'|',
|
||||
['is_initial_number', '=', true],
|
||||
'&',
|
||||
['is_initial_number', '=', false],
|
||||
'&',
|
||||
['update_type', '=', 'add'],
|
||||
'&',
|
||||
['workflow_record_id', '!=', false],
|
||||
'!',
|
||||
'&',
|
||||
['start_time', '>=', '2025-12-01 00:00:00'],
|
||||
['start_time', '<', '2026-01-01 00:00:00']
|
||||
],
|
||||
context: {'tree_view_ref': "yuthon_hr_attendance.view_yuthon_overtime_line_tree"},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="getAction">
|
||||
确认
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="getLastAction">
|
||||
上月
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="getNextAction">
|
||||
下月
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
@@ -49,6 +49,7 @@
|
||||
<field name="shift_id" invisible="shift_name" readonly="1"/>
|
||||
<field name="shift_name" invisible="shift_id" readonly="1"/>
|
||||
<field name="replacement_time"/>
|
||||
<field name="number_cards_replaced"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="attendance_id" domain="[('employee_id', '=', employee_id), '|', '|', '|', '|', ('is_abnormal', '=', True), ('is_early_card', '=', True), ('is_late_card', '=', True), ('absenteeism_card', '=', True), ('is_no_card', '=', True)]" invisible="is_attendance"/>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_yuthon_overtime_line_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.overtime.line.tree</field>
|
||||
<field name="model">yuthon.overtime.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="加班合计数报表" editable="bottom" js_class="custom_vacation_confirm_button" create="0">
|
||||
<field name="employee_id"/>
|
||||
<field name="last_balance"/>
|
||||
<field name="valid_date"/>
|
||||
<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"/>
|
||||
<button name="open_record" type="object" string="结束" dclass="oe_highlight"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_overtime_line_action" model="ir.actions.act_window">
|
||||
<field name="name">加班合计数报表</field>
|
||||
<field name="res_model">yuthon.overtime.line</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -620,7 +620,7 @@
|
||||
<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" 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"/>
|
||||
|
||||
Reference in New Issue
Block a user