@@ -11,6 +11,7 @@ class YuthonVacationReports(models.Model):
|
||||
employee_id = fields.Many2one('hr.employee', string='员工')
|
||||
leave = fields.Float(string='年假')
|
||||
working_overtime = fields.Float(string='加班时')
|
||||
meal_fee = fields.Integer(string="误餐费")
|
||||
|
||||
def button_fixes_approval(self):
|
||||
form_id = self.env.ref('yuthon_holiday.view_yuthon_fixes_approval_form').id
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="employee_id"/>
|
||||
<field name="leave"/>
|
||||
<field name="working_overtime"/>
|
||||
<field name="meal_fee"/>
|
||||
<button name="vacation_details" string="详情" type="object" class="oe_highlight"/>
|
||||
<button name="button_fixes_approval" string="修正" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
|
||||
@@ -417,7 +417,7 @@ class ManageInformationLine(models.Model):
|
||||
|
||||
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
|
||||
precinct_id = fields.Many2one('yuthon.precinct.message',string="所属片区")
|
||||
precinct_id = fields.Many2one(related='yuthon_property_id.precinct_id',string="所属片区", readonly=False)
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
management_area = fields.Float(string="管理面积", digits=(16, 4))
|
||||
rent_area = fields.Float(string="可租面积", digits=(16, 4))
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
'views/inherit_hr_payroll_structure_views.xml',
|
||||
'views/inherit_hr_salary_rule_views.xml',
|
||||
'views/inherit_hr_payslip_views.xml',
|
||||
'views/inherit_hr_payslip_run_views.xml',
|
||||
'views/inherit_hr_payroll_structure_type_views.xml',
|
||||
'views/yuthon_payroll_project_views.xml',
|
||||
'views/yuthon_payroll_type_setting_views.xml',
|
||||
|
||||
@@ -11,4 +11,5 @@ from . import yuthon_salary_year
|
||||
from . import yuthon_salary_project
|
||||
from . import yuthon_salary_asset
|
||||
from . import salary_payroll_distribution
|
||||
from . import yuthon_welfare_expenses
|
||||
from . import yuthon_welfare_expenses
|
||||
from . import inherit_hr_payslip_run
|
||||
@@ -0,0 +1,26 @@
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
import json
|
||||
from odoo.tools import date_utils
|
||||
import logging
|
||||
|
||||
|
||||
class InheritHrPayslipRun(models.Model):
|
||||
_inherit = 'hr.payslip.run'
|
||||
|
||||
document_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
|
||||
|
||||
def Fileline(self):
|
||||
domain = [('is_salary_push', '=', True), ('is_salary_release', '=', True)]
|
||||
return {
|
||||
"name": "薪资归档明细",
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'hr.payslip',
|
||||
"view_mode": "tree",
|
||||
"domain": domain,
|
||||
}
|
||||
|
||||
|
||||
def add_comment(self):
|
||||
pass
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="inherit_hr_payslip_run_tree" model="ir.ui.view">
|
||||
<field name="name">hr.payroll.run.inherit</field>
|
||||
<field name="model">hr.payslip.run</field>
|
||||
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="editable">bottom</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='company_id']" position="after">
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
<button type="object" name="Fileline" string="归档明细" class="oe_highlight"/>
|
||||
<button type="object" name="add_comment" string="确认" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -37,13 +37,14 @@ class SalaryComputeWizard(models.Model):
|
||||
('contract_id.state', '!=', 'cancel'),
|
||||
('contract_id', '!=', False),
|
||||
])
|
||||
self.employee_number = len(self.employee_ids)
|
||||
self.employee_ids = [(6, 0, employees.ids)]
|
||||
|
||||
|
||||
@api.onchange('employee_ids')
|
||||
def onchange_employee_ids(self):
|
||||
if self.employee_ids:
|
||||
employee_number = len(self.employee_ids)
|
||||
self.employee_ids = len(self.employee_ids)
|
||||
|
||||
def confirm(self):
|
||||
attendance_records = self.env['hr.attendance.month'].search([
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="company_id" domain="[('id', '=', company_id)]"/>
|
||||
<field name="employee_ids" widget="many2many_tags" force_save="1"/>
|
||||
<field name="employee_ids" widget="many2many_tags" force_save="1" options="{'no_create': True}"/>
|
||||
<field name="employee_number" column_invisible="1"/>
|
||||
<field name="select_year"/>
|
||||
<field name="select_time"/>
|
||||
|
||||
@@ -262,6 +262,11 @@
|
||||
name="薪资审定"
|
||||
parent="human_resources_salary_root_board"
|
||||
sequence="6"/>
|
||||
<menuitem id="human_pay_hr_payslip_run_tree_board"
|
||||
name="工资批次"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="hr_payroll.action_hr_payslip_run_tree"
|
||||
sequence="7"/>
|
||||
<menuitem id="human_pay_slips_root_board10"
|
||||
name="员工薪资"
|
||||
parent="human_pay_salary_approval_root_board"
|
||||
@@ -282,16 +287,16 @@
|
||||
parent="human_pay_salary_approval_root_board"
|
||||
action="yuthon_salary.action_yuthon_payroll_retired"
|
||||
sequence="15"/>
|
||||
<menuitem id="human_pay_slips_root_board12"
|
||||
name="薪资归档"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.action_view_hr_payslip_salary_release"
|
||||
sequence="10"/>
|
||||
<menuitem id="yuthon_salary_documents"
|
||||
name="薪资附件管理"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.view_yuthon_salary_documents_action"
|
||||
sequence="15"/>
|
||||
<!-- <menuitem id="human_pay_slips_root_board12"-->
|
||||
<!-- name="薪资归档"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.action_view_hr_payslip_salary_release"-->
|
||||
<!-- sequence="10"/>-->
|
||||
<!-- <menuitem id="yuthon_salary_documents"-->
|
||||
<!-- name="薪资附件管理"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.view_yuthon_salary_documents_action"-->
|
||||
<!-- sequence="15"/>-->
|
||||
<!-- <menuitem id="hr_payroll_structure_type_board"-->
|
||||
<!-- name="职级类型"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
@@ -335,11 +340,6 @@
|
||||
parent="human_pay_setting_work_setting"
|
||||
action="yuthon_salary.yuthon_payroll_type_setting_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="human_pay_hr_payslip_run_tree_board"
|
||||
name="工资批次"
|
||||
parent="human_pay_setting_work_setting"
|
||||
action="hr_payroll.action_hr_payslip_run_tree"
|
||||
sequence="8"/>
|
||||
<menuitem id="human_pay_setting_type_rule_type_root_board"
|
||||
name="工资项类别"
|
||||
parent="human_pay_setting_work_setting"
|
||||
|
||||
Reference in New Issue
Block a user