@@ -22,17 +22,17 @@ class YuthonContractWizard(models.Model):
|
||||
raise ValidationError('请上传文件。')
|
||||
book = xlrd.open_workbook(file_contents=base64.decodebytes(self.excel_file))
|
||||
sh = book.sheet_by_index(0)
|
||||
for rx in range(1, sh.nrows):
|
||||
for rx in range(4, sh.nrows):
|
||||
row = sh.row(rx)
|
||||
self.employee_contract_data(row)
|
||||
|
||||
def employee_contract_data(self,row):
|
||||
employee_id = self.env['hr.employee'].search([('name', '=', row[1].value)])
|
||||
structure_type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[4].value), ('yuthon_company', '=', 'thwg')])
|
||||
party_id = self.env['yuthon.party.setting'].search([('party', '=', row[5].value)])
|
||||
contract_type_id = self.env['hr.contract.type'].search([('name', '=', row[6].value)])
|
||||
structure_type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[11].value), ('yuthon_company', '=', 'thlc')])
|
||||
party_id = self.env['yuthon.party.setting'].search([('party', '=', '广州天河粮食储备管理有限公司')])
|
||||
contract_type_id = self.env['hr.contract.type'].search([('name', '=', '正式合同(一签)')])
|
||||
wage_id = self.env['hr.salary.rule'].search([('struct_id.name', '=', structure_type_id.name),
|
||||
('yuthon_company', '=', 'thwg'),
|
||||
('yuthon_company', '=', 'thlc'),
|
||||
('name', '=', '基本工资')])
|
||||
resource_calendar_id = self.env['resource.calendar'].search([('name', '=', '行政考勤')], limit=1)
|
||||
wage = wage_id.amount_fix
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
<field name="users_id"/>
|
||||
<field name="employee_id" invisible="1" force_save="1"/>
|
||||
<field name="text"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="is_hour"/>
|
||||
<field name="is_day"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<field name="code" readonly="1"/>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
@@ -32,20 +33,17 @@
|
||||
<field name="date_end" required="1"/>
|
||||
<field name="days"/>
|
||||
<field name="hours"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="related_issues_id" invisible="not is_issues"/>
|
||||
<field name="employee_ids" widget="many2many_tags"/>
|
||||
<field name="details"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="reason_application"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="related_issues_id" invisible="not is_issues"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -285,7 +285,6 @@
|
||||
<menuitem id="human_resources_salary_root_board"
|
||||
name="薪资管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="11"/>
|
||||
<menuitem id="human_work_entry_board"
|
||||
name="工作分录"
|
||||
@@ -306,14 +305,10 @@
|
||||
parent="human_pay_slips_root_board"
|
||||
action="hr_payroll.action_view_hr_payslip_month_form"
|
||||
sequence="3"/>
|
||||
<menuitem id="human_pay_setting_root_board"
|
||||
name="配置"
|
||||
parent="human_resources_salary_root_board"
|
||||
sequence="99"/>
|
||||
<menuitem id="human_pay_setting_structural_tt_board"
|
||||
name="天河投资"
|
||||
parent="human_pay_setting_root_board"
|
||||
sequence="1"/>
|
||||
parent="human_resources_salary_root_board"
|
||||
sequence="10"/>
|
||||
<menuitem id="hr_payroll_structure_type_tt_board"
|
||||
name="职级类型"
|
||||
parent="human_pay_setting_structural_tt_board"
|
||||
@@ -336,8 +331,8 @@
|
||||
sequence="15"/>
|
||||
<menuitem id="human_pay_setting_structural_lc_board"
|
||||
name="天河粮储"
|
||||
parent="human_pay_setting_root_board"
|
||||
sequence="3"/>
|
||||
parent="human_resources_salary_root_board"
|
||||
sequence="15"/>
|
||||
<menuitem id="hr_payroll_structure_type_lc_board"
|
||||
name="职级类型"
|
||||
parent="human_pay_setting_structural_lc_board"
|
||||
@@ -360,8 +355,8 @@
|
||||
sequence="15"/>
|
||||
<menuitem id="human_pay_setting_structural_wg_board"
|
||||
name="天河物管"
|
||||
parent="human_pay_setting_root_board"
|
||||
sequence="5"/>
|
||||
parent="human_resources_salary_root_board"
|
||||
sequence="20"/>
|
||||
<menuitem id="hr_payroll_structure_type_wg_board"
|
||||
name="职级类型"
|
||||
parent="human_pay_setting_structural_wg_board"
|
||||
@@ -384,19 +379,19 @@
|
||||
sequence="15"/>
|
||||
<menuitem id="human_pay_setting_type_rule_argument_root_board"
|
||||
name="工资项参数"
|
||||
parent="human_pay_setting_root_board"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="hr_payroll.hr_rule_parameter_action"
|
||||
sequence="7"/>
|
||||
sequence="23"/>
|
||||
<menuitem id="human_pay_setting_type_rule_type_root_board"
|
||||
name="工资项类别"
|
||||
parent="human_pay_setting_root_board"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="hr_payroll.action_hr_salary_rule_category"
|
||||
sequence="9"/>
|
||||
sequence="26"/>
|
||||
<menuitem id="human_pay_setting_work_entry_root_board"
|
||||
name="工作条目类型"
|
||||
parent="human_pay_setting_root_board"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="hr_work_entry.hr_work_entry_type_action"
|
||||
sequence="15"/>
|
||||
sequence="30"/>
|
||||
|
||||
<!-- 培训管理 -->
|
||||
<menuitem id="training_manager_root_board"
|
||||
@@ -428,9 +423,9 @@
|
||||
action="yuthon_none_action"
|
||||
sequence="3"/>
|
||||
<!-- 配置 -->
|
||||
<menuitem id="human_resources_setting_root_board"
|
||||
name="配置"
|
||||
parent="human_resources_menu_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="15"/>
|
||||
<!-- <menuitem id="human_resources_setting_root_board"-->
|
||||
<!-- name="配置"-->
|
||||
<!-- parent="human_resources_menu_root_board"-->
|
||||
<!-- action="yuthon_none_action"-->
|
||||
<!-- sequence="15"/>-->
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user